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

lte_ble_gateway (nRF9160 DK) with nRF52840 instead of Thingy52

Hi

So I'm trying to adapt the ble_lte_gateway example at my nRF9160 DK but because I don't have  a Thingy52 I have to use an nRF52840 device, so I wanted to try the sample with that device. But I'm having some troubles where to start because the sample is quite specific for Thingy. My starting point was trying to  connect the nRF52 to the application. Only that, get a connection. Check the images bellow please. So, the middle one image is my UUID for nRF52840, and the other ones are the ble.c. From what I understood, the Thingy52 UUIDS are configured at the beginning of ble.c and at  "scan_start" it will start searching only for that UUID? If I'm wrong correct me please. In my head I had to change that UUID values defined at the beginning to mine. But I don't now how I get that advertising UUID from my app. Should I define one at nRF52 and after that add to ble.c? If I'm missing information, provide me with please.

Thanks in advance.

Parents
  • You should add the BT_UUID_THINGY (=0x42, 0x00, 0x74, 0xA9, 0xFF, 0x52, 0x10, 0x9B, 0x33, 0x49, 0x35, 0x9B, 0x00, 0x01, 0x68, 0xEF) to the advertising packet before calling advertising_init() (in the device taking the Thingy:52 role)like it's done here.

    Best regards,

    Simon

  • Hi.

    I tried what you told me, but didn't worked.

    So, since I didn't figured out what was my UUID to advertising, i tried to connect with the service UUID directly.  I tried this one:

    #define BT_UUID_TMS
    BT_UUID_DECLARE_16(0x1620)
    ...
    ...
    ...
    err = bt_scan_filter_add(BT_SCAN_FILTER_TYPE_UUID, BT_UUID_TMS);

    I was able to get connection with both boards. I added some code with leds like If the nrf52 connected to any device, led2 lights up, to see if  I was able to get connection. The LTE Link Monitor also wrote a message saying that I got connected.

    But I tried to alter from the 16 format  to 128 but I couldn't get a connection. I use the UUID base like in the white image upper with the 0x1620.

    #define BT_UUID_TMS                                                            
       BT_UUID_DECLARE_128(0xAA, 0xC2, 0x1B, 0x44, 0xDB, 0xA8, 0x1B, 0x96,         
        0xEE, 0x7F, 0x37, 0x57, 0x16, 0x20, 0x26, 0x2D)

    With that code, couldn't get a connection. At my viewpoint those codes are the same, no? If don't can you help me.

  • Try adding a 128 bits UUID to the advertising packet in the nRF52840 device like Jørgen has done in this ticket. If you want me to create some examples (on both the nRF9160 DK and the nRF52840 DK) that demonstrate this, please tell me.

    Best regards,

    Simon

Reply Children
Related