Issue with Mesh Reconnection

Hello Nordic Engineer,

I successfully controlled the 52840 DK through Mesh using my phone. However, after exiting the app and reopening it, I can no longer control the DK. It seems that the connection with the DK is not established. How can I reconnect to the DK?

The video from 0:40 to 1:18 is the waiting time and can be skipped. In the end, a timeout issue occurs.

Another shorter video makes me feel that devices already added to the Mesh cannot be discovered and displayed on the app page again. However, this is a secondary issue. What I want to solve now is: if either the phone or the DK disconnects, how can I reconnect them?

Thanks

Parents
  • Hi Tony,

    I think this should be as a simple as reconnecting to the proxy node with the button the top right. Does that not work for you? Though I am a bit surprised that it acctually says things like "requesting composition data" if it isn't connected to a node.

    Regards,

    Elfving

  • Hello Elfving,

    Thank you for your reply.

    It should be working now. In Mesh, only the proxy node can connect to the phone. After opening nRF Mesh, there’s a ‘proxy’ option in the tab bar at the bottom. I can choose whether to enable automatic connection. Once I agree, the next time I open the app, it will automatically connect for me.

    I’d like to ask a few questions:

    【1】In Mesh, who decides whether a device (e.g., the 52840 DK) becomes a proxy node or a relay node or other node? Is it the phone app, or is it determined during the device’s program download, where the code can set which type of node the device will become in the future?

    【2】

    In this diagram, there are two proxy nodes. Is it possible for the phone to connect to both proxy nodes simultaneously? (Additional context: My intended design is like the diagram, where the phone only connects to one proxy, and then this proxy spreads the data. Also, I’m the app developer, so theoretically, I should be able to control the connection count to be 1.)

    【3】

    The video previously showed a phone establishing a Mesh with the 52840 DK, and the build configuration was ‘nrf21540dk/nrf52840’. It seems like there’s no issue, but shouldn’t I have selected ‘nrf52840dk/nrf52840’ instead?

    【4】Continuing from question 3, I have two 52840 dongles on hand. So, for the build in VS Code, I should select ‘nrf52840dongle/nrf52840’, right?

    【5】

    I have two 52840 dongles, and I plan to use one of them to implement the Mesh from the previous video with the 52840 DK, but I failed.

    The first screenshot shows that I used to develop with Keil. When I downloaded the BLE Peripheral UART example to the dongle, the phone was able to find the device through the app.

    The second screenshot shows that I erased the program on the dongle and this time used VS Code to download it (I did the same for the 52840 DK previously). The example is the same, but this time the phone can’t find the dongle device. Why is that?

    Thank you

  • tony55723 said:

    It should be working now. In Mesh, only the proxy node can connect to the phone. After opening nRF Mesh, there’s a ‘proxy’ option in the tab bar at the bottom. I can choose whether to enable automatic connection. Once I agree, the next time I open the app, it will automatically connect for me.

    Correct. Proxy is refering to GATT proxy, meaning that it has the part of the BLE stack making it capable of being connected to. Most BLE Mesh nodes don't need this, and your phone isn't a part of the Mesh network, but by conecting to a (any) proxy node you gain access to the network - much like an access point to the internet. 

    tony55723 said:
    In Mesh, who decides whether a device (e.g., the 52840 DK) becomes a proxy node or a relay node or other node? Is it the phone app, or is it determined during the device’s program download, where the code can set which type of node the device will become in the future?

    You configure it.

    tony55723 said:
    In this diagram, there are two proxy nodes. Is it possible for the phone to connect to both proxy nodes simultaneously? (Additional context: My intended design is like the diagram, where the phone only connects to one proxy, and then this proxy spreads the data. Also, I’m the app developer, so theoretically, I should be able to control the connection count to be 1.)

    Hmm.. I am not sure if I see the use-case, but that shouldn't really matter. This is only limited by memory and the maximum connections BLE-wise. So yeah, that should be possible.

    tony55723 said:
    The video previously showed a phone establishing a Mesh with the 52840 DK, and the build configuration was ‘nrf21540dk/nrf52840’. It seems like there’s no issue, but shouldn’t I have selected ‘nrf52840dk/nrf52840’ instead?

    So this board naming-scheme can be a bit confusing. The first word is referring to the name of the board, which could be "nrf52840dk", or "myboardisthebestboard", it doesn't really matter naming-wise. The second word however, is the name of the SoC that is being programmed, and is then a bit limited in regards to what it can be. nrf21540dk/nrf52840 (or nrf21540dk_nrf52840 for NCS versions that do not use Hardware model 2) is then referring to the nRF52840 SoC on the board called nrf21540dk, which is our front-end module board. I assume the guy who selected this had this board. If not, it might happen to work, but he should build for the board he has.

    tony55723 said:
    】Continuing from question 3, I have two 52840 dongles on hand. So, for the build in VS Code, I should select ‘nrf52840dongle/nrf52840’, right?

    Correct.

    tony55723 said:

    I have two 52840 dongles, and I plan to use one of them to implement the Mesh from the previous video with the 52840 DK, but I failed.

    The first screenshot shows that I used to develop with Keil. When I downloaded the BLE Peripheral UART example to the dongle, the phone was able to find the device through the app.

    The second screenshot shows that I erased the program on the dongle and this time used VS Code to download it (I did the same for the 52840 DK previously). The example is the same, but this time the phone can’t find the dongle device. Why is that?

    I believe this issue could be related a previous case I got regarding dongles. Please see my response there.

    Regards,

    Elfving

  • Hello Elfving,

    Thank you for your reply.

    I tried modifying the addresses directly in the partitions.yml file, but the phone still can't find the dongle when scanning.

    Do I need to create a new 'pm_static.yml' file and then copy that address code? I'm sorry, I haven't used VS Code before, and I'm still learning.

    ============================

    I found a problem.

    My initial demonstration showed that the 52840 DK can run Mesh, but after I modified the build settings to change it to 'nrf52840dongle/nrf52840' and then downloaded the program to the 52840 DK, the phone can no longer find the DK when scanning.

  • tony55723 said:

    Do I need to create a new 'pm_static.yml' file and then copy that address code? I'm sorry, I haven't used VS Code before, and I'm still learning.

    Precisely. Though another take-away here is that dongles can be a bit difficult to work with when you are new to NCS etc. I would recommend DKs instead. Though one thing dongles are very good at are being sniffers.

    tony55723 said:
    My initial demonstration showed that the 52840 DK can run Mesh, but after I modified the build settings to change it to 'nrf52840dongle/nrf52840' and then downloaded the program to the 52840 DK, the phone can no longer find the DK when scanning.

    I am not sure if I understand your reasoning here. You should build the project for the hw you have, it won't work otherwise. That is why something built for nrf52840dongle/nrf52840 doesn't work for the DK.

    Regards,

    Elfving

Reply
  • tony55723 said:

    Do I need to create a new 'pm_static.yml' file and then copy that address code? I'm sorry, I haven't used VS Code before, and I'm still learning.

    Precisely. Though another take-away here is that dongles can be a bit difficult to work with when you are new to NCS etc. I would recommend DKs instead. Though one thing dongles are very good at are being sniffers.

    tony55723 said:
    My initial demonstration showed that the 52840 DK can run Mesh, but after I modified the build settings to change it to 'nrf52840dongle/nrf52840' and then downloaded the program to the 52840 DK, the phone can no longer find the DK when scanning.

    I am not sure if I understand your reasoning here. You should build the project for the hw you have, it won't work otherwise. That is why something built for nrf52840dongle/nrf52840 doesn't work for the DK.

    Regards,

    Elfving

Children
Related