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

Bluetooth Mesh integration with the NRF9160

Dear Nordic,

I currently have a BlueTooth Mesh product based on the nRF52840. The mesh client connects to a WiFi gateway over a UART. The gateway connects to AWS services via MQTT.

I would like to replace the WiFi gateway with the nRF9160. I recently purchased an nRF9160DK and have been familiarizing myself with the NRF Connect SDK.

The current mesh client and servers are based on the NRF5 SDK and I do not plan to transition them to NRF Connect, yet.

Some easy questions:

  1. The nRF9160DK has an 52840. I assume I can run my current NRF5 mesh client on it and communicate with the 9160 over the UART via AT commands. What is the best sample from the NRF Connect SDK to start with?
  2. Can the Serial LTE Sample run between the 9160 and the 52840 on the NRF9160DK? I assume I can use the AT-MQTT commands between the two devices.
  3. Are there better samples to use as a starting point? I basically want to transmit MQTT commands from the 52840 to the 9160 and have the 9160 pass those up to an AWS endpoint. Piece of cake!

Thanks and regards,

-John

Parents
  • Hi,

     

    The nRF9160DK has an 52840. I assume I can run my current NRF5 mesh client on it and communicate with the 9160 over the UART via AT commands. What is the best sample from the NRF Connect SDK to start with?

     

     The nRF9160 has it's own application processor, and can therefore run it's own application. But, it can also be used as "just" a modem which can be controlled by AT commands by programming the application core with the 'Serial LTE Modem' application. Among the AT commands added by the application are commands for MQTT: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/serial_lte_modem/doc/MQTT_AT_commands.html

     (note that this link takes you to the documentation on the master branch, which has recently been updated to be much more comprehensive. But, if you are using an older NCS version, you might not have all the features)

    Can the Serial LTE Sample run between the 9160 and the 52840 on the NRF9160DK? I assume I can use the AT-MQTT commands between the two devices.

     Yes. However, you will have to change the pins used by the application. There are some information on how to connect to an external MCU (on an external PCB): https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/serial_lte_modem/doc/slm_description.html#connecting-with-an-external-mcu

    If you want to use the nRF52840 on the DK, you should sett CONFIG_SLM_CONNECT_UART_2=y, CONFIG_SLM_GPIO_WAKEUP=y  and CONFIG_SLM_INTERFACE_PIN=22 in the prj.conf file, and change the pins used by UART2 to P0.17, P0.18, P0.19 and P0.21.

    In addition, there are some other things to note: The nRF52840 on the nRF91DK is used to control a set of switches that routs several pins from the nRF9160. You can see what pins on the nRF52840 controls which pins on the nRF9160, and where they can be routed here: https://infocenter.nordicsemi.com/topic/ug_nrf91_dk/UG/nrf91_DK/board_controller.html

    While most of these pins can be routed as you want, you should set P0.24 and P1.12 (both on the nRF52840) high. This will let you use P0.21 between the nRF9160 and the nRF52840, and it will let you take modem traces from the nRF9160 should that become necessary. The rest of the pins I believe you can route as you want, though I have not tested this. You can find what the default board controller firmware does here: https://github.com/nrfconnect/sdk-zephyr/blob/master/boards/arm/nrf9160dk_nrf52840/Kconfig

    In addition, it is worth noting that none of the nRF52840's pins are routed to the headers, and will therefore not be very useful for the application running on the nRF52840.

     

    Are there better samples to use as a starting point? I basically want to transmit MQTT commands from the 52840 to the 9160 and have the 9160 pass those up to an AWS endpoint. Piece of cake!

     It depends a bit on what exactly you want. The SLM application is a general purpose 'send AT commands to the nRF9160 to control it" application. But, you can also split your application in two, and have the LTE/AWS related things on the nRF9160, and the mesh related things on the nRF52840, with an application specific protocol between the two. In that case, aws_iot, mqtt_simple or possibly the asset_tracker might be good starting points.

    Best regards,

    Didrik

Reply Children
No Data
Related