<?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[Lopy to Lopy communication over LoRa hangs on send]]></title><description><![CDATA[<p dir="auto">Hello everyone!</p>
<p dir="auto">I'm new to the PyCom devices and I'm working my way through the tutorials.  However, when I run the <a href="https://github.com/pycom/pycom-libraries/tree/master/examples/lopy-lopy" target="_blank" rel="noopener noreferrer nofollow">lopy to lopy communication over LoRa example codes</a>, the sending LoPy4 (lopy-B code) never completes the sending line.  I've added a few prints to confirm the situation.  Here is the code on lopy-b:</p>
<pre><code>from network import LoRa
import socket
import time

lora = LoRa(mode=LoRa.LORA, frequency=905000000)
s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
s.setblocking(False)

while True:
    print(&quot;Sending Ping&quot;)
    s.send(&quot;Ping&quot;)
    print(&quot;Ping Sent&quot;)
    time.sleep(5)
</code></pre>
<p dir="auto">The code results in &quot;Sending Ping&quot; being printed and nothing else.</p>
<p dir="auto">The details of the unit are below:</p>
<pre><code>(sysname='LoPy4', nodename='LoPy4', release='1.18.2', version='v1.8.6-849-743b7e7 on 2019-01-21', machine='LoPy4 with ESP32', lorawan='1.0.2', sigfox='1.0.1', pybytes='0.9.6')
</code></pre>
<p dir="auto">I appreciate any help for a newbie!  Thanks.</p>
]]></description><link>https://forum.pycom.io/topic/4485/lopy-to-lopy-communication-over-lora-hangs-on-send</link><generator>RSS for Node</generator><lastBuildDate>Wed, 20 May 2026 16:19:56 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/4485.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 05 Mar 2019 03:40:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Lopy to Lopy communication over LoRa hangs on send on Tue, 05 Mar 2019 03:40:33 GMT]]></title><description><![CDATA[<p dir="auto">Hello everyone!</p>
<p dir="auto">I'm new to the PyCom devices and I'm working my way through the tutorials.  However, when I run the <a href="https://github.com/pycom/pycom-libraries/tree/master/examples/lopy-lopy" target="_blank" rel="noopener noreferrer nofollow">lopy to lopy communication over LoRa example codes</a>, the sending LoPy4 (lopy-B code) never completes the sending line.  I've added a few prints to confirm the situation.  Here is the code on lopy-b:</p>
<pre><code>from network import LoRa
import socket
import time

lora = LoRa(mode=LoRa.LORA, frequency=905000000)
s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
s.setblocking(False)

while True:
    print(&quot;Sending Ping&quot;)
    s.send(&quot;Ping&quot;)
    print(&quot;Ping Sent&quot;)
    time.sleep(5)
