Communication with nrfCloud from external devices

HI all! 

I've been doing some research on working with nRF Cloud and I have a few questions/clarifications: 

1. In general are you able to drive/control a GPIO pin through a cloud service? I'm already assuming this is a no since these are mostly for collecting and transforming data but just to make sure. 

2. Generally to drive the GPIO NMOS for the nRF91 SiP on the Thingy 91 would be done through an LTE connection, is it possible to do this through creating an external application like an app or website? So you could press a button on this application and that would set the variable assigned to a pin to be set to HIGH and then it drives an LED or whatever would be connected to the GPIO pin?

3. Also if I have my Thingy plugged into the wall to power, I should still be able to use the Serial Monitor application on nRF Connect for Desktop to communicate via AT commands correct?  

I'm trying to gauge the full extent of the GPIO and cloud capabilities associated with the Thingy 91 so advice would be greatly appreciated for a beginner like me :)

Thanks!!

  • Hi Charlie, 

    Any REST client(e.g. nRF Cloud Device management terminal, your own cloud service, postman)--------SendDeviceMessage-----> nRF Cloud ---------MQTT API---------> nRF91 Device

    I was slightly confused when the documentation for this Endpoint but the message path clears that up thank you. 

    When you run Assert Tracker v2 sample, the shell only support AT commands from modem. You need to add codes for GPIO operation when the device receives some specific message you defined for GPIO control.

    So what I would need to do then is add some code to the Asset Tracker to define GPIO control? That means using #include <drivers/gpio.h> correct?

    I can't remember/find where I read it in provided documentation but it had something along the lines of if you want to have access to Cloud capabilities you can have the asset tracker running in the background and then have new code uploaded to do other things but I'm not sure if that even correct/how that would be implemented?

    Thanks!

  • witch_mountain said:

    So what I would need to do then is add some code to the Asset Tracker to define GPIO control? That means using #include <drivers/gpio.h> correct?

    I can't remember/find where I read it in provided documentation but it had something along the lines of if you want to have access to Cloud capabilities you can have the asset tracker running in the background and then have new code uploaded to do other things but I'm not sure if that even correct/how that would be implemented?

    Just share you some idea:

    For GPIO control, you can easily find some sample codes in devzone, or just refer to the AT#XGPIO implementation source codes.

    For the message parsing, let's say you send a message "GPIO HIGHT" from nRF Cloud, add a filer for this command in message receiver codes (it currently prints out all received messages in log) and set GPIO=1 under it.

    Best regards,

    Charlie

  • Gotcha, that makes this a little easier for me as someone who's trying to figure how to begin learning to code with the Thingy!

    One quick question, when you configure the pins how do you differentiate between the GPIO pins on the nRF52 chip and the nRF91 chip? I want to toggle the pins associated with the NMOS transistors so I know they are P0.13-16. so do I just use 13-16 or is there another way to reference them. 

    Thanks!

  • Hi Charlie, 

    I'm in the process of trying to implement a function that lets me read the messages from the nRF Cloud terminal and if I get a certain phrase then I set my GPIO pins to HIGH. I've been looking through the documentation for the Cloud Log and I'm able to find information on how to send messages to the Cloud but I'm not sure where to find more information on receiving information? 

    https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/networking/nrf_cloud_log.html#lib-nrf-cloud-log

    Basically what I'm looking for is being able to read the message content received from the cloud terminal. I am able to tell if I did receive data from the terminal now I want to be able to read and use that information. 

    Do you have any recommendations on where to look?

    Thanks!

Related