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

BLE - advertising and connect

Hi,

I understand that when a peripheral is advertising it is also waiting for connection/scan requests.

Does those requests and responses sent via the same advertising channels (37, 38, 39)?

In addition - which layer converts those outgoing/incoming packets from radio channels to Rx and Tx?

Thanks!

Parents
  • Hello,

    I understand that when a peripheral is advertising it is also waiting for connection/scan requests.

    Does those requests and responses sent via the same advertising channels (37, 38, 39)?

    Yes, this is correct. When the peripheral is advertising as connectable / scannable it will listen for a little period directly following its advertising, to see if it receives a SCAN or CONNECT request.
    This listening period happens on the channel which it just advertised on.

    In addition - which layer converts those outgoing/incoming packets from radio channels to Rx and Tx?

    I am not exactly sure what you mean by this question, could you elaborate?
    The Link Layer (LL) is responsible for establishing and maintaining links, including to send the packets such as when a connection is established, or when a scan request is to be sent.

    Best regards,
    Karl

  • Thanks!

    Yes, I will elaborate - when receiving and transmitting data via Rx and Tx pins, as part of NUS service, I assume that those pins has any connection to the data radio channels which physically send and receive this data. So how this data is converted from Tx to the radio channels, and from the radio channels to Rx?

Reply Children
  • Roei said:
    Thanks!

    No problem at all, I am happy to help!

    Roei said:
    when receiving and transmitting data via Rx and Tx pins, as part of NUS service

    I did not know you were working on the BLE Nordic UART examples, thank you for clarifying.

    Roei said:
    I assume that those pins has any connection to the data radio channels which physically send and receive this data.

    The connection between the physical UART and the SoftDevice's BLE transmission is setup as event handlers. When there is a APP_UART_DATA_READY event the data is queued for sending through the UART event handler. Likewise, the data received over the NUS service is handled in the nus_data_handler function, which outputs the received data on the physical UART TX pin.

    Roei said:
    from Tx to the radio channels

    Please look at the uart_event_handle function in the ble_app_uart example. This function receives data on the physical UART's RX pin, and queues it for sending to a connected device through its call to ble_nus_data_send.

    Roei said:
    from the radio channels to Rx

    Please look at the nus_data_handler function in the ble_app_uart example. It moves the data from the radio RX to the physical UART TX.

    Please do not hesitate to ask if anything still should be unclear!

    Best regards,
    Karl

Related