Pico HTTPS GET through ESP01 serial2wifi

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
HermannSW
Posts: 197
Joined: Wed Nov 01, 2017 7:46 am
Contact:

Pico HTTPS GET through ESP01 serial2wifi

Post by HermannSW » Tue Mar 23, 2021 1:38 pm

https://www.raspberrypi.org/forums/view ... 6&t=307704


Small demo with two Pico HTTPS GET reuqests against the internet, with rxbuf=512:
Image
Pico-W Access Point static file webserver:
https://github.com/Hermann-SW/pico-w

Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454

webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell

HermannSW
Posts: 197
Joined: Wed Nov 01, 2017 7:46 am
Contact:

Re: Pico HTTPS GET through ESP01 serial2wifi

Post by HermannSW » Tue Apr 13, 2021 8:36 am

@robert-hh's pull request was worked on and merged 20h ago.
No need to build Micropython for robert-hh's configurable rx/tx buffers anymore.
Latest rp2 dailybuild from now on contains configurable UART buffers, here is latest:
https://micropython.org/resources/firmw ... ffda17.uf2

Code: Select all

>>> 
MPY: soft reboot
MicroPython v1.14 on 2021-04-13; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>> from machine import UART
>>> uart=UART(0, 115200, rxbuf=512)
>>> 
Pico-W Access Point static file webserver:
https://github.com/Hermann-SW/pico-w

Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454

webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell

modulusmath
Posts: 30
Joined: Thu Jun 30, 2022 3:21 am

Re: Pico HTTPS GET through ESP01 serial2wifi

Post by modulusmath » Wed Jul 20, 2022 3:14 am

Howdy All

This seems pretty awesome. It seems like this file is the key:

https://micropython.org/resources/firmw ... ffda17.uf2

I got 404 Not Found trying.

The postings here literally seems like the best option for uP http gets/etc..

Anyway, I was thinking the esp01 would be a logical choice to add to a micro board like the pico. But most of the internet web show how to run as a webserver - not an http client. I guess I don't really understand the intent of the esp01 if it only understand AT commands.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Pico HTTPS GET through ESP01 serial2wifi

Post by jimmo » Wed Jul 20, 2022 11:01 am

modulusmath wrote:
Wed Jul 20, 2022 3:14 am
This seems pretty awesome. It seems like this file is the key:

https://micropython.org/resources/firmw ... ffda17.uf2
HermannSW was saying that this firmware fixed the issue (it's probably the first nightly build after that feature was added), but any _later_ version will work. Just use the 1.19.1 release -- https://micropython.org/download/rp2-pico/

modulusmath
Posts: 30
Joined: Thu Jun 30, 2022 3:21 am

Re: Pico HTTPS GET through ESP01 serial2wifi

Post by modulusmath » Thu Jul 21, 2022 3:03 am

jimmo wrote:
Wed Jul 20, 2022 11:01 am
modulusmath wrote:
Wed Jul 20, 2022 3:14 am
This seems pretty awesome. It seems like this file is the key:

https://micropython.org/resources/firmw ... ffda17.uf2
HermannSW was saying that this firmware fixed the issue (it's probably the first nightly build after that feature was added), but any _later_ version will work. Just use the 1.19.1 release -- https://micropython.org/download/rp2-pico/
Right. Thanks for that. I thought followed up on all the threads.

For what it's worth, I'm able to connect to wifi and given an HTTP resource like neverssl, tcpdump shows me SYN/ACK, so I can send data with AT commands. However, (I am still pursing how to get the latest Firmware on the esp01, that seems like it could be a bit involved and trying to keep it simple w/o introducing TLS), it is at:

Code: Select all

AT version:1.1.0.0(May 11 2016 18:09:56)
SDK version:1.5.4(baaeaebb)
compile time:May 20 2016 15:08:19
I may be being thick but I can't use the newer method, it redirects so I pursue the final URL:

>>> uart0.write("http://splendidfinewonderouskiss.neverssl.com/online/" + "\n")
54
>>> print(uart0.read().decode())
http://splendidfinewonderouskiss.neverssl.com/online/
ERROR


I'll keep pursuing this including the firmware upgrade...

Post Reply