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

Problem connecting to OTS example from nrf connect on phone

Hi, I'm having issues connecting to the ble_app_ots example application from the nrf connect phone app. I have attached a trace from wireshark, and for comparison what it looks like when connecting to the Nordic Uart Service (NUS). It looks like the response differs between OTS and NUS after the LL_FEATURE_REQ and after the master sends LL_LENGTH_REQ nothing happens for 40 seconds and then I get GATT CONN LMP TIMEOUT when looking in the log on the nrf connect app.

I would have thought that I should be able to connect and explore characteristics even if the OTS l2cap channel is not present on the nrf connect app, but maybe I'm mistaken there?

Any input on what I'm missing and that makes the behaviour differ between OTS and NUS when connecting would be much appreciated.

Kind regards

ozh

No.     Time           Source                Destination           Protocol Length Info
   5465 105.698317     65:bf:a3:e7:7f:32     e8:44:d8:19:ad:7f     LE LL    60     CONNECT_REQ

Frame 5465: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer

No.     Time           Source                Destination           Protocol Length Info
   5466 105.708927     Master_0x783cd427     Slave_0x783cd427      LE LL    35     Control Opcode: LL_FEATURE_REQ

Frame 5466: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer

No.     Time           Source                Destination           Protocol Length Info
   5469 105.779821     Slave_0x783cd427      Master_0x783cd427     LE LL    35     Control Opcode: LL_FEATURE_RSP

Frame 5469: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer

No.     Time           Source                Destination           Protocol Length Info
   5470 105.814756     Master_0x783cd427     Slave_0x783cd427      LE LL    35     Control Opcode: LL_LENGTH_REQ

Frame 5470: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer
No.     Time           Source                Destination           Protocol Length Info
   9961 184.766929     73:fd:ca:94:95:74     e8:44:d8:19:ad:7f     LE LL    60     CONNECT_REQ

Frame 9961: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer

No.     Time           Source                Destination           Protocol Length Info
   9962 184.772715     Master_0x1ab5a9e3     Slave_0x1ab5a9e3      LE LL    35     Control Opcode: LL_FEATURE_REQ

Frame 9962: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer

No.     Time           Source                Destination           Protocol Length Info
   9963 184.774015     Slave_0x1ab5a9e3      Master_0x1ab5a9e3     ATT      33     Rcvd Exchange MTU Request, Client Rx MTU: 247

