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

Porting zephyr BT Mesh onoff-app to nrf52840 Dongle

Hi,

I am working on a project using BT Mesh and I am evaluating a prototype using the nrf52840. I am not working with the mesh-SDK, because I am using zephyr. I am working from the onoff-app in the zephyr nrf samples. I was able to compile and flash it (using west without an IDE) on the nRF52840-DK / PCA10056 (and also on nRF52-DK / PCA10040). Now I want to use the nrf52840-Dongle / PCA10059 (we have 20 of those, since we are working with mesh).

I copied and adapted the sample app to work with the dongle (which was basically removing the inputs sw1-sw3). I also included a simple blinking pattern at bootup to see if the firmware is actually booting. If I build the FW for the DK, I can flash it, I see the blinking pattern and I can use Button1 to control the LED on my server-board. So that all works fine. I can also build the FW for the dongle and flash it using `nrfutil`. It shows the LED pattern on boot, so I know the FW is installed and booted. But neither does pressing the button do anything, nor can I find and provision the Device using the nrfMesh app, as I did with the DKs.

What am I missing?

You can see my adaptation at this gist:
https://gist.github.com/kratenko/eb213dbea388035111b772e85e3bbd83

I only modified the main.c (and I changed the project name in CMakeLists.txt to "onoff"), everything else is as in the sample.

I built the FW for the DK using the following commands, and it runs just fine:

west build -b nrf52840dk_nrf52840 onoff
west flash

For the dongle, I did this:

west build -b nrf52840dongle_nrf52840 onoff

nrfutil pkg generate --hw-version 52 --sd-req=0x00 --application build/zephyr/zephyr.hex --application-version 1 dongle.zip

nrfutil dfu usb-serial -pkg dongle.zip -p /dev/ttyACM1

I can confirm that the FW runs by the blinking pattern, but the device cannot be found with the nrfMesh app. I am also sure that the dongle works, as I can use it with nRF Connect "Bluetooth Low Energy" for scanning.

I am working on Ubuntu18 with West version: v0.8.0 and just updated my zephyr checkout.

Parents
  • Hi kratenko,

    I programmed the dongle using Programmer v1.4.7 from nRF Connect v3.6.0, and I was able to see the node in the nRF Mesh app on my Android device. I compiled the app using ncs v1.3.1. The dongle had one green light I was able to toggle this if I clicked multiple times on SW1.

    It is likely that your dongle already is flashed with an MBR and perhaps also a softdevice(like S140).

    The best solution would be to solder the 10 pin connector and erase everything on the dongle. The second best(if you don't want to solder the connector) would be to erase the softdevice and only keep the MBR + bootloader.

    I will get back to you over the weekend with more details.

    Best regards,

    Håkon

  • Hi helsing,

    I have the same problem with my dongle. I programmed the dongle with a ligth switch example and I was able to find the device with the Mesh App. Then, I reset the nodes (a DK and two Dongles) and I could not find any of them. I erased all form the DK and now the mesh app detected it, but I dont know what to do with the Dongles and with the MBR and bootloader. I understand the fact that I have to connect the DK and the dongle throught 10 pin connector in order to erase all the memory, but I dont Know where I cant find the bootloader and the MRB to reload them in the dongle again. ¿Am I correct about your solution? ¿Where can I find the MRB and the bootloader?

    Thanks for your time.

Reply
  • Hi helsing,

    I have the same problem with my dongle. I programmed the dongle with a ligth switch example and I was able to find the device with the Mesh App. Then, I reset the nodes (a DK and two Dongles) and I could not find any of them. I erased all form the DK and now the mesh app detected it, but I dont know what to do with the Dongles and with the MBR and bootloader. I understand the fact that I have to connect the DK and the dongle throught 10 pin connector in order to erase all the memory, but I dont Know where I cant find the bootloader and the MRB to reload them in the dongle again. ¿Am I correct about your solution? ¿Where can I find the MRB and the bootloader?

    Thanks for your time.

Children
Related