This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sending data received with BLE scanner to esp32 with uart

Hi everyone. I want to take advertising data with ble scanner and transmit to esp32 via uart. But I don't know how to do this. Is there an example for this? I need your help on this.

Parents
  • Hello sasci,

    Have I understood you correctly that you intend to use a nRF52840 SoC as a scanner device that forwards the advertising reports it finds through to a esp32 module through an UART connection? If so, do you intend this to scan for all devices, or only looking for a specific device?

    If looking for a specific device's advertising you may start out with the BLE APP UART central example, and then use the BLE_GAP_EVT_ADV_REPORT from the filter match to be output on the UART.
    You can re-use the section from the BLE_NUS_C_EVT_NUS_TX_EVT event to print the data to UART.
    You will also need to set connect_if_match to false, if you intend not to connect to a device that matches your scanner filters.

    Best regards,
    Karl

Reply
  • Hello sasci,

    Have I understood you correctly that you intend to use a nRF52840 SoC as a scanner device that forwards the advertising reports it finds through to a esp32 module through an UART connection? If so, do you intend this to scan for all devices, or only looking for a specific device?

    If looking for a specific device's advertising you may start out with the BLE APP UART central example, and then use the BLE_GAP_EVT_ADV_REPORT from the filter match to be output on the UART.
    You can re-use the section from the BLE_NUS_C_EVT_NUS_TX_EVT event to print the data to UART.
    You will also need to set connect_if_match to false, if you intend not to connect to a device that matches your scanner filters.

    Best regards,
    Karl

Children
Related