Frame 9963: 33 bytes on wire (264 bits), 33 bytes captured (264 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer
Bluetooth L2CAP Protocol
Bluetooth Attribute Protocol

No.     Time           Source                Destination           Protocol Length Info
   9964 184.842795     Master_0x1ab5a9e3     Slave_0x1ab5a9e3      ATT      33     Sent Exchange MTU Response, Server Rx MTU: 247

Frame 9964: 33 bytes on wire (264 bits), 33 bytes captured (264 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer
Bluetooth L2CAP Protocol
Bluetooth Attribute Protocol

No.     Time           Source                Destination           Protocol Length Info
   9965 184.843891     Slave_0x1ab5a9e3      Master_0x1ab5a9e3     LE LL    35     Control Opcode: LL_FEATURE_RSP

Frame 9965: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer

No.     Time           Source                Destination           Protocol Length Info
   9966 184.844648     Master_0x1ab5a9e3     Slave_0x1ab5a9e3      ATT      37     Sent Read By Group Type Request, GATT Primary Service Declaration, Handles: 0x0001..0xffff

Frame 9966: 37 bytes on wire (296 bits), 37 bytes captured (296 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer
Bluetooth L2CAP Protocol
Bluetooth Attribute Protocol

No.     Time           Source                Destination           Protocol Length Info
   9967 184.863808     Master_0x1ab5a9e3     Slave_0x1ab5a9e3      ATT      37     Sent Read By Group Type Request, GATT Primary Service Declaration, Handles: 0x0001..0xffff

Frame 9967: 37 bytes on wire (296 bits), 37 bytes captured (296 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer
Bluetooth L2CAP Protocol
Bluetooth Attribute Protocol

No.     Time           Source                Destination           Protocol Length Info
   9969 184.865618     Master_0x1ab5a9e3     Slave_0x1ab5a9e3      LE LL    35     Control Opcode: LL_LENGTH_REQ

Frame 9969: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer

No.     Time           Source                Destination           Protocol Length Info
   9970 184.934204     Master_0x1ab5a9e3     Slave_0x1ab5a9e3      LE LL    35     Control Opcode: LL_LENGTH_REQ

Frame 9970: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer

No.     Time           Source                Destination           Protocol Length Info
   9971 184.935265     Slave_0x1ab5a9e3      Master_0x1ab5a9e3     LE LL    35     Control Opcode: LL_LENGTH_REQ

Frame 9971: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer

No.     Time           Source                Destination           Protocol Length Info
   9974 184.955698     Slave_0x1ab5a9e3      Master_0x1ab5a9e3     ATT      44     Rcvd Read By Group Type Response, Attribute List Length: 2, Generic Access Profile, Generic Attribute Profile

Frame 9974: 44 bytes on wire (352 bits), 44 bytes captured (352 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer
Bluetooth L2CAP Protocol
Bluetooth Attribute Protocol

No.     Time           Source                Destination           Protocol Length Info
   9975 184.956372     Master_0x1ab5a9e3     Slave_0x1ab5a9e3      LE LL    35     Control Opcode: LL_LENGTH_RSP

Frame 9975: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer

No.     Time           Source                Destination           Protocol Length Info
   9976 185.022068     Master_0x1ab5a9e3     Slave_0x1ab5a9e3      LE LL    35     Control Opcode: LL_LENGTH_RSP

Frame 9976: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer

No.     Time           Source                Destination           Protocol Length Info
   9977 185.023045     Slave_0x1ab5a9e3      Master_0x1ab5a9e3     LE LL    35     Control Opcode: LL_LENGTH_RSP

Frame 9977: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer

No.     Time           Source                Destination           Protocol Length Info
   9978 185.023935     Master_0x1ab5a9e3     Slave_0x1ab5a9e3      ATT      37     Sent Read By Group Type Request, GATT Primary Service Declaration, Handles: 0x000b..0xffff

Frame 9978: 37 bytes on wire (296 bits), 37 bytes captured (296 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer
Bluetooth L2CAP Protocol
Bluetooth Attribute Protocol

No.     Time           Source                Destination           Protocol Length Info
   9979 185.042930     Master_0x1ab5a9e3     Slave_0x1ab5a9e3      ATT      37     Sent Read By Group Type Request, GATT Primary Service Declaration, Handles: 0x000b..0xffff

Frame 9979: 37 bytes on wire (296 bits), 37 bytes captured (296 bits) on interface 0
Nordic BLE Sniffer
Bluetooth Low Energy Link Layer
Bluetooth L2CAP Protocol
Bluetooth Attribute Protocol

Parents
  • Hello,

    Just a note: The next time you want to send a sniffer trace, export it/save it as a .pcapng file, and attach it here. The lines that you provided here doesn't give any information.

    However, I tested the OTS example, and it is correct as you say that it doesn't properly connect. The issue is that it doesn't handle the data length update requests that the phone sends.

    I tweaked the example by adding a few things to main.c, and changing a few things in sdk_config.h. I also added nrf_ble_gatt.c and nrf_ble_gatt.h to the project. I zipped it and attached it here. The modifications I did was done in the keil project, but I believe you only need to add those two files, in order to compile. Apart from that, only main.c and sdk_config.h are changed.

    I have reported this bug internally. Thank you for the feedback!

    ble_app_ots.zip

    Best regards,

    Edvin

Reply Children
No Data
Related