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

Receiving data from Mobile APP

Hi

Firstly i am coming from 8 bit world(PIC and Arduino) and not so good at c programming. ( just writing all code in main and sometimes using function) (not even use pointer much but knowing principle)

But now, i start to work with 32 bit microprocessor and my first training is nrf51822 beacon module. I am trying to figure out this module, i wrote some spi, timer, gpiote application with copying code parts etc. They are working fine for me. (project is pov display with 32 RGB)

But i really screw up Bluetooth part. My problem is, i can't figure out how to make a basic char transfer over mobile app to beacon. I just want to send 'a' and this will blink a led for me on beacon.

In this problem, things i do;

  • Firstly i am using ble_app_uart example and ble_app_blinky example.

  • I wrote a code part that sends char to mobile app from beacon. (the opposite of what i want) i use ble_nus_string_send function for it. I desperately search for ble_nus_string_recieve but.. Nothing

  • I try to use app_uart_get and app_uart_put functions.. to be honest i don't even understand what they did.

To simplfy, i can not receive and handle a character which come from mobile app over bluetooth to NRF51822 Beacon. I try to analysis ble_app_blinky example and can not find the function which is doing recieving procedure from mobile app. Which functions do that job really ?

To be honest i can't analysis examples well. Because they all written in with structs, pointers, callbacks etc. One function always call another or being inside another function as well. I really want to learn writing code like that but i don't know how to deal with this difficulty. So i am open for all guidance.

Thanks.

Related