🎄⛄❄️🎁 It's beginning to look a lot like ADABOX-mas! The next ADABOX from Adafruit ships soon! Get yours now, or give as a gift! 🎄⛄❄️🎁
0

pyPortal ESP32 issues
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: pyPortal ESP32 issues

by southernskeptic on Thu Jun 13, 2019 8:50 pm

I decided to try different power sources since we've pretty much eliminated HW, SW, network, and WiFi. Power is about the only thing left (besides the invisible pink unicorns).

A Li-ion battery pack works, but only for a few hours before the device locks up (with the LED on the back showing green-yellow, as if it's in the middle of an external wifi/internet call. Running it while connected to my laptop gives horrible results - and the system may or may not run at all.
With an external power supply (rated at 5.25V @ 2.4A), it will run longer, but will still fail as if it's in the middle of an external call - which is why I asked about the power.

I'm going to try running and programming it through a powered USB hub next. That'll be tomorrow.

Thanks again for your time and support.

Marty

southernskeptic
 
Posts: 22
Joined: Sun Jan 12, 2014 6:42 pm

Re: pyPortal ESP32 issues

by adafruit_support_carter on Thu Jun 13, 2019 9:21 pm

Interesting. It sounds like power definitely helped. Are you running the ISS tracker now? If so, the lock ups could be happening when it hiccups while trying to get the latest position. The two PRs I inked before tried to help with that. But there could still be some hiccups that cause it to lock up.

For the sake of testing - try running something else and compare the behavior.

adafruit_support_carter
 
Posts: 13589
Joined: Tue Nov 29, 2016 2:45 pm

Re: pyPortal ESP32 issues

by southernskeptic on Fri Jun 14, 2019 1:40 pm

Happy Friday!

OK, so, last night I took the one that just wouldn't work and started from scratch. I wiped it clean and updated the ESP32 firmware and then loaded the 4.0.1 CircuitPython firmware and then loaded all the libs, etc. I was able to get it to connect (!!!) and work and show quotes, but only when it was connected to an external power supply. It would not work when connected to my laptop's USB Ports (HP). I could program it and exchange files - although it takes a lot of time as the USB ports seem to be a big issue.

Now I'm starting from scratch with the ISS tracker pyPortal. It would lock up even when running on external power. I have a feeling it's still 'hiccup' related, as it seems to lock up when retrieving data from the web. Once I get this unit reloaded, I'll make sure it runs for a day with the quote program on external power before installing the ISS tracker program. I'll let you know next week the results. Fun times!

Thanks again for your time and assistance.

Marty

southernskeptic
 
Posts: 22
Joined: Sun Jan 12, 2014 6:42 pm

Re: pyPortal ESP32 issues

by adafruit_support_carter on Fri Jun 14, 2019 2:05 pm

Cool. Sounds like progress. Hope it continues to work out.

One suggestion for when you try "starting clean". Do this right after installing the new CircuitPython firmware:
https://learn.adafruit.com/welcome-to-c ... stem-20-22
That's a better way to clean slate the filesystem than relying on your operating system's file manager.

After doing that, proceed to re-install the libraries, etc.

adafruit_support_carter
 
Posts: 13589
Joined: Tue Nov 29, 2016 2:45 pm

Re: pyPortal ESP32 issues

by southernskeptic on Sat Jun 15, 2019 12:11 pm

Greetings!

Alright, the issues are resolved. Didn't have to resort to the filesystem cleanup activities, but appreciate having that add'l info and CircuitPython guide. Thanks!

This is definitely a power related issue. I was able to get the ISS Tracker to run all night while on a separate dedicated power supply. :-). However, it will not reliably run on the PC USB ports nor high-capacity Li-ion battery packs. :-(

Measuring current draw while connected to a high-capacity Li-ion battery pack through a "Charge Doctor", indicated the unit can draw around 250mA, sustained, while connecting or communicating via WiFi. Nominal is around 150mA. Even with those modest on the fly measurements - the device is very sensitive to power supply voltage and current fluctuations.

Lesson Learned: Working with and reliably running the pyPortal while connected to my laptop or PCs requires a separate powered USB port hub.

Thanks again for your help,
Marty

southernskeptic
 
Posts: 22
Joined: Sun Jan 12, 2014 6:42 pm

Re: pyPortal ESP32 issues

by adafruit_support_carter on Mon Jun 17, 2019 12:05 pm

Interesting info on the power, thanks for sharing and letting us know. Hope it continues to run OK with good power.

adafruit_support_carter
 
Posts: 13589
Joined: Tue Nov 29, 2016 2:45 pm

Re: pyPortal ESP32 issues

by southernskeptic on Mon Jun 17, 2019 8:00 pm

Greetings:

I was successfully able to run two pyPortals all weekend as long as they were connected to dedicated power rated at 5.25V at 2.4A.

Thanks again,
Marty

southernskeptic
 
Posts: 22
Joined: Sun Jan 12, 2014 6:42 pm

Re: pyPortal ESP32 issues

by robhafernik on Fri Jun 28, 2019 5:43 pm

This may help me, too. I got my PyPortal updated and working with no trouble. It connects to WiFi and seems to work fine... except that after several hours running the "quote" demo code it just locks up. I've run it many times and the result is always the same. I'm going to try it now with a better power supply and see what I get. :)

