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

How to send single bit data from a nrf-51822ek slave on a nrf51822ek-master

Hi, My project is that when a button is pressed on a slave (nrf51822ek), a central (another nrf51822) gets to know which slave has triggered and sends its status 1/0 to a webserver made on php or asp. From this server , data is sent to a mobile app.

i have burnt multilink_peripheral code sample on my slave and multilink_central code sample on my central kit, right now when i connect central to PC, hyperterminal shows "Advertising notification" on button press of slave kit, but what i need on central, is a bit 1/0 that toggles on button press on slave kit. Dongle shows a bit toggling in MCP when a button is pressed but on hyper terminal i am not getting this bit value .

As i am new to hardware therefore it is causing me much difficulties and i have near deadline to meet.

Thank you Any sort of help will be appreciated!

Parents
  • Hi Mohib

    If you have enabled UART debugging on the central by defining the ENABLE_DEBUG_LOG_SUPPORT constant, you should see the peer address when the central connects to the peripheral. It is stored in p_event->event_param.p_gap_param->params.connected.peer_addr. It is printed out in the device_manager_event_handler (main.c file) when the DM_EVT_CONNECTION event is received on the central device.

    I have also managed to print this out on Keil RTT debug, if that is of any interest.

    I have tested this with SDK 8.1 and softdevice S110 8.0.0 and S120 2.0.0

Reply
  • Hi Mohib

    If you have enabled UART debugging on the central by defining the ENABLE_DEBUG_LOG_SUPPORT constant, you should see the peer address when the central connects to the peripheral. It is stored in p_event->event_param.p_gap_param->params.connected.peer_addr. It is printed out in the device_manager_event_handler (main.c file) when the DM_EVT_CONNECTION event is received on the central device.

    I have also managed to print this out on Keil RTT debug, if that is of any interest.

    I have tested this with SDK 8.1 and softdevice S110 8.0.0 and S120 2.0.0

Children
Related