<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://test-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>iOS NRF mesh connection handling on app side</title><link>https://test-devzone.nordicsemi.com/f/nordic-q-a/88445/ios-nrf-mesh-connection-handling-on-app-side</link><description>Hi, 
 
 I am developing a react native app with the iOS and Android NRF mesh lbrary. In this app I am handling connection, data receiving on characteristic and sending on write characteristic (after segmenting based on mtu). 
 For Android this was straight</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><lastBuildDate>Tue, 31 May 2022 13:03:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://test-devzone.nordicsemi.com/f/nordic-q-a/88445/ios-nrf-mesh-connection-handling-on-app-side" /><item><title>RE: iOS NRF mesh connection handling on app side</title><link>https://test-devzone.nordicsemi.com/thread/370232?ContentTypeID=1</link><pubDate>Tue, 31 May 2022 13:03:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7f6c8f1-3d68-44e4-b919-52af7cedf640</guid><dc:creator>user79806</dc:creator><description>&lt;p&gt;Thanks a lot Aleksander.&lt;/p&gt;
&lt;p&gt;I may contact again if I run into any issues&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS NRF mesh connection handling on app side</title><link>https://test-devzone.nordicsemi.com/thread/370228?ContentTypeID=1</link><pubDate>Tue, 31 May 2022 13:00:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95549e4f-d8b1-44cf-b254-6cf9cc5ebc47</guid><dc:creator>user3284</dc:creator><description>&lt;p&gt;We&amp;#39;re working on mesh library in Kotlin with API much closer to the iOS version. But it most probably wont be ready this year, and will not be backwards compatible with the current Java version.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS NRF mesh connection handling on app side</title><link>https://test-devzone.nordicsemi.com/thread/370227?ContentTypeID=1</link><pubDate>Tue, 31 May 2022 12:58:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50a62419-38af-4659-bda3-482ccdc8317e</guid><dc:creator>user3284</dc:creator><description>&lt;p&gt;Yes, it is possible, of course. The difference is, that when you&amp;#39;re using GATT Proxy, the mesh data are sent over Mesh Proxy Service, while provisioning over Mesh Provisioning Service. But if you&amp;#39;ll manage to implement it in a single class, that&amp;#39;s ok.&lt;/p&gt;
&lt;p&gt;Also, you may also set the &lt;strong&gt;MeshNetworkManager&lt;/strong&gt; as your bearer&amp;#39;s &lt;strong&gt;dataDelegate&lt;/strong&gt; (so you&amp;#39;ll no have to call `bearerDidReceiveData` method directly) and your bearer as manager&amp;#39;s &lt;strong&gt;transmitter&lt;/strong&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS NRF mesh connection handling on app side</title><link>https://test-devzone.nordicsemi.com/thread/370224?ContentTypeID=1</link><pubDate>Tue, 31 May 2022 12:51:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6941d5b-8ee8-485a-a22b-407f471efee4</guid><dc:creator>user79806</dc:creator><description>&lt;p&gt;Hi Aleksander,&lt;/p&gt;
&lt;p&gt;Looks like ProxyProtocolHandler is exactly what I am looking for. Thanks a lot for that.&lt;/p&gt;
&lt;div&gt;[quote userid="79806" url="~/f/nordic-q-a/88445/ios-nrf-mesh-connection-handling-on-app-side/370206#370206"]Also when starting provisioning it expects a provisioning bearer. Does it not use the&amp;nbsp;MeshNetworkManager.transmitter in that case?&amp;nbsp;[/quote]
&lt;p&gt;I am guessing based on your response the answer to above is it does not use.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Is it possible to have a common bearer object that can be assigned to both MeshNetworkManager.transmitter and provision function. Bearer seems to be extension of Transmitter so I think that should be possible&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to bring the interface as close to android as possible&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS NRF mesh connection handling on app side</title><link>https://test-devzone.nordicsemi.com/thread/370212?ContentTypeID=1</link><pubDate>Tue, 31 May 2022 12:33:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36c7fd0e-0c6f-4888-be3b-dfbbf0408701</guid><dc:creator>user3284</dc:creator><description>&lt;p&gt;The manager gives the whole packet to the transmitter and expects a whole packet when it is received. You have to do the segmentation and slit to MTU-size packets on your own, if you&amp;#39;re using a custom bearer. You may use &lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/0f25a7127d1581d1f81e026742257dc08fa251f7/nRFMeshProvision/Classes/Bearer/GATT/ProxyProtocolHandler.swift#L66"&gt;ProxyProtocolHandler&lt;/a&gt; which can split the data for you, or implement the same functionality on your own.&lt;/p&gt;
&lt;p&gt;The PDU type is what you get from the manager (&lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/0f25a7127d1581d1f81e026742257dc08fa251f7/nRFMeshProvision/Classes/Bearer/Bearer.swift#L87"&gt;link&lt;/a&gt;) when sending data. You have to pass it to the &lt;strong&gt;ProxyProtocolHandler&lt;/strong&gt; &lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/0f25a7127d1581d1f81e026742257dc08fa251f7/nRFMeshProvision/Classes/Bearer/GATT/ProxyProtocolHandler.swift#L85"&gt;here&lt;/a&gt;. The same applies when you receive a packet - you &lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/0f25a7127d1581d1f81e026742257dc08fa251f7/nRFMeshProvision/Classes/Bearer/GATT/ProxyProtocolHandler.swift#L121"&gt;get it from the handler&lt;/a&gt; and have to &lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/0f25a7127d1581d1f81e026742257dc08fa251f7/nRFMeshProvision/Classes/MeshNetworkManager.swift#L301"&gt;pass it to the manager&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When you&amp;#39;re doing a provisioning, you have to pass the &lt;strong&gt;ProvisioningBearer&lt;/strong&gt; to &lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/0f25a7127d1581d1f81e026742257dc08fa251f7/nRFMeshProvision/Classes/MeshNetworkManager.swift#L274"&gt;provision method&lt;/a&gt;. In this bearer object you need to implement sending and receiving data like for normal bearer. This time it is not split into a transmitter and a callback. You still can use &lt;strong&gt;ProxyProvisioningHandler &lt;/strong&gt;class to help you with SAR.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS NRF mesh connection handling on app side</title><link>https://test-devzone.nordicsemi.com/thread/370206?ContentTypeID=1</link><pubDate>Tue, 31 May 2022 12:21:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31967047-5c26-41fe-81f9-55b2db524c97</guid><dc:creator>user79806</dc:creator><description>&lt;p&gt;Hi Aleksander, thank you for a quick reply.&lt;/p&gt;
&lt;p&gt;The links that you shared expect a pdu type. I haven&amp;#39;t&amp;nbsp;used&amp;nbsp;something like that when&amp;nbsp;working with android. Also it doesn&amp;#39;t take mtu size in iOS case so how does it do segmentation?&lt;/p&gt;
&lt;p&gt;Also when starting provisioning it expects a provisioning bearer. Does it not use the&amp;nbsp;MeshNetworkManager.transmitter in that case?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS NRF mesh connection handling on app side</title><link>https://test-devzone.nordicsemi.com/thread/370197?ContentTypeID=1</link><pubDate>Tue, 31 May 2022 11:53:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:885b740d-d4e8-45a3-a143-f2c3e8e5ef7b</guid><dc:creator>user3284</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In the iOS library you don&amp;#39;t have to use &lt;strong&gt;GattBearer&lt;/strong&gt;. The &lt;strong&gt;MeshNetworkManager&lt;/strong&gt; requires settings a &lt;strong&gt;transmitter&lt;/strong&gt; (&lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/0f25a7127d1581d1f81e026742257dc08fa251f7/nRFMeshProvision/Classes/MeshNetworkManager.swift#L56"&gt;link&lt;/a&gt;) object to any &lt;strong&gt;Transmitter&lt;/strong&gt; (you may implement one on your own) and you need to call &lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/0f25a7127d1581d1f81e026742257dc08fa251f7/nRFMeshProvision/Classes/MeshNetworkManager.swift#L301-L308"&gt;bearerDidReceivedData(_:ofType)&lt;/a&gt; when you receive the data for the library to process. Very similar mechanism.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>