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.
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.
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.