Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to send data to UART for the provisioner example of mesh sdk.

Hi,

I am using nrf17.02 sdk and nrf mesh 5.0 sdk for nrf52832 dev kit.

1) I want to send the data to UART not on RTT while using the mesh example "provisioner" example of mesh sdk in place "meshsdk/example/provisioner". How to procees with it, can anyone help me?

2) I combined uart example of nrf 17.0 sdk with the provisioner example of mesh sdk but not able to receive the data over UART. Is this the right way to do, can i use uart example with the provisioner, if yes then can you please provide me the source code, as for me it is not working, i am not sure if having some issues in combining both the project of both sdks.

3) Can i use the provisioner code for dongle nrf52840(PCA10059) where i want to get data over USB, as it is mentioned in nordic infocenter that we can not. If we can then can you please provide me with required source code.

If anyone can help me, it is very helpful for me to proceed. Can anyone help me with high priority?

Thanks & Regards,

Ela

  • Hi,

    1) I suggest you look at the proximity coexist example you can see how the logging over UART is initialized instead of RTT. Then try to merge this logging functionality over to your application. 

    2) We do have an example in the SDK that combines UART with the light switch example. You can use this as a reference for how you can combine the uart example and the provisioner example. This is not something we have done so you have to try implementing yourself.

    3) Like it is mentioned here, only a few examples supports the dongle but with limited functionalities. It might be possible to modify the example so that it can run on the dongle, I would not recommend using the dongle since it lacks a onboard debugger and only light switch server example has been tested with the dongle.

  • Hi Mttrinh,

    1) I was using coexist example but i am not able to compile the code as throwing some of the errors, i have done the same way it is mentioned in the infocenter for coexist example, but still not able to test the coexist example.

    2) I have tried merging the code, but it did not work for me. I have doubt about logging module, as we do have backend logging too in the sdk. In mesh sdk we are using log.c file for logging via RTT but in nrf sdk we are using backend logging via RTT as in file nrf_backend_rtt.c . As, i want tio use provisioner code of the mesh sdk, which logging shall i used, shall i made changes only in log.c file  or shall i add backend logging via UART. I have tried both but nothing worked, when tried doing changes in log.c file having lot of errors when added backend logging for UART. Can you please help me in achieving this, if possible by providing changes need to be done or added in the provisioner code, it will be of great help.

    Thanks & Regards,

    Ela 

  • Hi Mttrinh,

    I want to know how to send and receive data via serial terminal and initiate the command of scanning the devices in provisioner code. is there any different way to do so. Can we use the same RTT interface that is been already used with existing code examples to send and receive commands as we are doing using RTT. I want to use the same functinality that we rae using by RTT with UART for sending and getting the data .

    Thanks & Regards,

    Ela 

  • Hi,

    1) What kind of errors do you get? You run the example unmodified, correct?

    2) You shouldn't need to add backend logging via UART. I haven't tried to add UART logging to the provisioner example myself, so I would need some time to try this. In the mean time I would suggest you study the proximity coexist example and see how things are done there. 

    Ela said:
    I want to know how to send and receive data via serial terminal and initiate the command of scanning the devices in provisioner code. is there any different way to do so. Can we use the same RTT interface that is been already used with existing code examples to send and receive commands as we are doing using RTT. I want to use the same functinality that we rae using by RTT with UART for sending and getting the data .

    I think it should be possible to do the same with UART, but you have to implement how the received commands are handled yourself. 

  • Hi Mttrinh,

    1) I am getting compiling errors and not able to resolve it, i have used in the same way as mentioned in the infocenter. 

    2) Can you please elaborate about when you mean have to handle how received command is being handled? For example : if i want to send press 1 to initiate the scanning of unprovisioned device as same in provisioner example code and want to send press button 4 to reset all the provisioned nodes using UART. In the existing example code we are sending using RTT same i want to do using UART.What do you mean that handle the received commands. Shall i put uart event handler with the case 1 calling funcciton to scan the unprovisioned nodes and case 4 call function to reset the provisioned node? Can you just help me with this at high priority, it will be very helpful.

    Thanks & Regards,

    Ela  

Related