<?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>2 x nRF52840 used as client/server to make them communicate through python</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99539/2-x-nrf52840-used-as-client-server-to-make-them-communicate-through-python</link><description>Hi, I&amp;#39;m trying to use two nRF52840 Dongle to make them communicate as server/client with a script in python, I succeeded on making them have a session with the test example given in the pc_ble_driver_py library but now I&amp;#39;m trying to create a script myself</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 31 May 2023 11:01:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99539/2-x-nrf52840-used-as-client-server-to-make-them-communicate-through-python" /><item><title>RE: 2 x nRF52840 used as client/server to make them communicate through python</title><link>https://devzone.nordicsemi.com/thread/428418?ContentTypeID=1</link><pubDate>Wed, 31 May 2023 11:01:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3980612-9a83-4df9-8ce9-315d6070cfd9</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have any examples, but to verify and &amp;quot;visualize&amp;quot;, the behavior, you could use the nRF Sniffer:&amp;nbsp;&lt;a href="https://www.nordicsemi.com/Products/Development-tools/nrf-sniffer-for-bluetooth-le"&gt;https://www.nordicsemi.com/Products/Development-tools/nrf-sniffer-for-bluetooth-le&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 x nRF52840 used as client/server to make them communicate through python</title><link>https://devzone.nordicsemi.com/thread/426656?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 15:50:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:676b54ec-4180-4979-8fe6-11bcbaa64277</guid><dc:creator>Dan_</dc:creator><description>&lt;p&gt;I managed to implement the indicate with&amp;nbsp;a&amp;nbsp;complete session(but without visualizing the ack, any idea on how to do it? ), now I&amp;#39;m trying to use the write function but I have the previous problem.&lt;/p&gt;
&lt;p&gt;Can I ask you to give me an example (based on the &amp;quot;test_server_client.py&amp;quot; file) in which you implement the&amp;nbsp;write with and without ack function (for a complete Central/Peripheral session)?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 x nRF52840 used as client/server to make them communicate through python</title><link>https://devzone.nordicsemi.com/thread/425164?ContentTypeID=1</link><pubDate>Thu, 11 May 2023 15:08:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0f6c766-100e-406b-a24c-25c3b718d31b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Dan_"]What can be very useful is a document with the explanation of the functions that can be used in a python script to setup a connection (with a full session).[/quote]
&lt;p&gt;Much&amp;nbsp;of the terminology and naming of defines, variables, etc is from the SoftDevice, so the SoftDevice documentation could help. E.g. this function.&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.3.0/group___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html?cp=5_7_4_1_2_4_2_4#ga313fe43c2e93267da668572e885945db"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.3.0/group___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html?cp=5_7_4_1_2_4_2_4#ga313fe43c2e93267da668572e885945db&lt;/a&gt;&lt;/p&gt;
[quote user="Dan_"]In&amp;nbsp; test/test_server_client.py(GitHub) it is shown just a notify example but what about indicate[/quote]
&lt;p&gt;In there we have this function,&lt;/p&gt;
&lt;p&gt;def send_data(self, data):&lt;br /&gt; hvx_params = BLEGattsHVXParams(&lt;br /&gt; handle=self.char_handles,&lt;br /&gt; hvx_type=driver.BLE_GATT_HVX_NOTIFICATION,&lt;br /&gt; data=data,&lt;br /&gt; )&lt;br /&gt; self.adapter.driver.ble_gatts_hvx(self.conn_q.get(timeout=2), hvx_params)&lt;/p&gt;
&lt;p&gt;change BLE_GATT_HVX_NOTIFICATION to BLE_GATT_HVX_INDICATION to send indication instead. (But the characteristic need to support it as well)&lt;/p&gt;
&lt;p&gt;For Write we have this function: write_cmd ( def write_cmd(self, conn_handle, uuid, data, attr_handle=None)&lt;br /&gt;For Read we have this function: read_req ( def read_req(self, conn_handle, uuid, offset=0, attr_handle=None)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 x nRF52840 used as client/server to make them communicate through python</title><link>https://devzone.nordicsemi.com/thread/424831?ContentTypeID=1</link><pubDate>Wed, 10 May 2023 12:15:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6477ebbd-13e5-4b02-a3fb-911e990584dc</guid><dc:creator>Dan_</dc:creator><description>&lt;p&gt;Thank you for the answer,&lt;/p&gt;
&lt;p&gt;I have already checked these documents/links but they don&amp;#39;t help much to understand in a good way how to best implement this library, even the &amp;quot;pypi.org/project/pc-ble-driver-py/&amp;quot; page (where usually I can find documentation) is blank.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What can be very useful is a document with the explanation of the functions that can be used in a python script to setup a connection (with a full session).&lt;/p&gt;
&lt;p&gt;In&amp;nbsp; test/test_server_client.py(GitHub) it is shown just a notify example but what about indicate or read/write? How can I use them?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 x nRF52840 used as client/server to make them communicate through python</title><link>https://devzone.nordicsemi.com/thread/424526?ContentTypeID=1</link><pubDate>Tue, 09 May 2023 12:17:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de9f7423-1454-4d83-9859-5a01ae609193</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did you have look at this file?&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver-py/blob/master/pc_ble_driver_py/examples/heart_rate_collector.py"&gt;https://github.com/NordicSemiconductor/pc-ble-driver-py/blob/master/pc_ble_driver_py/examples/heart_rate_collector.py&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Jørgen also created something for nordic uart service here:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/29848/how-to-use-pca10040-as-dongle-scanner/118630"&gt;RE: How to use PCA10040 as Dongle Scanner&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There is not much documentation on this, expect for what&amp;#39;s in the README,&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver-py/blob/master/README.md"&gt;https://github.com/NordicSemiconductor/pc-ble-driver-py/blob/master/README.md&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>