OTS Peripheral Example Data Reading Issue

I have flashed the OTS peripheral sample on my Nordic nRF52832DK, with my phone (Android - Nordic nRF Connect) I can discover all the services, select objects, etc, but when I try to send the read command through the OACP, I get error 0x06 on the UART of the DK. (according to Service Specification this means Channel Unavailable) am I doing something wrong?
I've already reached out to the Zephyr Discord, they expect that the L2CAP channel is not connect before the client attempts to read the object. They suggested I open a ticket here for more information. Is the example broken or could it be my phone (tested on 2 phones)?

I added the UART logs:

 Booting nRF Connect SDK v2.9.0-7787b2649840 
 Using Zephyr OS v3.7.99-1f8f3dc29142 
Starting Bluetooth Peripheral OTS example
[00:00:00.000,610] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision: 
                                            2d 79 a1 c8 6a 40 b7 3c  f6 74 f9 0b 22 d3 c4 80 |-y..j@.< .t.."...
                                            74 72 82 ba                                      |tr..
[00:00:00.005,004] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.005,035] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.005,065] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 45.41337 Build 3074452168
[00:00:00.006,652] <inf> bt_hci_core: Identity: D7:F8:14:31:71:F6 (random)
[00:00:00.006,683] <inf> bt_hci_core: HCI: version 6.0 (0x0e) revision 0x106b, manufacturer 0x0059
[00:00:00.006,713] <inf> bt_hci_core: LMP: version 6.0 (0x0e) subver 0x106b
Bluetooth initialized
Object with 0x000000000100 ID has been created
Object with 0x000000000101 ID has been created
Advertising successfully started
Connected
Object with 0x000000000100 ID has been selected
[00:00:33.038,055] <wrn> bt_ots: OACP Write error status: 0x06


and the nRF Connect App logs:

nRF Connect, 2025-01-27
Zephyr OTS (D7:F8:14:31:71:F6)
V12:38:18.711Connecting to D7:F8:14:31:71:F6...
D12:38:18.712gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D12:38:18.947[Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I12:38:18.947Connected to D7:F8:14:31:71:F6
V12:38:18.951Discovering services...
D12:38:18.951gatt.discoverServices()
D12:38:18.987[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
D12:38:19.027[Callback] Services discovered with status: 0
I12:38:19.027Services discovered
V12:38:19.032Generic Attribute (0x1801)
- Service Changed [I] (0x2A05)
Client Characteristic Configuration (0x2902)
- Client Supported Features [R W] (0x2B29)
- Database Hash [R] (0x2B2A)
Generic Access (0x1800)
- Device Name [R] (0x2A00)
- Appearance [R] (0x2A01)
- Peripheral Preferred Connection Parameters [R] (0x2A04)
Object Transfer Service (0x1825)
- OTS Feature [R] (0x2ABD)
- Object Name [R W] (0x2ABE)
- Object Type [R] (0x2ABF)
- Object Size [R] (0x2AC0)
- Object ID [R] (0x2AC3)
- Object Properties [R] (0x2AC4)
- Object Action Control Point [I W] (0x2AC5)
Client Characteristic Configuration (0x2902)
- Object List Control Point [I W] (0x2AC6)
Client Characteristic Configuration (0x2902)
D12:38:19.032gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
D12:38:19.034gatt.setCharacteristicNotification(00002ac5-0000-1000-8000-00805f9b34fb, true)
D12:38:19.034gatt.setCharacteristicNotification(00002ac6-0000-1000-8000-00805f9b34fb, true)
I12:38:19.241Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
I12:38:19.343Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 5000ms)
I12:38:20.303PHY updated (TX: LE 2M, RX: LE 2M)
V12:38:21.406Enabling indications for 00002ac6-0000-1000-8000-00805f9b34fb
D12:38:21.406gatt.setCharacteristicNotification(00002ac6-0000-1000-8000-00805f9b34fb, true)
D12:38:21.408gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0200)
I12:38:21.474Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 02-00
A12:38:21.474"Indications enabled" sent
V12:38:21.478Indications enabled for 00002ac6-0000-1000-8000-00805f9b34fb
I12:38:24.103Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 420ms)
V12:38:28.654Writing request to characteristic 00002ac6-0000-1000-8000-00805f9b34fb
D12:38:28.654gatt.writeCharacteristic(00002ac6-0000-1000-8000-00805f9b34fb, value=0x05000100000000)
I12:38:28.692Data written to 00002ac6-0000-1000-8000-00805f9b34fb, value: (0x) 05-00-01-00-00-00-00
A12:38:28.692"(0x) 05-00-01-00-00-00-00" sent
I12:38:28.693Indication received from 00002ac6-0000-1000-8000-00805f9b34fb, value: (0x) 70-05-01
A12:38:28.693"(0x) 70-05-01" received
V12:38:30.758Enabling indications for 00002ac5-0000-1000-8000-00805f9b34fb
D12:38:30.758gatt.setCharacteristicNotification(00002ac5-0000-1000-8000-00805f9b34fb, true)
D12:38:30.760gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0200)
I12:38:30.823Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 02-00
A12:38:30.823"Indications enabled" sent
V12:38:30.827Indications enabled for 00002ac5-0000-1000-8000-00805f9b34fb
V12:38:36.619Writing request to characteristic 00002ac5-0000-1000-8000-00805f9b34fb
D12:38:36.619gatt.writeCharacteristic(00002ac5-0000-1000-8000-00805f9b34fb, value=0x050000000000000032)
I12:38:36.674Data written to 00002ac5-0000-1000-8000-00805f9b34fb, value: (0x) 05-00-00-00-00-00-00-00-32
A12:38:36.674"(0x) 05-00-00-00-00-00-00-00-32" sent
I12:38:36.674Indication received from 00002ac5-0000-1000-8000-00805f9b34fb, value: (0x) 60-05-06
A12:38:36.674"(0x) 60-05-06" received

Parents
  • Hello,

    This is Zephyr's sample and Bluetooth Service implementation. I don't know exactly how it is supposed to work. The thing, however, is that there is no standard implementation of this in phones or computer OSes, so you still need to implement this on the app side. Keeping that in mind, there is not much separating this from e.g. the Nordic UART sample implemenation, other than that the OTS service uses L2CAP directly instead of GAP/GATT/ATT. Since there is very little documentation on this zephyr sample, I am afraid they would need to explain how to use it. 

    It does however seem to be a central OTC (Object Transfer Client) sample in Zephyr. Perhaps you can study this. Unfortunately, the documentation for this is also quite sparse. 

    If it proves difficult, you can probably achieve what you want to do using a custom protocol and e.g. the Nordicu UART Service, and transfer the data in chunks. 

    Best regards,

    Edvin

Reply
  • Hello,

    This is Zephyr's sample and Bluetooth Service implementation. I don't know exactly how it is supposed to work. The thing, however, is that there is no standard implementation of this in phones or computer OSes, so you still need to implement this on the app side. Keeping that in mind, there is not much separating this from e.g. the Nordic UART sample implemenation, other than that the OTS service uses L2CAP directly instead of GAP/GATT/ATT. Since there is very little documentation on this zephyr sample, I am afraid they would need to explain how to use it. 

    It does however seem to be a central OTC (Object Transfer Client) sample in Zephyr. Perhaps you can study this. Unfortunately, the documentation for this is also quite sparse. 

    If it proves difficult, you can probably achieve what you want to do using a custom protocol and e.g. the Nordicu UART Service, and transfer the data in chunks. 

    Best regards,

    Edvin

Children
No Data
Related