</code></pre>
<p dir="auto">The code results in &quot;Sending Ping&quot; being printed and nothing else.</p>
<p dir="auto">The details of the unit are below:</p>
<pre><code>(sysname='LoPy4', nodename='LoPy4', release='1.18.2', version='v1.8.6-849-743b7e7 on 2019-01-21', machine='LoPy4 with ESP32', lorawan='1.0.2', sigfox='1.0.1', pybytes='0.9.6')
</code></pre>
<p dir="auto">I appreciate any help for a newbie!  Thanks.</p>
]]></description><link>https://forum.pycom.io/post/26387</link><guid isPermaLink="true">https://forum.pycom.io/post/26387</guid><dc:creator><![CDATA[dmcwright]]></dc:creator><pubDate>Tue, 05 Mar 2019 03:40:33 GMT</pubDate></item><item><title><![CDATA[Reply to Lopy to Lopy communication over LoRa hangs on send on Tue, 05 Mar 2019 05:58:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/4072">@dmcwright</a> Hey! A fellow newbie here too. I was wondering why your code didn't work so I tested it myself on my LoPy and it shows an error of Frequency being out of range.<br />
Also, when I remove the frequency parameter, your code seems to work perfectly fine.</p>
]]></description><link>https://forum.pycom.io/post/26390</link><guid isPermaLink="true">https://forum.pycom.io/post/26390</guid><dc:creator><![CDATA[sarthak04]]></dc:creator><pubDate>Tue, 05 Mar 2019 05:58:53 GMT</pubDate></item><item><title><![CDATA[Reply to Lopy to Lopy communication over LoRa hangs on send on Tue, 05 Mar 2019 08:45:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/4072">@dmcwright</a> What region is your LoPy set to?</p>
]]></description><link>https://forum.pycom.io/post/26401</link><guid isPermaLink="true">https://forum.pycom.io/post/26401</guid><dc:creator><![CDATA[jcaron]]></dc:creator><pubDate>Tue, 05 Mar 2019 08:45:12 GMT</pubDate></item><item><title><![CDATA[Reply to Lopy to Lopy communication over LoRa hangs on send on Tue, 05 Mar 2019 13:39:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/1538">@jcaron</a> Thanks for reaching out.  I'm not sure how to check the region it is set to currently.  Any advice on the best way to find out the current setting?</p>
]]></description><link>https://forum.pycom.io/post/26421</link><guid isPermaLink="true">https://forum.pycom.io/post/26421</guid><dc:creator><![CDATA[dmcwright]]></dc:creator><pubDate>Tue, 05 Mar 2019 13:39:39 GMT</pubDate></item><item><title><![CDATA[Reply to Lopy to Lopy communication over LoRa hangs on send on Tue, 05 Mar 2019 14:05:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/4072">@dmcwright</a> I believe you can use the <a href="https://docs.pycom.io/advance/cli.html" target="_blank" rel="noopener noreferrer nofollow"><code>pycom-fwtool-cli</code></a> command line firmware update tool to do so, see the <a href="https://docs.pycom.io/advance/cli.html#lpwan" target="_blank" rel="noopener noreferrer nofollow">`lpwan --lora_region'</a> option.</p>
<p dir="auto">It may be possible through the firmware updater GUI as well. Don't know if there's a way to get it via micropython directly.</p>
]]></description><link>https://forum.pycom.io/post/26423</link><guid isPermaLink="true">https://forum.pycom.io/post/26423</guid><dc:creator><![CDATA[jcaron]]></dc:creator><pubDate>Tue, 05 Mar 2019 14:05:33 GMT</pubDate></item><item><title><![CDATA[Reply to Lopy to Lopy communication over LoRa hangs on send on Tue, 05 Mar 2019 22:38:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/3991">@sarthak04</a>  Thanks for the suggestion.  I removed the frequency setting and the behavior was the same.  More than likely, you're in a different region than I'm in and that's what caused your frequency out of range running my code.  I'm in the US.</p>
]]></description><link>https://forum.pycom.io/post/26436</link><guid isPermaLink="true">https://forum.pycom.io/post/26436</guid><dc:creator><![CDATA[dmcwright]]></dc:creator><pubDate>Tue, 05 Mar 2019 22:38:34 GMT</pubDate></item><item><title><![CDATA[Reply to Lopy to Lopy communication over LoRa hangs on send on Tue, 05 Mar 2019 22:52:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/1538">@jcaron</a> Thanks for the links.  I ran this code and the result was:</p>
<pre><code>LORA REGION=US915
</code></pre>
<p dir="auto">I originally had the region set in the constructor:</p>
<pre><code>lora = LoRa(mode=LoRa.LORA, region=LoRa.US915)
</code></pre>
<p dir="auto">That had the same behavior.</p>
]]></description><link>https://forum.pycom.io/post/26437</link><guid isPermaLink="true">https://forum.pycom.io/post/26437</guid><dc:creator><![CDATA[dmcwright]]></dc:creator><pubDate>Tue, 05 Mar 2019 22:52:12 GMT</pubDate></item><item><title><![CDATA[Reply to Lopy to Lopy communication over LoRa hangs on send on Mon, 11 Mar 2019 02:57:49 GMT]]></title><description><![CDATA[<p dir="auto">I'm still having this issue.  I've tried using the other frequency bands to setup the LoRa constructor and it had the same result.  I'm not 100% sure how to do a full reset of the device and start again, but I used the erase_fs option of the pycom-fwtool-cli tool and tried the same code again.  It behaved the same way.<br />
Am I misunderstanding the operation of the socket, here?  The send command for a &quot;non-blocking&quot; socket doesn't require any response from a receiver, correct?  The example code should just keep sending the ping every 5 seconds, right?</p>
<p dir="auto">If anyone has any other ideas I could try, I'd be very grateful.</p>
]]></description><link>https://forum.pycom.io/post/26543</link><guid isPermaLink="true">https://forum.pycom.io/post/26543</guid><dc:creator><![CDATA[dmcwright]]></dc:creator><pubDate>Mon, 11 Mar 2019 02:57:49 GMT</pubDate></item><item><title><![CDATA[Reply to Lopy to Lopy communication over LoRa hangs on send on Thu, 14 Mar 2019 08:26:21 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
try adding region followed by frequency spot within the region . it will work.</p>
]]></description><link>https://forum.pycom.io/post/26603</link><guid isPermaLink="true">https://forum.pycom.io/post/26603</guid><dc:creator><![CDATA[kps]]></dc:creator><pubDate>Thu, 14 Mar 2019 08:26:21 GMT</pubDate></item><item><title><![CDATA[Reply to Lopy to Lopy communication over LoRa hangs on send on Fri, 15 Mar 2019 20:09:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/4147">@kps</a> Thanks for the help.  It 'almost' worked.  It sent the first &quot;ping&quot; successfully, then printed &quot;sending ping&quot; and was never heard from again.  If I use the reset button on the LoPy4 to get back to REPL and try to run the same code again from Atom, then the code won't send even that one ping.  However, if I power-cycle the unit and run the same code from Atom again, then it completes the send command successfully exactly once before it hangs on the second send.  Could this behavior be a clue?  Why does the &quot;hard&quot; reset matter?</p>
]]></description><link>https://forum.pycom.io/post/26630</link><guid isPermaLink="true">https://forum.pycom.io/post/26630</guid><dc:creator><![CDATA[dmcwright]]></dc:creator><pubDate>Fri, 15 Mar 2019 20:09:10 GMT</pubDate></item></channel></rss>