This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

lte ble gateway

I have been using nRF9160: LTE Sensor Gateway to send data from nRF52832 to the cloud. The nRF9160 is subscribed to nRF52832 and hence gets updates after every certain period (in this case 4 hours). Now I want to send a comand from the cloud to nRF52832 (through the nRF9160) to get reading from nRF52832 sensor. Does anyone have any idea how to go though this?

Parents
  • Have you first tried getting a reading from the nRF52840 sensor on the 91 DK using NCS (i.e. updating the HCI_UART example to also take a sensor reading)? The 52840 on the nRF91 DK is using the HCI UART example from Zephyr. What kind of sensor do you want to take readings from? You may want to look at one of the sensor samples from zephyr & merge that functionality with the HCI UART example. That way, you will be able to get sensor readings, while still communicating to the nRF9160 & the Thingy:52 via BLE. I would recommend creating a new copy of the HCI_UART example & starting there. There is more documentation here regarding the LTE Sensor Gateway example for your info.

  • I am not sure you understood my question or maybe I misunderstood your answer. 

    This is how my setup is 

    • my nRF52832 is connected to a sensor and takes the reading after every 4 hours. 
    • This reading is sent to nRF9160 (every 4 hours) through bluetooth
    • nRF9160 send this reading to the cloud (every 4 hours)

    all of these works fine. 

    what I am asking is

    • with this same setup, where nRF52832 and nRF9160 are connected by Bluetooth can i send command from the cloud to the nRF52832 through nRF9160? 
    • that command is suppose to wake up the nRF52832 do the measurement and reply to nRF9160
    • as it is now the nRF9160 will send this reading to the cloud.

    in other words can i send command from the cloud to the Bluetooth device which is connected to the cloud through nRF9160? 

    please assist

  • Ok, sorry I misunderstood. Yes, you should be able theoretically do this. We do have a MQTT simple example, which essentially uses the same protocol as the LTE gateway example. With this example, you should be able to send data from your server to the nRF91 DK. Then, you will need to write some code to send the command to the 52840 Bluetooth chip on the 91 DK, which will then relay the message to the nRF52832 connected to the sensor.

    The nRF52832 cannot be put into a deep sleep mode (System Off) & woken up from the 52840 on the 91 DK if that is what you are asking. You can read more about System On & System Off modes here. You could wake up the 52832 every 4 hours or so & then reestablish the connection to the 91 DK 52840.

    I am not too sure about how the cloud side would work. You can take a look at this Youtube video for more info (around 2 min mark). However, the example does not currently work on the newest DK unfortunately. Let me get back to you on this.

  • This is what i am looking for, a MQTT way of sending data from server to the nRF91 DK, and the code to send the command to the 52840 bluetooth chip on the 91 DK, so that in can relay the message to the nRF52832. Do you have such an example?

Reply Children
Related