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

Modifying lte_ble_gateway to connect with nRF52DK

    Hello,

I want to modify the lte_ble_gateway app (nRF connect SDK 1.6.0) to connect with the nRF52DK advertising through the ble_app_uart (nRF 17.0.2) application.  The lte_ble_gateway typically connects with the thingy52 but I wasn't able to find what files were being used to store the attributes to connect to the thingy52.  Is there more information on where these attributes are stored and the protocol used by the lte_ble_gateway app?  How do I go about changing the app to connect and receive data from the nRF52DK ble_app_uart? 

Thanks!

Parents
  • Hello, 

    The nRF9160: LTE Sensor Gateway sample connects to Thingy:52 running its original SW from the Thingy:52-SDK. It will scan for BT_UUID_THINGY matching the Thingy:52 UUID. This is configured in nrf\samples\nrf9160\lte_ble_gateway\src\ble.c

    Kind regards,
    Øyvind

  • Okay, so I wanted to use directed advertising on the peripheral device (nRF52DK using a modified version of the ble_app_uart example from SDK 17.0.2) to connect only to the 9160DK.  From my understanding I need to alter the GAP parameters on the ble_app_uart application to change its method of advertising to directed advertising, and I also need to give it the address of the 9160DK.  I then need to change the advertising UUID on the lte_ble_gateway_ble.c file to match the ble_app_uart application's advertising UUID. Is this correct?

    How do I get the address for the 9160DK to give it to the nRF52DK running the ble_app_uart? 

    How do I change the advertising mode to directed advertising?

    Where do I input the 9160DK's address within the ble_app_uart so that it recognizes it as the client for directed advertising?

  • Have a look at my answer from an earlier case here

    Remember, there are two devices on the nRF9160DK, one being the nRF9160 (cellular LTE device) and the other is the nRF52840 (BLE, board controller).

  • I'm not sure if I'm understanding from that previous case but it looked like the solution was building the central_hids example to the 9160DK_9160ns target.  Does this overwrite the lte_ble_gateway?  I also didn't see an overlay file in the lte_ble_gateway folder so I didn't see how to implement your solution.  I also built the ble_application that I need to connect in the SDK17.0.2 and I don't think it would be trivial to rebuild it on the ncs. 

    The lte_ble_gateway connects to the thingy 52 based on its service and characteristic UUIDs.  Could I just change these UUID to the ble_uart service UUID and RX/TX UUID that ble_app_uart uses?  

    The NUS_BASE_UUID is: 0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E

    and its characteristics are:

    BLE_UUID_NUS_TX_CHARACTERISTIC 0x0003
    BLE_UUID_NUS_RX_CHARACTERISTIC 0x0002

    Can I directly swap the NUS BASE UUID for the BT_UUID_THINGY in the lte_ble_gateway sample for the thingy52 to cause it to detect the nordic uart service?   For instance by changing this code in the ble.c file for lte_ble_gateway: And is there a UUID for the nRF52DK device?  

    /* Thinghy advertisement UUID */
    #define BT_UUID_THINGY                                                         \
    	BT_UUID_DECLARE_128(0x42, 0x00, 0x74, 0xA9, 0xFF, 0x52, 0x10, 0x9B,    \
    			    0x33, 0x49, 0x35, 0x9B, 0x00, 0x01, 0x68, 0xEF)
    
    /* Thingy service UUID */
    #define BT_UUID_TMS                                                            \
    	BT_UUID_DECLARE_128(0x42, 0x00, 0x74, 0xA9, 0xFF, 0x52, 0x10, 0x9B,    \
    			    0x33, 0x49, 0x35, 0x9B, 0x00, 0x04, 0x68, 0xEF)
    
    /* Thingy characteristic UUID */
    #define BT_UUID_TOC                                                            \
    	BT_UUID_DECLARE_128(0x42, 0x00, 0x74, 0xA9, 0xFF, 0x52, 0x10, 0x9B,    \
    			    0x33, 0x49, 0x35, 0x9B, 0x03, 0x04, 0x68, 0xEF)

     I also noticed that the NUS_BASE_UUID is 128 bits but the TX and RX characteristics are in a different format from the characteristics on the ble.c file.  How do I convert the TX/RX characteristics to be compatible in this format?

    And what changes need to be made on the advertising side to allow it to be detected and send data through directed advertising?

  • I'm not sure what happened but it doesn't seem like this ticket will be replied to so I reformatted the info in a new ticket and closed this one.

Reply Children
No Data
Related