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

i want to send the data to esp8266 via rx,tx

hi...  I am working on nRF52832 . nRF52832 ,RX TX is connected to the esp8266 of tx,rx . i want to send the data from nRF52832 TO ESP8266 via uart . which function can i use ? printf or app_uart_put . how to send ?   my connections    suggest me

nRF52832       esp8266

RX                 TX

TX                 RX

GND             GND 

  • Hi,

    Have you seen the UART example? It demonstrates how to initialize and use UART with your nRF52832 device.
    You may also use app_uart_put, if you have first initialized the UART module, using the app_uart_init function.

    The connections you have written out is correct.

    Best regards,
    Karl

  • i am working on the ble_app_uart example. connections are same as above .if i connect the these pins , my device is not advertising , it becoming freeze condition . why ?

  • Hi,

    This is hard to say, based on the information you have provided.

    Could you tell me the following:
    - Are you working on a development kit? Which pins are you using for your UART?
    - Which SDK version are you using?
    - Do you mean that you are making modifications to the UART example i linked earlier, or that you are using the app_uart library?
    - If you are working out of the ble_uart_example, could you tell me which modifications you have made?
    - What do you mean by freeze condition? Are you able to see where the application freezes?

    Please provide the answers to the aforementioned, so I may better help you.

    Best regards,
    Karl

  • i am working on development kit , i am using same rx and tx pins .. RX 8 PIN , TX 6 pin .  

    sdk 15.2 version.  just i am sending the data to uart using app_uart_put

    static char lora[3]="azi";
    
    
    // in the main loop i am adding the below code 
        while(1)
        {
    
        for(int k=0;k<3;k++)
            {
                  err_code = app_uart_put(lora[k]);
           
    
                }
     printf("\n");
                nrf_delay_ms(500);
                 
                
    }
    

    3. Freezing is the sense , my device is not advertising when i connect this. 

    4. with the same code i worked with arduiino nano is worked fine. 

  • You did not answer whether you are working out of an example or not.
    I highly recommend that you start with an example provided in the SDK, for example the BLE UART example, and make modifications to it as needed.

    ps_anu said:
    just i am sending the data to uart using app_uart_put

    You will need to initialize the UART either way.
    If you want to see the device advertising, then you also need to initialize and enable the radio(which there are no mention of in the code).

    ps_anu said:
    3. Freezing is the sense , my device is not advertising when i connect this. 

    What do you mean by "connect this". Is your device advertising as expected before you make the physical UART hardware connection, but stops once you connect it?
    Please be specific.
    Are you developing using Segger? In that case, you can debug the application by jumping through the code line-by-line. This would highlight where the application stops.

    ps_anu said:
    4. with the same code i worked with arduiino nano is worked fine. 

    What do you mean by this. Do you mean that the code you have posted above works on your other devices?
    Based on the very few lines you posted, all I can say is that you are not initializing the UART(or anything else, for that matter).
    The sparse code you posted will neither compile or run.

    It would be beneficial if you could share the entire source code, so I better can understand where you might be going wrong.

    I am looking forward to resolving this issue together!

    Best regards,
    Karl

Related