<?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[Checking bandwidth available for FiPy possible?]]></title><description><![CDATA[<p dir="auto">Hi.</p>
<p dir="auto">Would have posted in the &quot;Cellular&quot; topic, but that is unavailable.</p>
<p dir="auto">I am using a FiPy, which is used for sending sensor data to Azure IoT Hub using  LTE NB-IoT. But i am finding that establishing the connection to Azure takes a long time, sometimes up to around 10 seconds.</p>
<p dir="auto">Due to power-saving reasons, i don't want it to stay connected all the time, but the wait for connecting to Azure is not optimal.</p>
<p dir="auto">I would like to investigate the bandwidth that we are operating with when using the LTE NB-IoT network. Is there a method that can do this in the network library?</p>
<p dir="auto">Is the network library available for reading?</p>
<p dir="auto">Best Regards<br />
RM</p>
]]></description><link>https://forum.pycom.io/topic/5827/checking-bandwidth-available-for-fipy-possible</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 07:49:48 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/5827.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 25 Mar 2020 15:26:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Checking bandwidth available for FiPy possible? on Wed, 25 Mar 2020 15:26:47 GMT]]></title><description><![CDATA[<p dir="auto">Hi.</p>
<p dir="auto">Would have posted in the &quot;Cellular&quot; topic, but that is unavailable.</p>
<p dir="auto">I am using a FiPy, which is used for sending sensor data to Azure IoT Hub using  LTE NB-IoT. But i am finding that establishing the connection to Azure takes a long time, sometimes up to around 10 seconds.</p>
<p dir="auto">Due to power-saving reasons, i don't want it to stay connected all the time, but the wait for connecting to Azure is not optimal.</p>
<p dir="auto">I would like to investigate the bandwidth that we are operating with when using the LTE NB-IoT network. Is there a method that can do this in the network library?</p>
<p dir="auto">Is the network library available for reading?</p>
<p dir="auto">Best Regards<br />
RM</p>
]]></description><link>https://forum.pycom.io/post/32233</link><guid isPermaLink="true">https://forum.pycom.io/post/32233</guid><dc:creator><![CDATA[railmonitor]]></dc:creator><pubDate>Wed, 25 Mar 2020 15:26:47 GMT</pubDate></item><item><title><![CDATA[Reply to Checking bandwidth available for FiPy possible? on Wed, 01 Apr 2020 14:16:16 GMT]]></title><description><![CDATA[<p dir="auto">Found the solution! Posting here anyone who would ask the same:</p>
<pre><code>print(lte.send_at_cmd('AT+CSQ'))
print(lte.send_at_cmd('AT+CSQ=?'))
</code></pre>
<p dir="auto">This will show you the signal quality, and the number of errors!</p>
<p dir="auto">/RM</p>
]]></description><link>https://forum.pycom.io/post/32297</link><guid isPermaLink="true">https://forum.pycom.io/post/32297</guid><dc:creator><![CDATA[railmonitor]]></dc:creator><pubDate>Wed, 01 Apr 2020 14:16:16 GMT</pubDate></item><item><title><![CDATA[Reply to Checking bandwidth available for FiPy possible? on Thu, 02 Apr 2020 07:48:56 GMT]]></title><description><![CDATA[<p dir="auto">So my bandwidth is not really the problem here. The problem is that the umqtt / simple library is slow in use. When my FiPy is already connected to LTE, and it then tries to connect to Azure IoT Hub, establishing the connection takes around 30 seconds, whereas simply publishing is fast and not a issue at all. So i am currently looking into optimizing / speeding up the connect routine if possible in the <a href="http://simple.py" target="_blank" rel="noopener noreferrer nofollow">simple.py</a> library.</p>
<p dir="auto">Here is the code i use to connect:</p>
<pre><code>def iot_connect(self):
        if self.IoTConnectedFlag == False:
            self.password = self.generate_sas_token(self.uri, self.primary_key, self.policy_name)
            beforeConn = utime.ticks_us()
            self.username_fmt = &quot;{}/{}/api-version=2018-06-30&quot;
            self.username = self.username_fmt.format(self.hostname, self.device_id)
            self.client = MQTTClient(client_id=self.device_id, server=self.hostname, port=8883, user=self.username, password=self.password, keepalive=4000, ssl=True)
            self.client.connect()
            print(&quot;IoT Connected!&quot;)
            self.IoTConnectedFlag = True
            afterConn = utime.ticks_us()
            connDone = afterConn - beforeConn
            print(connDone)
</code></pre>
<p dir="auto">the utime.ticks_us() are used to observe how long time the method takes to execute.</p>
<ul>
<li>
<p dir="auto">Whole method = 28.61 secs</p>
</li>
<li>
<p dir="auto">Whole method minus SAS Token generation = 27.27 secs</p>
</li>
<li>
<p dir="auto">self.client.connect() = 16.94 secs</p>
</li>
</ul>
<p dir="auto">Any ideas on how to optimize this speed is very welcome! Thanks</p>
<p dir="auto">/RM</p>
]]></description><link>https://forum.pycom.io/post/32304</link><guid isPermaLink="true">https://forum.pycom.io/post/32304</guid><dc:creator><![CDATA[railmonitor]]></dc:creator><pubDate>Thu, 02 Apr 2020 07:48:56 GMT</pubDate></item></channel></rss>