9 years, 7 months ago.

A problem

I don't know the meaning of this paragraph,

Command Support When an mbed device is running in registered mode you can send it commands from an IoT Cloud application. By way of illustration, the sample code that you have loaded into the device supports a simple command that will make the device's onboard LED blink at a specified rate. You can try this out by writing an application which connects to the IoT Cloud and publishes a message to the device. The payload of this command message should be:

The device's topic is: iot-2/type/<Device Type>/id/<Device Id>/cmd/blink/fmt/json Note: Sending a rate of 0 will cause the LED to stop blinking.

Can you give a simple example to illustrate carefully? Thank you!

Question relating to:

Contains example code to connect the mbed LPC1768 or FRDM-K64F devices to the IBM Internet of Things Cloud service via ethernet.

1 Answer

9 years, 7 months ago.

I use a command something like this (using a sample command from the Paho MQTT C client):

stdinpub iot-2/type/iotsample-mbed-lpc1768/id/0002f7f1ad23/cmd/blink/fmt/json --clientid a:3dwr2:ua7ccwsyri --host ssl:3dwr2.messaging.internetofthings.ibmcloud.com --port 8883 --username a:3dwr2:ua7ccwsyri --password <my password>

for my registered device. The payload of the message would be {"rate":0}. The first parameter above is the topic. This sends an MQTT message to the device.

I assume you've looked at https://developer.ibm.com/iot/recipes/improvise-commands/, but I'm including the link, just in case you haven't.

Accepted Answer

Thank you very much!

posted by zhang jun 25 Aug 2014