<?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>How to advertise with specific 128bit uuid by pc-ble-driver-py?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94570/how-to-advertise-with-specific-128bit-uuid-by-pc-ble-driver-py</link><description>Hi, 
 I have met a problem that I try to advertise nRF52840 dongle in pc-ble-driver-py. However, connection is not built from this command: 
 
 The uuid is uart over ble which is used in nRFConnect desktop. And we can connect through this application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Dec 2022 05:37:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94570/how-to-advertise-with-specific-128bit-uuid-by-pc-ble-driver-py" /><item><title>RE: How to advertise with specific 128bit uuid by pc-ble-driver-py?</title><link>https://devzone.nordicsemi.com/thread/399815?ContentTypeID=1</link><pubDate>Fri, 09 Dec 2022 05:37:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1153afc-4563-47da-90a6-2416398a7547</guid><dc:creator>zhaoyuan</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;I reverse the uuid and it works. Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to advertise with specific 128bit uuid by pc-ble-driver-py?</title><link>https://devzone.nordicsemi.com/thread/399412?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 12:54:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc698434-05aa-403d-8569-9a21074bf4f3</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Looks correct to me. Note that it&amp;#39;s displayed in the reverse order v.s. how it&amp;#39;s defined in&amp;nbsp;BLEUUIDBase (this is expected)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to advertise with specific 128bit uuid by pc-ble-driver-py?</title><link>https://devzone.nordicsemi.com/thread/399394?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 11:46:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09d42ac7-9836-471a-a5a2-223dee4b86ce</guid><dc:creator>zhaoyuan</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t get any error. But the uuid has not changed, which can be seen in complete list of 128-bit service uuids.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/IMG_5F00_20221206_5F00_175517.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to advertise with specific 128bit uuid by pc-ble-driver-py?</title><link>https://devzone.nordicsemi.com/thread/399393?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 11:43:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:098c87ac-0c1e-4707-b11d-9768c433736b</guid><dc:creator>Sigurd</dc:creator><description>[quote user="zhaoyuan"]This&amp;nbsp;function &lt;span&gt;self&lt;/span&gt;.adapter.driver.ble_vs_uuid_add still doesn&amp;#39;t work.[/quote]
&lt;p&gt;What do you mean by &amp;quot;doesn&amp;#39;t work&amp;quot;? Are you getting any errors?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to advertise with specific 128bit uuid by pc-ble-driver-py?</title><link>https://devzone.nordicsemi.com/thread/399341?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 08:50:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:841600cc-0934-4325-9bb1-db408a6b8ec1</guid><dc:creator>zhaoyuan</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;This&amp;nbsp;function &lt;span&gt;self&lt;/span&gt;.adapter.driver.ble_vs_uuid_add still doesn&amp;#39;t work. Maybe the difference is that I use nRF52840 as slave by adveristing it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;class HRCollector(BLEDriverObserver, BLEAdapterObserver):
    def __init__(self, adapter):
        super(HRCollector, self).__init__()
        self.adapter = adapter
        self.conn_q = Queue()
        self.adapter.observer_register(self)
        self.adapter.driver.observer_register(self)
        self.adapter.default_mtu = 250
        from pc_ble_driver_py.ble_driver import BLEUUIDBase
        self.nus_base = BLEUUIDBase([
            0x6e, 0x40, 0x00, 0x00, 0xb5, 0xa3, 0xf3, 0x93, 0xe0, 0xa9, 0xe5, 0x0e, 0x24, 0xdc, 0xca, 0x9e
        ])

    def open(self):

        self.adapter.driver.open()
        if config.__conn_ic_id__.upper() == &amp;quot;NRF51&amp;quot;:
            self.adapter.driver.ble_enable(
                BLEEnableParams(
                    vs_uuid_count=1,
                    service_changed=0,
                    periph_conn_count=0,
                    central_conn_count=1,
                    central_sec_count=0,
                )
            )
        elif config.__conn_ic_id__.upper() == &amp;quot;NRF52&amp;quot;:

            gatt_cfg = BLEConfigConnGatt()
            gatt_cfg.att_mtu = self.adapter.default_mtu
            gatt_cfg.tag = CFG_TAG
            self.adapter.driver.ble_cfg_set(BLEConfig.conn_gatt, gatt_cfg)

            self.adapter.driver.ble_enable()
            self.adapter.driver.ble_vs_uuid_add(self.nus_base)
        from pc_ble_driver_py.ble_driver import BLEUUIDBase
        # BASE_UUID = [0x6E, 0x40, 0x00, 0x01, 0xB5, 0xA3, 0xF3, 0x93,
        #                          0xE0, 0xA9, 0xE5, 0x0E, 0x24, 0xDC, 0xCA, 0x9E]
        # adv_data = BLEAdvData(service_128bit_uuid_complete=BASE_UUID)
        adv_data = BLEAdvData(complete_local_name=&amp;quot;pc_ble_driver_py&amp;quot;)
        self.adapter.driver.ble_gap_adv_data_set(adv_data)

        self.adapter.driver.ble_gap_adv_start()
        scan_duration = 60
        try:
            new_conn = self.conn_q.get(timeout=scan_duration)
            self.adapter.enable_notification(
                new_conn, BLEUUID(Uart_Tx_uuid), uart_tx_handle
            )
            return new_conn
        except Empty:
            print(f&amp;quot;No heart rate collector advertising with name {TARGET_DEV_NAME} found.&amp;quot;)
            return None
        # return None

    def close(self):
        self.adapter.driver.close()

    def on_gap_evt_connected(
        self, ble_driver, conn_handle, peer_addr, role, conn_params
    ):
        print(&amp;quot;New connection: {}&amp;quot;.format(conn_handle))
        self.conn_q.put(conn_handle)

&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to advertise with specific 128bit uuid by pc-ble-driver-py?</title><link>https://devzone.nordicsemi.com/thread/399204?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2022 13:23:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a951a1f-2fb2-49f1-859f-80e3dd56ea32</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This post might be helpful to solve this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/70137/adding-custome-characterstics-using-pc-ble-driver-py"&gt;Adding custome characterstics using pc-ble-driver-py&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to advertise with specific 128bit uuid by pc-ble-driver-py?</title><link>https://devzone.nordicsemi.com/thread/399135?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2022 09:59:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7a02e5a-f336-49f7-8149-659f5355cb68</guid><dc:creator>zhaoyuan</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/IMG_5F00_20221206_5F00_175517.jpg" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I find that this code can not change the complete list of 128-bit service uuids. Is there any function which can change the uuid of the advertising device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>