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

openL2CAPChannel fails on iOS - same code works on macOS

Attached is a nRF52840-DK project and an Xcode project with iOS and macOS targets.  When I run on macOS the L2CAP channel is opened.  When I run on iOS the L2CAP is not opened.  Any ideas on why this might be?  Anyone know of iOS working with nRF5 L2CAP examples?

Simple Bluetooth.zip

Parents
  • If I change the PSM from 0x1001 to 0x25 then iOS does open the connection, but also issues some warnings:

    2018-11-07 11:27:01.654639-0600 Simple Bluetooth iOS[13373:9843832] didOpenL2CAPChannel Optional(<CBL2CAPChannel: 0x28336c4b0 peer = <CBPeripheral: 0x280c24820, identifier = 5DEE8C89-16AF-356F-A0CA-B3C7D810E4E3, name = Firefly, state = connected>, psm = 37>) error: nil

    2018-11-07 11:27:01.681656-0600 Simple Bluetooth iOS[13373:9843832] [CoreBluetooth] WARNING: Unknown error: 436

    2018-11-07 11:27:01.682131-0600 Simple Bluetooth iOS[13373:9843832] [CoreBluetooth] No known channel matching peer <CBPeripheral: 0x280c24820, identifier = 5DEE8C89-16AF-356F-A0CA-B3C7D810E4E3, name = Firefly, state = connected> with psm 37

Reply
  • If I change the PSM from 0x1001 to 0x25 then iOS does open the connection, but also issues some warnings:

    2018-11-07 11:27:01.654639-0600 Simple Bluetooth iOS[13373:9843832] didOpenL2CAPChannel Optional(<CBL2CAPChannel: 0x28336c4b0 peer = <CBPeripheral: 0x280c24820, identifier = 5DEE8C89-16AF-356F-A0CA-B3C7D810E4E3, name = Firefly, state = connected>, psm = 37>) error: nil

    2018-11-07 11:27:01.681656-0600 Simple Bluetooth iOS[13373:9843832] [CoreBluetooth] WARNING: Unknown error: 436

    2018-11-07 11:27:01.682131-0600 Simple Bluetooth iOS[13373:9843832] [CoreBluetooth] No known channel matching peer <CBPeripheral: 0x280c24820, identifier = 5DEE8C89-16AF-356F-A0CA-B3C7D810E4E3, name = Firefly, state = connected> with psm 37

Children
No Data
Related