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

Thingy52 default application pairing method and Bluetooth LE packet size

Hello,

I am currently evaluating Nordic Thingy 52. I am planning to receive the sensor data on my custom BLE application (will be written in C using libbluetooth) running on Xylinx Zynq Zedboard. It will be very helpful to know if the Thingy52's out of the box default application has pairing enabled? The NFC pairing and bluetooth Scan and connect procedures are pretty seamless and difficult to make out if pairing is involved. Please clarify if pairing is involved in the default Thingy 52 application..

Also I would like to know the BLE message size of the BLE sensor data sent from Thingy to android phone. I need to know if our satellite network data packet size is big enough or do I need to handle the Thingy data in multiple packets. 

Thanks,

Vinay

  • Coming from Bluetooth classic, new to BLE, hence these beginner questions... :) Figured out by searching and reading that it is recommended not to use pairing for BLE unless security required. Also figured that Max BLE data size is 20 bytes and the frame 27 bytes and can be extended if required, up to 252 bytes as per Bluetooth Spec.

    Thanks,

    Vinay

  • Is there any tutorial that explains how to interact with thingy52 default application from a custom hardware (like the zedboard I'm using or any custom hardware for that matter)? Will it be possible to send the data I receive from thingy52 to nrfCloud through custom hardware (I plan to use zedboard as the gateway instead of the Android phone) ?

  • Hello,

    First, some clarifications regarding Pairing and Bonding.

    Basically, pairing is the encryption of the connection, while bonding is the process of storing these keys for later use with connections to the same device.

    I'll try to answers your questions, starting with the ones in the original post.

     

    It will be very helpful to know if the Thingy52's out of the box default application has pairing enabled?

     You can download the "SDK for Thingy", which is basically a stripped down version of the SDK, containing only the application (and bootloader) that is preflashed on the Thingy. You can find it here:

    https://www.nordicsemi.com/Software-and-tools/Prototyping-platforms/Nordic-Thingy-52/Download

    Download the file called "Thingysdkv210.zip". Please note that the SES (Segger Embedded Studio) files in this SDK doesn't work, but the Keil projects do (arm5_no_packs).

    By default, the Thingy application does not use pairing nor bonding, but it uses the NFC tag for the phone to connect to the correct device (not sure exactly what it transmits over NFC, but it should be possible to figure out based on the code.

     

    Also I would like to know the BLE message size of the BLE sensor data sent from Thingy to android phone. I need to know if our satellite network data packet size is big enough or do I need to handle the Thingy data in multiple packets. 

     By default all BLE connections enters a connection using packet lengths (MTU) of 20 bytes (20 payload + some headers), while the normal thing is that they later negotiate on a larger MTU, up to 247 bytes (247 payload + some headers).

     

    vinaybondade said:
    Coming from Bluetooth classic, new to BLE, hence these beginner questions... :) Figured out by searching and reading that it is recommended not to use pairing for BLE unless security required. Also figured that Max BLE data size is 20 bytes and the frame 27 bytes and can be extended if required, up to 252 bytes as per Bluetooth Spec.

     Correct. "Not recommended" is strong wording, but it is no point in pairing unless you require to hide the data in the connection. Strictly speaking, pairing will cause some extra packets over the air, consuming a bit more power while the devices are pairing, but I believe this is negligible. If you don't need encryption, it is a matter of whether or not you bother to implement it, really.

     

    vinaybondade said:
    Is there any tutorial that explains how to interact with thingy52 default application from a custom hardware

     Unfortunately, no. I would recommend you to start off with something simpler. I can recommend the ble_app_uart and ble_app_uart_c examples from our "normal SDK". By default, these two will connect to one another. You can start by trying to implement the ble_app_uart_c example on your custom HW. It is only one service and two characteristics, so it is a bit easier. When you have this up and running, you just replace the NUS (Nordic UART Service) with one of the thingy services, and add the rest of the services.

    You can use nRF Connect for Desktop or nRF Connect for Android or iOS to check what services the Thingy uses.

     

    vinaybondade said:
    Will it be possible to send the data I receive from thingy52 to nrfCloud through custom hardware (I plan to use zedboard as the gateway instead of the Android phone) ?

     I am not familiar with the Zedboard, and I don't know what components it holds (what it uses for BLE and what it uses for the Internet Protocol, but there is some nRF Cloud functionality in the nRF Thingy app for Android or iOS. How this translates to your Zedboard I don't know. To be honest, that is not my speciality. In case it is relevant, you can find the source code for the nRF Thingy Android an iOS app here. (use the github link to the right). 

    Hopefully this cleared some of your questions. Let me know if anything was unclear.

    Best regards, 

    Edvin

Related