robhafernik
 
Posts: 11
Joined: Fri Sep 18, 2009 5:08 pm

Re: pyPortal ESP32 issues

by adafruit_support_carter on Fri Jun 28, 2019 6:50 pm

Try both power and make sure you have the latest libraries so that you have the version that has at least some time out watch dogging.

If you still run into issues, please start a new thread.

adafruit_support_carter
 
Posts: 13589
Joined: Tue Nov 29, 2016 2:45 pm

Re: pyPortal ESP32 issues

by southernskeptic on Fri Jun 28, 2019 10:34 pm

I have an update to my experience that may be of use. Maybe.

I've been running two pyPortals for quite awhile. One has been running the ISS Tracker without issues for over a week. The other runs the Adafruit quote program. It will run for days and then it will abort with the same error screen as attached below.

It's always a different quote, so that isn't it. Both units are using the same type of power supplies. So that isn't it. Both units are connected to the same WiFi network and are within two feet of each other. So that probably isn't it.

Based on the error message, there seems to be some error with JSON parsing that is causing the program to abort. And the following LED blink code is what is displayed: Long Green. Long Magenta. Short yellow x 3. Cyan x 4. Repeat.

Any idea of what is happening?
Attachments
Adafruit Quote Error.jpg
Adafruit Quote Error.jpg (732.37 KiB) Viewed 181 times

southernskeptic
 
Posts: 22
Joined: Sun Jan 12, 2014 6:42 pm

Re: pyPortal ESP32 issues

by robhafernik on Sat Jul 13, 2019 5:21 pm

Hi,
I'm having trouble with one of the examples. I'm trying to run "display_text_pyporta.pyl". I copied the file over and renamed it "code.py". When it runs, I get

AttributeError: 'module' object has no attribute 'PB21'

on this line:

backlight = pulseio.PWMOut(microcontroller.pin.PB21) #pylint: disable=no-member

I tried using PB25, thinking maybe it was the correct pin. I also tried "board.TFT_BACKLIGHT", but I got an error about TFT_BACKLIGHT being already in use.

I suspect I'm trying to use the wrong pin, but I don't know where to go to view the microcontroller object or the board object.

Thanks for any help you can give!

robhafernik
 
Posts: 11
Joined: Fri Sep 18, 2009 5:08 pm

Re: pyPortal ESP32 issues

by tannewt2 on Mon Jul 15, 2019 3:00 am

Hey Rob. In the REPL you can do `print(dir(board))` to see all names in board. It's also in ports/atmel-samd/boards

tannewt2
 
Posts: 1350
Joined: Thu Oct 06, 2016 8:48 pm

Re: pyPortal ESP32 issues

by kevinjwalters on Tue Jul 16, 2019 12:31 pm

@southernskeptic There is a debug option for the PyPortal object, if you amend the application code to pass PyPortal=True then you may get some more information that'll help indicate whether the HTTP response is truncated by server or by some part of the PyPortal. I've also amended #37 for this - longer term that may give more info on what's going on.

kevinjwalters
 
Posts: 461
Joined: Sun Oct 01, 2017 3:15 pm

Please be positive and constructive with your questions and comments.