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

Mesh and Serial Port at the same time?

Hello,

i was wondering if it is possible to have a node in a mesh, that is communicating to a PC via a COM-Port. I know it is possible to communicate via the J-Link Debugger, but could you also use the nRF-USB Port?

I tried to merge the light_switch example with the usbd_cdc_acm example, but I ran into an error in the app_usbd_init function. It had to do with the softdevice being present. I managed to get rid of it, by disabling it before and re-enabling it after. This doesn't seem like a "clean" solution and i am getting a new error within the  mesh_provisionee_prov_start function, but I can't track it down [Errorcode 108].

Cheers,

Kilian

Parents
  • Hi Kilian, 

    Could you let me know what kind of communication you want to have with PC ? Is it just some custom data or logging or you want to control mesh operation from PC ? 

    If you want to do mesh operations, you can have a look at the serial interface as described here. It's not USBD but it's a good start to test with real UART first. 

    Your next step is to convert that into USBD CDC UART. 

    If you simply want to use the USBD CDC, you can have a look at usbd_ble_uart example we have. There we have USBD and Softdevice at the same time. 
    If you still have the error, you may want to step into the code and check which error code is throwing out. 

Reply
  • Hi Kilian, 

    Could you let me know what kind of communication you want to have with PC ? Is it just some custom data or logging or you want to control mesh operation from PC ? 

    If you want to do mesh operations, you can have a look at the serial interface as described here. It's not USBD but it's a good start to test with real UART first. 

    Your next step is to convert that into USBD CDC UART. 

    If you simply want to use the USBD CDC, you can have a look at usbd_ble_uart example we have. There we have USBD and Softdevice at the same time. 
    If you still have the error, you may want to step into the code and check which error code is throwing out. 

Children
No Data
Related