Zephyr sample 'peripheral' on nrf52840dk working, nrf52840 dongle not working. Blinky ok for both.

Hi,

I'm using Linux with Visual code extension to compile for both nrf52840DK and nrf52480 dongle and I'm using the programmer in nrfConnect to write to the devices. The 'blinky' sample works fine for both devices but the 'peripheral' sample only works for the development kit (dk). The 'peripheral' dongle memory map looks ok with its mbr and bootloader as expected but the device does not present after programming as /dev/ttyACM0 as the dk does, and as as both dk and dongle do when running blinky.  No apparent errors during build or programming. I've checked the various config files and I can find no apparent significant difference between the 'blinky' and the 'peripheral' samples.  I can switch back to 'blinky' from 'peripheral' on the same dongle and it still works

I'm using Linux v6.2.11, nrf SDK v2.8.0, nrfConnect v5.1.0 and programmer v4.5.0.

Any ideas?

Thanks

John

Parents
  • Hi John, 

    Which exact sample are you refering to as the peripheral sample that is not working? Can you copy-paste the full path to it?

  • Einar,

    There's just a 'peripheral' sample at ../v2.8.0/zephyr/samples/bluetooth/peripheral

    John

  • Hi John,

    I see. The reason you do not see the dongle as a USB device after programing it is that the firmware needs to enable USB for that to be the case (and that is done in the bootloader which is entered when you push the sideways reset button). The DK has an onboard debugger, which which is why you should always see that. This debugger also funcions as a USB-UART bridge, but there is no such feature on the dongle. And as the sample does not configure logging via USB CDC,  you will not see anything.

    You shoudl however see the device advertising if it is working, but that may not be the case as this sample does not explicitly support the dongle (few does, and the dongle is not well suited as a developmednt paltform). You could hook up an external debugger to debug it, though.

    PS: In addition to the nRF52840 dongle being supported in very few samples, the Zephyr samples are also generally not tested by us. The samples under nrf however, are and I would recomend you use those instead when that is possible.

Reply
  • Hi John,

    I see. The reason you do not see the dongle as a USB device after programing it is that the firmware needs to enable USB for that to be the case (and that is done in the bootloader which is entered when you push the sideways reset button). The DK has an onboard debugger, which which is why you should always see that. This debugger also funcions as a USB-UART bridge, but there is no such feature on the dongle. And as the sample does not configure logging via USB CDC,  you will not see anything.

    You shoudl however see the device advertising if it is working, but that may not be the case as this sample does not explicitly support the dongle (few does, and the dongle is not well suited as a developmednt paltform). You could hook up an external debugger to debug it, though.

    PS: In addition to the nRF52840 dongle being supported in very few samples, the Zephyr samples are also generally not tested by us. The samples under nrf however, are and I would recomend you use those instead when that is possible.

Children
  • Einar,

    Thanks for the info on the Zephyr samples.  I wasn't aware there were other samples.

    So presumably the Blinky sample does configure logging via USB CDC (I can see the print messages from the dongle)

    I can see no Bluetooth output from the Dongle running 'peripheral' whereas the dk is fine.

    Thanks for the quick response.

    John

  • Just to finish this off. I only started on this a few days ago and what I hadn't realised is that the compatibility is given in the sample.yaml files in each of the samples directories which, as Einar said, leaves very few samples suitable for the nRF52840, mostly mesh stuff. The compatibilty is picked up by the Visual Code extension but you can ignore this and just select what you want.  This was my mistake.