central_uart on nrf52832DK and ble data forwarder on Thingy52 can not connect

Hi,

I am testing the sample "machine learning"  (from the template nrf/applications/machine_learning) on Thing52. And connect the Thingy52 to the central_uart on nrf52DK_52832 to stream the sensor data. 

If I build these programs on the nrf SDK v1.8.0, there is no issue of the connection.

However, if I build with the SDK from v2.0.0 or higher, then the Thingy52 and nrf52DK are able to connect only once after flashing. Then if I turn off one of the devices and turn it on again, none of them can be connected again. The only way to make them be connectable again is by "erasing all memory and re-flashing the program".

Can you help me to solve this?

Thanks

Parents
  • Hello,

    Did you investigate whether the peripheral (thingy) is advertising at all? Do you see it from your phone using nRF Connect for iOS/Android? Do you see it using nRF Connect for Desktop -> Bluetooth Low Energy?

    I tried to reproduce what you are saying, but I don't know if they are ever properly connected. Is this what you see on your log from the nRF52dk?

    If not, what do you see the first time when they connect, and what do you see the second time?

    And does the log from the thingy print anything useful either the first time or the second time?

    Best regards,

    Edvin

  • Hi Edvin,

    I found that the LOG_XXX functions are blocked due to some conflict inside the compiler so I could not trace the LOG.

    To connect the 2 devices for the first time, I must do some tricks to make them connected.

    - After programming 2 devices with erase all memory mode, turn the nrfDK52 board off, switch Thingy52 off and on, then turn it to transferring data mode (hold button 5s), then turn on the nrfDK52, they will connect and transfer data (LED flash quickly in red). But sometimes they don't and I have no clue.

    - For connecting to other devices, I also tested Thingy52 with the nrfConnect app on an Android phone. As long as it has not been connected to the nrfDK52 to transfer data, the app can connect to Thingy, even when you turn on/off Thingy.

    But if Thingy connects to nrfDK52 for transferring data and then disconnects, then the phone app can not connect to it.

    I also checked the advertising of Thingy using the app. For both the connectable and non-connectable cases (and nrfDK52 board is off), I could find the Thingy advertised.

    I think maybe Thingy and nrf52DK board has locked some kind of address or security things in non-volatile memory so they can not connect to others. Looking at the Flash size of the program built by SDK 2.0, it is much larger than the SDK 1.8, maybe it leads to some variables saved in wrong places. Just my guess!!!

    Hope it help.

Reply
  • Hi Edvin,

    I found that the LOG_XXX functions are blocked due to some conflict inside the compiler so I could not trace the LOG.

    To connect the 2 devices for the first time, I must do some tricks to make them connected.

    - After programming 2 devices with erase all memory mode, turn the nrfDK52 board off, switch Thingy52 off and on, then turn it to transferring data mode (hold button 5s), then turn on the nrfDK52, they will connect and transfer data (LED flash quickly in red). But sometimes they don't and I have no clue.

    - For connecting to other devices, I also tested Thingy52 with the nrfConnect app on an Android phone. As long as it has not been connected to the nrfDK52 to transfer data, the app can connect to Thingy, even when you turn on/off Thingy.

    But if Thingy connects to nrfDK52 for transferring data and then disconnects, then the phone app can not connect to it.

    I also checked the advertising of Thingy using the app. For both the connectable and non-connectable cases (and nrfDK52 board is off), I could find the Thingy advertised.

    I think maybe Thingy and nrf52DK board has locked some kind of address or security things in non-volatile memory so they can not connect to others. Looking at the Flash size of the program built by SDK 2.0, it is much larger than the SDK 1.8, maybe it leads to some variables saved in wrong places. Just my guess!!!

    Hope it help.

Children
No Data
Related