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

Advertising and scanning on same dev kit

I want to scan the packet coming from phone and then advertise the characteristic data.How do I do it. Can you suggest the code that implements this functionality. In multirole lesc example,I have added external micro-ecc library but it still gives the error and for relay example it shows code size exceeding. Any suggestions and input are welcomed.

Parents
  • I would recommend splitting up the tasks. For scanning I would recommend looking at ble_app_uart_c in the ble_central folder. Try and see if you can get any BLE_GAP_EVT_ADV_REPORT events, and if you can extract the advertising data.

    When you are able to do that you can have a look at one of the examples in the ble_peripheral folder. And see if you can put in custom data in the advertisement.

    Or you can have a look at the ble_central_and_peripheral\experimental\ble_app_hrs_rscs_relay example, which implements central and peripheral.

Reply
  • I would recommend splitting up the tasks. For scanning I would recommend looking at ble_app_uart_c in the ble_central folder. Try and see if you can get any BLE_GAP_EVT_ADV_REPORT events, and if you can extract the advertising data.

    When you are able to do that you can have a look at one of the examples in the ble_peripheral folder. And see if you can put in custom data in the advertisement.

    Or you can have a look at the ble_central_and_peripheral\experimental\ble_app_hrs_rscs_relay example, which implements central and peripheral.

Children
No Data
Related