<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>openL2CAPChannel fails on iOS - same code works on macOS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40259/openl2capchannel-fails-on-ios---same-code-works-on-macos</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Apr 2020 15:55:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40259/openl2capchannel-fails-on-ios---same-code-works-on-macos" /><item><title>RE: openL2CAPChannel fails on iOS - same code works on macOS</title><link>https://devzone.nordicsemi.com/thread/247626?ContentTypeID=1</link><pubDate>Thu, 30 Apr 2020 15:55:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:608be444-4305-4db5-89e3-c7860b38175c</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/denis"&gt;denis&lt;/a&gt;&amp;nbsp;have you managed to solve that problem? I&amp;#39;m hitting the same Problem.&lt;/p&gt;
&lt;p&gt;Looks like following the spec and just to use PSM in the range of 0x0080 to 0x00FF (see CoreSpec Vol3; Part A, 4.22 Table 4.19) fixes the problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openL2CAPChannel fails on iOS - same code works on macOS</title><link>https://devzone.nordicsemi.com/thread/158071?ContentTypeID=1</link><pubDate>Mon, 19 Nov 2018 20:21:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:715121c5-02b1-4ba0-adb2-e435b25abeca</guid><dc:creator>Juju</dc:creator><description>&lt;p&gt;Ah ok, I thought it was the problem because in my case it removed the warnings you are having when I did that with PSM=0x025.&lt;/p&gt;
&lt;p&gt;However, when using PSM=0x1001 and calling openChannel from iOS, it seems to not even&amp;nbsp;issue a L2CAP channel request to the NRF board. Seems blocked by Core Bluetooth as an invalid PSM value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openL2CAPChannel fails on iOS - same code works on macOS</title><link>https://devzone.nordicsemi.com/thread/158057?ContentTypeID=1</link><pubDate>Mon, 19 Nov 2018 17:42:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed8893a6-9b5a-4fc5-b36e-e02a2e02cf37</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;Hi Juju,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m keeping a strong reference, so don&amp;#39;t think that is the issue here. &amp;nbsp;Also - works consistently&amp;nbsp;with a predefined&amp;nbsp;PSM, just not with the PSM I want to use.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openL2CAPChannel fails on iOS - same code works on macOS</title><link>https://devzone.nordicsemi.com/thread/158056?ContentTypeID=1</link><pubDate>Mon, 19 Nov 2018 17:32:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86d21767-f573-4993-9621-4a99e98a5622</guid><dc:creator>Juju</dc:creator><description>&lt;p&gt;Hi Denis&lt;/p&gt;
&lt;p&gt;I was just having the same problem as you because on iOS side, I was not keeping a strong reference to&amp;nbsp;&lt;/p&gt;
&lt;p class="p1"&gt;the CBL2CAPChannel object&lt;span class="s1"&gt;&amp;nbsp;given by:&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;- (&lt;span class="s1"&gt;void&lt;/span&gt;)peripheral:(&lt;span class="s2"&gt;CBPeripheral&lt;/span&gt; *)peripheral didOpenL2CAPChannel:(&lt;span class="s2"&gt;CBL2CAPChannel&lt;/span&gt; *)channel error:(&lt;span class="s2"&gt;NSError&lt;/span&gt; *)error&lt;/p&gt;
&lt;p class="p1"&gt;Now I will try to send/receive data from it...&lt;/p&gt;
&lt;p class="p1"&gt;Found the trick here:&amp;nbsp;&lt;a href="https://stackoverflow.com/questions/50840365/l2cap-channel-data-transfer/52239966"&gt;stackoverflow.com/.../52239966&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openL2CAPChannel fails on iOS - same code works on macOS</title><link>https://devzone.nordicsemi.com/thread/156921?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 14:36:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19f379ef-d61c-4ea2-96d3-170cb9192404</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;I&amp;#39;m using the latest nRF5 SDK 15.2.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openL2CAPChannel fails on iOS - same code works on macOS</title><link>https://devzone.nordicsemi.com/thread/156806?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 08:20:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f59f1c12-2236-4406-b4ea-d003d3601d88</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Hey Denis,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I need to compile your project, what SDK are you using?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Cheers,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openL2CAPChannel fails on iOS - same code works on macOS</title><link>https://devzone.nordicsemi.com/thread/156371?ContentTypeID=1</link><pubDate>Wed, 07 Nov 2018 17:33:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbcb919e-b205-4fe5-af40-3bd3483606a2</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;If I change the PSM from 0x1001 to 0x25 then iOS does open the connection, but also issues some warnings:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;2018-11-07 11:27:01.654639-0600 Simple Bluetooth iOS[13373:9843832] didOpenL2CAPChannel Optional(&amp;lt;CBL2CAPChannel: 0x28336c4b0 peer = &amp;lt;CBPeripheral: 0x280c24820, identifier = 5DEE8C89-16AF-356F-A0CA-B3C7D810E4E3, name = Firefly, state = connected&amp;gt;, psm = 37&amp;gt;) error: nil&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;2018-11-07 11:27:01.681656-0600 Simple Bluetooth iOS[13373:9843832] [CoreBluetooth] WARNING: Unknown error: 436&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;2018-11-07 11:27:01.682131-0600 Simple Bluetooth iOS[13373:9843832] [CoreBluetooth] No known channel matching peer &amp;lt;CBPeripheral: 0x280c24820, identifier = 5DEE8C89-16AF-356F-A0CA-B3C7D810E4E3, name = Firefly, state = connected&amp;gt; with psm 37&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>