hello there,
i am using nrf51422 but dont know how to write a program for uart. i want to send AT commands to Quectel M95 using uart . good help appriciated!!
cheers, Abhijeet
hello there,
i am using nrf51422 but dont know how to write a program for uart. i want to send AT commands to Quectel M95 using uart . good help appriciated!!
cheers, Abhijeet
Hi,
I recommend that you take a look at the UART example in the SDK.
You can find the source code and the project file of the example in the following folder: <SDK_InstallFolder>\examples\peripheral\uart
.
You can download the SDK 12.3 here.
thanks for your reply!!! yes man i have successfully complied and run that program but the program is transmitting and receiving the same thing ..actually i want to interface quectel ec25 withnrf51422 and want to send AT commands for gsm communication between nrf51422 and ec25 modem...but this program is just sending and receiving the same thing i want some reply from that board through ec25 through uart tell what the changes i have to do in this code that you have mentioned earlier.i just want to send something and receive some response ...how to do that using this code? thanks for your help!! your help appreciated!!
cheers, Abhijeet
Are you using a nRF51-DK ? You could also take a look at the ble_app_uart example. In this example you can send and receive commands with the UART controlled by a BLE device. First configure the uart_init() function with the baud_rate and settings you want to use. Everything that the nRF51 receive over UART will be handled in the function uart_event_handle
, and sent over BLE to a BLE central, e.g. your phone. Remember to flash the S130 SoftDevice to the nRF51.
Try to use the nRF-Toolbox app, and the UART app inside the toolbox. Everything you receive over UART will be sent over BLE to your phone. You can also send commands with your phone, that will later be sent over UART to the ec25, in the nus_data_handler()
function.
You can then later modify the uart_event_handle()
function, so that you send AT commands to the ec25 automatically, based on what the ec25 is sending to the nRF51.
hi, Yes i am using nrf51- DK (PCA10028) we tried doing as you suggested but when we connect the TX and RX pins of ec25 the ble is not getting iniated if i change the baudrate to 115200 as my ec25 communicates on that baudrate and also i am getting "start" printed continuosly on termite.
Thanks in advance Abhijeet
The continuously printing of "start", means that the device is restarting. A reset indicates that you are running into the error handler, where the default behavior is to do a reset. You should then debug in order to find the reason for the reset. See this post about debugging.