Skip to main content
added 17 characters in body; edited title
Source Link
dda
  • 1.6k
  • 1
  • 12
  • 17

CircuitPython - how to connect Adafruit esp32 AirLift with Adafuit HttpServer - incompatible? Incompatible socket object

I am building a CircuitPython weather station based on Adafruit M4 board stacked with Adafruit ESP32 AirLift module. 

Both work fine together when it comes to making http calls (via the Adafruit_requests library). However I would like to build aam HTTP server serving weather measures instead. And

And here is a problem: all Adafuit examples are based on ESP32 or Raspberry Pico boards natively fitted with WIFIWifi. The Adafuit M4 board doesn't have the same core pythonPython packages since it doesn't sport WIFIsupport Wifi. So

So an example written for Pico doesn't work on the M4 with ESP AirLift, as there are a number of packages missing to do so (like wifi and socket), adafuit_esp package has to be used instead. This

This package however seems to be incompatible with Adafuit HTTPServer: https://docs.circuitpython.org/projects/httpserver/en/stable/index.html HttpServer requires a socket object as a parameter to be initialized:

thisThis code fails when I'm trying to start the server:

andAnd the error is:

So it looks like that's not the right socket ? it. It works for ESP and Requests libs but not for HTTPServer.

My question then (or two) is ifdoes anyone know a workaround for this issue and and/or a different socket or server packages I can use instead  ?

Here is the full code for the reference, it is not finished and contains more stuff thatthan described here but unrelated to the issue:

CircuitPython - how to connect Adafruit esp32 AirLift with Adafuit HttpServer - incompatible socket object

I am building a CircuitPython weather station based on Adafruit M4 board stacked with Adafruit ESP32 AirLift module. Both work fine together when it comes to making http calls (via Adafruit_requests library). However I would like to build a HTTP server serving weather measures instead. And here is a problem: all Adafuit examples are based on ESP32 or Raspberry Pico boards natively fitted with WIFI. Adafuit M4 board doesn't have the same core python packages since it doesn't sport WIFI. So example written for Pico doesn't work on M4 with ESP AirLift, there are a number of packages missing to do so (like wifi and socket), adafuit_esp package has to be used instead. This package however seems to be incompatible with Adafuit HTTPServer: https://docs.circuitpython.org/projects/httpserver/en/stable/index.html HttpServer requires socket object as a parameter to be initialized:

this code fails when I'm trying to start the server:

and the error is:

So it looks like that's not the right socket ? it works for ESP and Requests libs but not for HTTPServer.

My question then (or two) is if anyone know a workaround for this issue and/or a different socket or server packages I can use instead  ?

Here is the full code for the reference, it is not finished and contains more stuff that described here but unrelated to the issue:

CircuitPython - how to connect Adafruit esp32 AirLift with Adafuit HttpServer? Incompatible socket object

I am building a CircuitPython weather station based on Adafruit M4 board stacked with Adafruit ESP32 AirLift module. 

Both work fine together when it comes to making http calls (via the Adafruit_requests library). However I would like to build am HTTP server serving weather measures instead.

And here is a problem: all Adafuit examples are based on ESP32 or Raspberry Pico boards natively fitted with Wifi. The Adafuit M4 board doesn't have the same core Python packages since it doesn't support Wifi.

So an example written for Pico doesn't work on the M4 with ESP AirLift, as there are a number of packages missing to do so (like wifi and socket), adafuit_esp package has to be used instead.

This package however seems to be incompatible with Adafuit HTTPServer: https://docs.circuitpython.org/projects/httpserver/en/stable/index.html HttpServer requires a socket object as a parameter to be initialized:

This code fails when I'm trying to start the server:

And the error is:

So it looks like that's not the right socket. It works for ESP and Requests libs but not for HTTPServer.

My question then (or two) is does anyone know a workaround for this issue and/or a different socket or server packages I can use instead?

Here is the full code for the reference, it is not finished and contains more stuff than described here but unrelated to the issue:

edited title
Link
user1584421
  • 1.4k
  • 3
  • 25
  • 36

CirtuitPython CircuitPython - how to connect Adafruit esp32 AirLift with Adafuit HttpServer - incompatible socket object

added 2 characters in body
Source Link

I am building a CircuitPython weather station based on Adafruit M4 board stacked with Adafruit ESP32 AirLift module. Both work fine together when it comes to making http calls (via Adafruit_requests library). However I would like to build a HTTP server serving weather measures instead. And here is a problem: all Adafuit examples are based on ESP32 or Raspberry Pico boards natively fitted with WIFI. Adafuit M4 board doesn't have the same core python packages since it don'tdoesn't sport WIFI. So example written for Pico doesn't work on M4 with ESP AirLift, there are a number of packages missing to do so (like wifi and socket), adafuit_esp package has to be used instead. This package however seems to be incompatible with Adafuit HTTPServer: https://docs.circuitpython.org/projects/httpserver/en/stable/index.html because itHttpServer requires socket object as a parameter to be initialized:

this code fails when I'm trying to start the server:

I am building a CircuitPython weather station based on Adafruit M4 board stacked with Adafruit ESP32 AirLift module. Both work fine together when it comes to making http calls (via Adafruit_requests library). However I would like to build a HTTP server serving weather measures instead. And here is a problem: all Adafuit examples are based on ESP32 or Raspberry Pico boards natively fitted with WIFI. Adafuit M4 board doesn't have the same core python packages since it don't sport WIFI. So example written for Pico doesn't work on M4 with ESP AirLift, there are a number of packages missing to do so (like wifi and socket), adafuit_esp package has to be used instead. This package however seems to be incompatible with Adafuit HTTPServer: https://docs.circuitpython.org/projects/httpserver/en/stable/index.html because it requires socket parameter to be initialized:

code fails when I'm trying to start the server:

I am building a CircuitPython weather station based on Adafruit M4 board stacked with Adafruit ESP32 AirLift module. Both work fine together when it comes to making http calls (via Adafruit_requests library). However I would like to build a HTTP server serving weather measures instead. And here is a problem: all Adafuit examples are based on ESP32 or Raspberry Pico boards natively fitted with WIFI. Adafuit M4 board doesn't have the same core python packages since it doesn't sport WIFI. So example written for Pico doesn't work on M4 with ESP AirLift, there are a number of packages missing to do so (like wifi and socket), adafuit_esp package has to be used instead. This package however seems to be incompatible with Adafuit HTTPServer: https://docs.circuitpython.org/projects/httpserver/en/stable/index.html HttpServer requires socket object as a parameter to be initialized:

this code fails when I'm trying to start the server:

edited body
Source Link
Loading
added 3 characters in body
Source Link
Loading
Source Link
Loading