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

serial connection between nrf52 & arduino

Hello ,
I m working on project to commande sim868 by serial (send AT Commands),
so for the fisrt i would like to test the serial connection with an arduino to see what it gives 
the sdk is 15.0.0 and nrf52832 , and connect the rx and tx to tx and rx of arduino , i used the uart example(nRF5_SDK_15.0.0_a53641a/examples/peripheral/uart)

I edited the rx and tx app_uart_comm_params_t comm_params {
 15, //RX_PIN_NUMBER 17, //TX_PIN_NUMBER }

It send  UART example started and I am able to see it with the console of the arduino but therese no way to respond from the arduino .
I think im confused with the example so i tested the serial example but nothings happend even if I edite the numbero of rx and tx to my custom pins used.
how this things works , why its everything its hard to see how it works and to use it , even documentation of the examples shows litle texte that work with putty (I test it but it dosent work for me maybe because I have mac ).

  • Hi

    Do you not get anything at all printed on your UART terminal? Are you using a development kit or a custom board for testing (nRF side)? Please check that the UART settings in PuTTY are set correctly, that is:

    • Baud rate: 115.200
    • 8 data bits
    • 1 stop bit
    • No parity
    • HW flow control: None

    Best regards,

    Simon

  • Do you not get anything at all printed on your UART terminal?

    Im talking about arduino console (moniteur serie), putty it dosnet work for me i have a mac 

    Are you using a development kit or a custom board for testing (nRF side)?

    I'm using custom board 
    .
    btw the answer is little bit far from my question : how it works (am i in the good example for my application[controle the gsm/gps sim868 by serial ])


    I just tried putty in my friends laptops nothings happend i cliked on open nothing happend just a blank page
    even if im pressing any letter or digit key on the PC keyboard

  • Hi

    Sorry about the confusion, it seems like I misunderstood your initial question.  So, what you're asking is why you can't see an output on the nRF side of the UART connection when it's connected to an Arduino, correct? The only thing you're able to see is "UART example started"  printed to the Arduino console, correct? That is what's supposed to happen, now you should be able to type stuff on your keyboard and it should be printed to the serial device.

    If the receiving device is able to process the AT commands written, you should be able to use the UART for this purpose.

    The reason you're not seeing anything when using the laptop and PuTTY I'm guessing is because you've set the UART pins to 15 and 17, and these must be set to 8 and 6 in order to print to the COM port.

    Best regards,

    Simon

  • Hello,
    yes that the purpose c send the AT command to the serial By the Nrf . Am not yet able to do that i dont know where is the example or the probleme .



    The reason you're not seeing anything when using the laptop and PuTTY I'm guessing is because you've set the UART pins to 15 and 17, and these must be set to 8 and 6 in order to print to the COM port.

    I just changed 8 and 6 , but nothing happend of course , because whats the relation between 8and 6 pin to the usb serial (COM port). Im seeing a blank page on the putty as my previous reply.

  • Hi

    Sorry, a little mix-up there. Using pins 8 and 6 are what is connected to the COM-port on the DK, but seeing as you're using a custom board, that's likely not the case for you. How is your custom board connected to the computer in your instance? The nRF52832 does not have a USB peripheral, so if you want it to work as a USB device you will have to use a USB-to-UART chip or cable.

    Best regards,

    Simon

Related