<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[BLE connection issue]]></title><description><![CDATA[<p dir="auto">I'm using a FiPy sitting on the PyTrack. I have updated all devices to their newest firmware version.  I'm using the Bluetooth example from Github.  I am some times (completely at random) able to connecto to a BLE device, but more often than not, the &quot;connection refused&quot; message pops up. Why?  The few times I have managed to establish a connection I get this:</p>
<p dir="auto">connecting to b'\xd2\xe0\xd0\xeb*\xfd'<br />
Reading chars from service = 1800<br />
char 10752 value = b'SENSOR'<br />
char 10753 value = b'\x00\x00'<br />
char 10756 value = b'\x10\x00&lt;\x00\x00\x00\x90\x01'<br />
Reading chars from service = 1801<br />
Reading chars from service = b'\x9e\xca\xdc$\x0e\xe5\xa9\xe0\x93\xf3\xa3\xb5\x01\x00@n'</p>
<p dir="auto">What does this mean?  The BLE device is capable of transmitting: Temperature and humidity, brightness, x,y,z-coordinates and angular velpcity.</p>
<p dir="auto">I'm able to connect the BLE device using BLE scanner 4.0 for ios and through there I can easily read changes from the sensors.</p>
<p dir="auto">Cheers</p>
<p dir="auto">SimiamiDrew</p>
]]></description><link>https://forum.pycom.io/topic/4868/ble-connection-issue</link><generator>RSS for Node</generator><lastBuildDate>Sun, 17 May 2026 20:31:26 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/4868.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 May 2019 12:49:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to BLE connection issue on Mon, 27 May 2019 12:49:53 GMT]]></title><description><![CDATA[<p dir="auto">I'm using a FiPy sitting on the PyTrack. I have updated all devices to their newest firmware version.  I'm using the Bluetooth example from Github.  I am some times (completely at random) able to connecto to a BLE device, but more often than not, the &quot;connection refused&quot; message pops up. Why?  The few times I have managed to establish a connection I get this:</p>
<p dir="auto">connecting to b'\xd2\xe0\xd0\xeb*\xfd'<br />
Reading chars from service = 1800<br />
char 10752 value = b'SENSOR'<br />
char 10753 value = b'\x00\x00'<br />
char 10756 value = b'\x10\x00&lt;\x00\x00\x00\x90\x01'<br />
Reading chars from service = 1801<br />
Reading chars from service = b'\x9e\xca\xdc$\x0e\xe5\xa9\xe0\x93\xf3\xa3\xb5\x01\x00@n'</p>
<p dir="auto">What does this mean?  The BLE device is capable of transmitting: Temperature and humidity, brightness, x,y,z-coordinates and angular velpcity.</p>
<p dir="auto">I'm able to connect the BLE device using BLE scanner 4.0 for ios and through there I can easily read changes from the sensors.</p>
<p dir="auto">Cheers</p>
<p dir="auto">SimiamiDrew</p>
]]></description><link>https://forum.pycom.io/post/28064</link><guid isPermaLink="true">https://forum.pycom.io/post/28064</guid><dc:creator><![CDATA[SimiamiDrew]]></dc:creator><pubDate>Mon, 27 May 2019 12:49:53 GMT</pubDate></item><item><title><![CDATA[Reply to BLE connection issue on Mon, 27 May 2019 13:55:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/4597">@SimiamiDrew</a> Maybe the device only accepts one connection at a time and you have something else already connected?</p>
]]></description><link>https://forum.pycom.io/post/28069</link><guid isPermaLink="true">https://forum.pycom.io/post/28069</guid><dc:creator><![CDATA[jcaron]]></dc:creator><pubDate>Mon, 27 May 2019 13:55:34 GMT</pubDate></item><item><title><![CDATA[Reply to BLE connection issue on Mon, 27 May 2019 14:41:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/1538">@jcaron</a> Maybe, but before every test I make sure to not be connected to the device, so as to the FiPy is the only possible device that'll search and connect to the BLE device.</p>
]]></description><link>https://forum.pycom.io/post/28072</link><guid isPermaLink="true">https://forum.pycom.io/post/28072</guid><dc:creator><![CDATA[SimiamiDrew]]></dc:creator><pubDate>Mon, 27 May 2019 14:41:40 GMT</pubDate></item><item><title><![CDATA[Reply to BLE connection issue on Mon, 27 May 2019 15:43:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/4597">@SimiamiDrew</a> What exactly tells you &quot;connection refused&quot;? I don't think that concept actually exists in BLE, this looks more like an unrelated TCP thing.</p>
<p dir="auto">Can you share the actual code you use as well as the actual logs?</p>
]]></description><link>https://forum.pycom.io/post/28075</link><guid isPermaLink="true">https://forum.pycom.io/post/28075</guid><dc:creator><![CDATA[jcaron]]></dc:creator><pubDate>Mon, 27 May 2019 15:43:29 GMT</pubDate></item><item><title><![CDATA[Reply to BLE connection issue on Thu, 06 Jun 2019 10:39:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/1538">@jcaron</a><br />
The code i'm using is:</p>
<pre><code>Insert Code Here
from network import Bluetooth
import binascii
import time
bt = Bluetooth()
bt.start_scan(-1)
while True:
    adv = bt.get_adv()
    if adv:
        # try to get the complete name
        print(bt.resolve_adv_data(adv.data, Bluetooth.ADV_NAME_CMPL))

        # try to get the manufacturer data (Apple's iBeacon data is sent here)
        mfg_data = bt.resolve_adv_data(adv.data, Bluetooth.ADV_MANUFACTURER_DATA)

        if mfg_data:
            # try to get the manufacturer data (Apple's iBeacon data is sent here)
            print(binascii.hexlify(mfg_data))

        if bt.resolve_adv_data(adv.data, Bluetooth.ADV_NAME_CMPL) == 'SENSOR':
            conn = bt.connect(adv.mac)
            print(&quot;connecting to&quot;,adv.mac )
            services = conn.services()
            for service in services:
                time.sleep(0.050)
                if type(service.uuid()) == bytes:
                    print('Reading chars from service = {}'.format(service.uuid()))
                else:
                    print('Reading chars from service = %x' % service.uuid())
                chars = service.characteristics()
                for char in chars:
                    if (char.properties() &amp; Bluetooth.PROP_READ):
                        print('char {} value = {}'.format(char.uuid(), char.read()))
            conn.disconnect()
            break
    else:
        time.sleep(0.050```
And the &quot;connection refused&quot;- message
![Connection refused.PNG](/assets/uploads/files/1559033864046-connection-refused.png)</code></pre>
]]></description><link>https://forum.pycom.io/post/28087</link><guid isPermaLink="true">https://forum.pycom.io/post/28087</guid><dc:creator><![CDATA[SimiamiDrew]]></dc:creator><pubDate>Thu, 06 Jun 2019 10:39:33 GMT</pubDate></item><item><title><![CDATA[Reply to BLE connection issue on Tue, 28 May 2019 16:40:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/4597">@SimiamiDrew</a> Can you please edit your post and add ``` alone on a line both before and after your code? That will format it properly. Or select the code and click on one of the two code icons in the toolbar.</p>
]]></description><link>https://forum.pycom.io/post/28095</link><guid isPermaLink="true">https://forum.pycom.io/post/28095</guid><dc:creator><![CDATA[jcaron]]></dc:creator><pubDate>Tue, 28 May 2019 16:40:11 GMT</pubDate></item><item><title><![CDATA[Reply to BLE connection issue on Tue, 28 May 2019 16:52:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/4597">@SimiamiDrew</a> Could you also print the <code>adv_type</code> for the device before you attempt to connect?</p>
]]></description><link>https://forum.pycom.io/post/28096</link><guid isPermaLink="true">https://forum.pycom.io/post/28096</guid><dc:creator><![CDATA[jcaron]]></dc:creator><pubDate>Tue, 28 May 2019 16:52:46 GMT</pubDate></item><item><title><![CDATA[Reply to BLE connection issue on Fri, 04 Mar 2022 22:11:21 GMT]]></title><description><![CDATA[<p dir="auto">Were you able to resolve this issue? I am having same issue with nRF BLE but it works with another Pycom BLE device.</p>
]]></description><link>https://forum.pycom.io/post/39957</link><guid isPermaLink="true">https://forum.pycom.io/post/39957</guid><dc:creator><![CDATA[Sanjeev Kumar]]></dc:creator><pubDate>Fri, 04 Mar 2022 22:11:21 GMT</pubDate></item></channel></rss>