<?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[DeepSleep Still Randomly Ending]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/2216/deepsleep-randomly-ends">Deepsleep randomly ends</a></p>
<p dir="auto">Ok, so I posted this abound 2 weeks ago and am getting no where - it occurs across 4 SiPys I have.  I really hope someone can help.  But I do have a few more details.</p>
<p dir="auto">Basically I have the latest version of SiPy firmware installed and Deepsleep shields connected to a expansion board.  Its not an issue on the expansion board because I have my own developed circuit board/breadboard and its doing the same thing on that too.  I am using the latest release of the <a href="http://deepsleep.py" target="_blank" rel="noopener noreferrer nofollow ugc">deepsleep.py</a> module as well.</p>
<p dir="auto">I have the code delivering a Sigfox message every 30mins.  I am getting the following delivery times (these align with reboot timing of the device):</p>
<p dir="auto">2017-12-07 16:23:56	<br />
2017-12-07 15:50:11	<br />
2017-12-07 15:45:13	<br />
2017-12-07 15:16:13	<br />
2017-12-07 14:44:26	<br />
2017-12-07 14:12:40	<br />
2017-12-07 13:45:40	<br />
2017-12-07 13:18:38	<br />
2017-12-07 12:58:14	<br />
2017-12-07 12:42:37	<br />
2017-12-07 12:18:22	<br />
2017-12-07 12:15:22	<br />
2017-12-07 11:42:35	<br />
2017-12-07 11:38:19	<br />
2017-12-07 11:14:48	<br />
2017-12-07 10:48:30	<br />
2017-12-07 10:20:52	<br />
2017-12-07 10:01:53</p>
<p dir="auto">As you can see, this is wildly out, consistently.  Please note, that this ONLY occurs when the expansion board is powered by a LiPo.  When the device is powered by USB it works perfectly and the timing is spot on and as expected.</p>
<p dir="auto">I cant check the reason because the device (again only on battery) comes up with the following:</p>
<p dir="auto">Traceback (most recent call last):<br />
File "<a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a>", line 7, in &lt;module&gt;<br />
File "/flash/lib/deepsleep.py", line 143, in get_wake_status<br />
File "/flash/lib/deepsleep.py", line 76, in peek<br />
IndexError: bytes index out of range</p>
<p dir="auto">Again, on USB power, this error never comes up!</p>
<p dir="auto">Im at a real loss here, and I have no idea how to resolve.  I have done the following to turn off a wake on pins from deepsleep in the hope it helps, but it doesnt:</p>
<p dir="auto">ds = DeepSleep()<br />
ds.enable_pullups(['P17', 'P18'])<br />
ds.disable_wake_on_fall(['P17', 'P18'])<br />
ds.disable_wake_on_raise(['P17', 'P18'])</p>
<p dir="auto">Any help anyone can give would be really appreciated.  Has anyone experienced this before?!  The only thing I havent done is downgrade the firmware, but I didnt think I would have to do that?</p>
<p dir="auto">Thanks<br />
Brad</p>
]]></description><link>https://forum.pycom.io/topic/2270/deepsleep-still-randomly-ending</link><generator>RSS for Node</generator><lastBuildDate>Thu, 19 Nov 2026 05:15:20 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/2270.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 07 Dec 2017 03:55:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DeepSleep Still Randomly Ending on Tue, 02 Jan 2018 11:44:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bradnz" aria-label="Profile: bradnz">@<bdi>bradnz</bdi></a> Exactly which version of <a href="http://deepsleep.py" target="_blank" rel="noopener noreferrer nofollow ugc">deepsleep.py</a> did you use? There are many commits which mention version 1.0.0 for this file.</p>
<p dir="auto">I am trying your solution, but it's not working for me on LoPy.</p>
]]></description><link>https://forum.pycom.io/post/14009</link><guid isPermaLink="true">https://forum.pycom.io/post/14009</guid><dc:creator><![CDATA[shivams]]></dc:creator><pubDate>Tue, 02 Jan 2018 11:44:04 GMT</pubDate></item><item><title><![CDATA[Reply to DeepSleep Still Randomly Ending on Sun, 10 Dec 2017 16:33:55 GMT]]></title><description><![CDATA[<p dir="auto">For any one interested, or has this issue in the future I have resolved this by doing the following:</p>
<p dir="auto">Rolled back firmware to 1.7.9.b3<br />
Used version 1.0.0 of the <a href="http://deepsleep.py" target="_blank" rel="noopener noreferrer nofollow ugc">deepsleep.py</a> file from github.</p>
<p dir="auto">Works fine now.</p>
]]></description><link>https://forum.pycom.io/post/13473</link><guid isPermaLink="true">https://forum.pycom.io/post/13473</guid><dc:creator><![CDATA[bradnz]]></dc:creator><pubDate>Sun, 10 Dec 2017 16:33:55 GMT</pubDate></item><item><title><![CDATA[Reply to DeepSleep Still Randomly Ending on Sat, 09 Dec 2017 20:15:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/livius" aria-label="Profile: livius">@<bdi>livius</bdi></a> Hi.  Thanks for your suggestions.  To answer your questions:</p>
<ol>
<li>To confirm I have the right file, I downloaded again and reapplied.  Same result, being that the awake from deepsleep is really inconsistent.</li>
<li>Yes this is the firmware version I am using.</li>
<li>I have tried this and it hasnt helped.</li>
<li>I have downloaded to the avaliable versions accessible via pycoms site and this doesnt even send a signal.  The devices says its sent it, but its never recieved in the backend of sigfoxs network.  I have disengaged the sequence number as I have been shown before if this happens, but this doesnt help unfortunately!</li>
</ol>
<p dir="auto">I have been able to establish that the wake reason is 16, which from what I can tell is a timer wake, so this tells me something isnt right with the timer.  If I connect this to the expansion board powered by USB the timer is perfect and it sends at the right time (95% of the time).  If I connect via Lipo though, its all out and completely wrong.  Im really confused, and need help.  If anyone can guide me in the right direction it would be appreciated.  This is, unfortunately, blocking y project and I cant progress without resolving this!</p>
<p dir="auto">Thanks in advance.</p>
]]></description><link>https://forum.pycom.io/post/13463</link><guid isPermaLink="true">https://forum.pycom.io/post/13463</guid><dc:creator><![CDATA[bradnz]]></dc:creator><pubDate>Sat, 09 Dec 2017 20:15:14 GMT</pubDate></item><item><title><![CDATA[Reply to DeepSleep Still Randomly Ending on Thu, 07 Dec 2017 08:19:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/livius" aria-label="Profile: livius">@<bdi>livius</bdi></a> Hi, and thanks for your responses.</p>
<p dir="auto">I have finally been able to get this to remove the error, and have the following output on a unexpected restart:  {'P10': 0, 'wake': 16, 'P18': 1, 'P17': 1}</p>
<p dir="auto">Im not sure what the wake reason number 16 is.  Do you know?</p>
<p dir="auto">I will also try the downgrade if you think this will be helpful, and also swapping those commands.</p>
]]></description><link>https://forum.pycom.io/post/13416</link><guid isPermaLink="true">https://forum.pycom.io/post/13416</guid><dc:creator><![CDATA[bradnz]]></dc:creator><pubDate>Thu, 07 Dec 2017 08:19:51 GMT</pubDate></item><item><title><![CDATA[Reply to DeepSleep Still Randomly Ending on Thu, 07 Dec 2017 07:45:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bradnz" aria-label="Profile: bradnz">@<bdi>bradnz</bdi></a></p>
<ol>
<li>
<p dir="auto">are you sure that you have recent <code>deepsleep.py</code>? I ask because your error lines point to empty lines in current code<br />
e.g. line 76 is empty (i suppose that 79 is the line with reall message but if yours is 76 then you have different file).</p>
</li>
<li>
<p dir="auto">And by latest firmware do you mean <code>1.10.2.b1</code>?</p>
</li>
<li>
<p dir="auto">And for testing what if you change this to:</p>
</li>
</ol>
<pre><code>ds = DeepSleep()
ds.enable_pullups(['P17', 'P18'])
ds.disable_wake_on_raise(['P17', 'P18'])
ds.disable_wake_on_fall(['P17', 'P18'])
</code></pre>
<p dir="auto">Is this still happen?</p>
<ol start="4">
<li>And for final testing until someone of <a class="plugin-mentions-group plugin-mentions-a" href="/groups/administrators" aria-label="Profile: administrators">@<bdi>administrators</bdi></a> bring here some light<br />
try to downgrade software to e.g. <code>1.9</code> or `1.7.2' and see if it make any difference.</li>
</ol>
]]></description><link>https://forum.pycom.io/post/13415</link><guid isPermaLink="true">https://forum.pycom.io/post/13415</guid><dc:creator><![CDATA[livius]]></dc:creator><pubDate>Thu, 07 Dec 2017 07:45:16 GMT</pubDate></item></channel></rss>