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

Sending BLE Authentication to Nordic Device (NUS)

I have a device that runs with nRF51 chip with the NRF UART Service (NUS). I have a Raspberry Pi 3 and I want them to communicate.

The device requires an authentication packet that needs to be sent within the 1 second timer after the Nordic Uart Service has started. The sequence is as follows:

  1. Device advertises.
  2. rpi BLE connect request
  3. Both are connected.
  4. Device Nordic UART Service start - Start 1 second disconnection timer (waiting for authentication packet).
  5. At this point, Rpi should send authentication packet.

My question is, how do I send the authentication packet? I understand NUS has UUID, and TX and RX characteristics.

"Nordic UART Service is 6E400001-B5A3-F393-E0A9-E50E24DCCA9E (16-bit offset: 0x0001)." TX Characteristic (UUID: 6E400003-B5A3-F393-E0A9-E50E24DCCA9E) RX Characteristic (UUID: 6E400002-B5A3-F393-E0A9-E50E24DCCA9E)

I am planning to use the gatttool for the BLE communication in the Raspberry Pi Side.

Gatttool needs to know the Characteristic Handles for TX and RX Characteristics so I can read/write commands.

Thanks.

[Update] I have seen this info: maybe this can help image description

  • Hi, Please clarify, what "authentication packet" are you asking about ? Is it bonding request packet or it's a proprietary authentication that the application defines ? I would suggest you to test with the normal BLE NUS first, so you don't have the 1 second timeout limit.

    To be able to know characteristic handles, you need to perform a service discovery. Alternatively, if the attribute table is fixed, you can use other tool to get the handles, and the hard code it into your code. This will save the time to do service discovery, which may exceed the 1 second timeout limit.

Related