send and receive data over BLE

Rahul patel gravatar image

asked 2017-12-16 06:15:23 +0100

updated 2017-12-16 06:40:01 +0100

hello sir, i am using ble mpu example and it working fine now i want do send some commands from mobile to nrf52832 chip via these commands my application should work.

like if i send command "ON" through mobile then application should work, if i send command "OFF" through mobile then application should stop.

how can i do that, one thing i saw that NUS(nordic Uart service) in NUS service i can handle data coming from mobile to nrf52832 but i don't know how to continous data to mobile.

i tried to merge NUS service with BLE mpu example and it is not showing any error or warning. after adding NUS service bluetooth device was hidden. i was unable to resolve what was the problem.

so please tell what is the best possible way to send and receive data using from nrf52832 to mobile and vice versa.

i am using keil, nrf52 DK, sdk11, s132.

edit retag flag offensive close delete report spam

Comments

Hi,

It sounds like NUS is the way to go. I'm not sure if I understand your problem, but if your device doesn't advertise it is pretty likely that your code has asserted and ended up in an endless while loop or is continuously resetting itself. When you merged NUS into your application, did you remember to check all return codes of your function calls with for example APP_ERROR_CHECK()? Have you debugged like this?

Martin Børs-Lind ( 2017-12-18 12:25:02 +0100 )editconvert to answer

thank you sir for your reply. i am checking this and give you the correct info. what actually happening

Rahul ( 2017-12-18 14:40:10 +0100 )editconvert to answer