linking raspberry pi with our device through ibm bluemix
TRANSCRIPT
![Page 1: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/1.jpg)
www.azilen.com
Linking Raspberry PI with our device through
IBM Bluemix
![Page 2: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/2.jpg)
www.azilen.com 01
1. To link the Raspberry PI with your virtual device in IBM Bluemix, first of
all you need to IoT service running in Raspberry pi. Run the below
command to stop it.
sudo service iot stop
2. Type the below command to device configuration file.
sudo nano /etc/iotsample-raspberrypi/device.cfg
![Page 3: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/3.jpg)
www.azilen.com 02
3. Copy and paste the device information to device.cfg file. You have received this
information while getting registered with IBM Bluemix.
#Device configuration file
org = p29vg0
type = RaspberryPI3
id = PiBrain
auth-method = token
auth-token = 3*)DPXWa+NFQl&Zgjs
#End of Configuration file
![Page 4: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/4.jpg)
www.azilen.com 02
4. The newer version of Raspberry PI has already come up with Node-RED and
Watson IoT. If you are using the newer version, run following command to update
Raspberry PI
sudo apt-get update
sudo apt-get dist-upgrade
5. Type below command to start Node-RED.
node-red
![Page 5: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/5.jpg)
www.azilen.com 03
6. Once your node-red server has started, you can see it from below url.
![Page 6: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/6.jpg)
www.azilen.com 04
7. IBM offers set of nodes that we can use potentially. Open below url and
copy JSON from it.
https://raw.githubusercontent.com/ibm-messaging/iot-device-
samples/master/node-red/device-sample/quickstart.json
![Page 7: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/7.jpg)
www.azilen.com 05
8. In Node-RED editor go to Menu >> Import >> Clipboard
![Page 8: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/8.jpg)
www.azilen.com 06
9. Paste JSON value to import nodes
![Page 9: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/9.jpg)
www.azilen.com 07
10. Double click on Event node
![Page 10: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/10.jpg)
www.azilen.com 08
11. A pop-up will appear, select “Registered” radio button and click on edit button.
![Page 11: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/11.jpg)
www.azilen.com 09
12. Add the data which have configured in our device.cfg file.
![Page 12: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/12.jpg)
www.azilen.com 10
13. Click on “Add” button to save the data which help to connect toIBM Bluemix.14. Click on “Deploy” button to connect your device with IBM.
![Page 13: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/13.jpg)
www.azilen.com 11
15. Now your device is connected.
![Page 14: Linking Raspberry PI with our device through IBM Bluemix](https://reader034.vdocuments.mx/reader034/viewer/2022050613/5a649e327f8b9a2c568b6539/html5/thumbnails/14.jpg)
www.azilen.com 12
You can conform the connection status through device listing