Matrix Portal M4 connects to WiFi AP but has ESP32 timeout error

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
EmperorToast
 
Posts: 3
Joined: Fri Jan 20, 2023 12:30 pm

Matrix Portal M4 connects to WiFi AP but has ESP32 timeout error

Post by EmperorToast »

I am trying to connect the Matrix Portal M4 to a WiFi network, but it receives an error when I connect to a particular network. Is there an issue with the network connection, the matrix portal firmware, or something else?

I followed the guide from here, https://learn.adafruit.com/matrix-porta ... et-connect, and have been able to connect and receive data when connected to my phone's hotspot. However, when I try to connect to our IT-managed network, I get an error (See outputs below). I have tried both CircuitPython 7.3.3 and 8.0.0-beta.6, and used their respective libraries. I have also tried using the included matrixportal_simpletest.py examples from the libraries. All attempts have led to the same results.

Is there any particular reason why it can receive data from one network connection, but produce an error on another connection? As far as I know, both APs use the same security type. I already contacted our IT department and gave all the network/connection info, but they couldn't find any reason why it wouldn't connect so they suggested looking into the firmware. I just find it strange that it is able to connect to both APs, have an IP address assigned from both APs, but get an ESP32 timeout error on only one.

Any insight would be appreciated. Thanks.


Console output when connected through phone hotspot:

Code: Select all

ESP32 SPI webclient test
ESP32 found and in idle mode
Firmware vers. bytearray(b'1.2.2\x00')
MAC addr: <<MAC ADDRESS>>
	<<AP LIST HERE>>
Connecting to AP...
Connected to <<AP NAME>> 	RSSI: -21
My IP address is <<ADDRESS>>
IP lookup adafruit.com: <<ADDRESS>>
Ping google.com: 30 ms
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
----------------------------------------
This is a test of Adafruit WiFi!
If you can read this, its working :)
----------------------------------------

Fetching json from http://api.coindesk.com/v1/bpi/currentprice/USD.json
----------------------------------------
{'time': {'updated': 'Dec 13, 2022 15:32:00 UTC', 'updatedISO': '2022-12-13T15:32:00+00:00', 'updateduk': 'Dec 13, 2022 at 15:32 GMT'}, 'disclaimer': 'This data was produced from the CoinDesk BANNED Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchangerates.org', 'bpi': {'USD': {'code': 'USD', 'description': 'United States Dollar', 'rate_float': 17772.9, 'rate': '17,772.8631'}}}
----------------------------------------
Done!

Code done running.

Console output when connected through network in question:

Code: Select all

ESP32 SPI webclient test
ESP32 found and in idle mode
Firmware vers. bytearray(b'1.2.2\x00')
MAC addr: <<MAC ADDRESS>>
	<<AP LIST HERE>>
Connecting to AP...
Connected to <<AP NAME>> 	RSSI: -50
My IP address is <<ADDRESS>>
Traceback (most recent call last):
  File "code.py", line 68, in <module>
  File "adafruit_esp32spi/adafruit_esp32spi.py", line 653, in get_host_by_name
  File "adafruit_esp32spi/adafruit_esp32spi.py", line 332, in _send_command_get_response
  File "adafruit_esp32spi/adafruit_esp32spi.py", line 288, in _wait_response_cmd
  File "adafruit_esp32spi/adafruit_esp32spi.py", line 197, in _wait_for_ready
TimeoutError: ESP32 not responding

Code done running.

User avatar
mikeysklar
 
Posts: 14179
Joined: Mon Aug 01, 2016 8:10 pm

Re: Matrix Portal M4 connects to WiFi AP but has ESP32 timeout error

Post by mikeysklar »

What frequency is the IT managed AP running at? You must use 2.4GHz with this board.

Are you using a password to connect to the IT network or is it blank? A recent fix was put in for blank passwords.

User avatar
EmperorToast
 
Posts: 3
Joined: Fri Jan 20, 2023 12:30 pm

Re: Matrix Portal M4 connects to WiFi AP but has ESP32 timeout error

Post by EmperorToast »

Thanks for the reply.
Hotspot (working) WiFi is 5GHz, 80MHz. IT-managed (non-working) WiFi is 5GHz, 40MHz.
I checked the setting for extended compatibility on the phone's hotspot and it was off. This seems to me that it is forcing a 5GHz connection, but it was still able to connect. I'm only checking through a computer connection, so I could be mistaken. I'll see if I can get the frequency from the board directly. That may be the issue. I'm checking with our IT now.

Changing the line in secrets.py to 'password' : '', gives a "Failed to connect to ssid" error.
Removing the single quotes and using just 'password' : , gives a syntax error.
Removing the line for the password completely gives me "KeyError: password".

User avatar
mikeysklar
 
Posts: 14179
Joined: Mon Aug 01, 2016 8:10 pm

Re: Matrix Portal M4 connects to WiFi AP but has ESP32 timeout error

Post by mikeysklar »

The ESP32 WiFi chip does not support 5GHz. None of the currently shipping Adafruit WiFi boards based on the ESP32 family support above 2.4GHz at this time.

User avatar
EmperorToast
 
Posts: 3
Joined: Fri Jan 20, 2023 12:30 pm

Re: Matrix Portal M4 connects to WiFi AP but has ESP32 timeout error

Post by EmperorToast »

Thanks. I did confirm that as well in my research. Our IT just confirmed that the AP supports 2.4GHz and 5GHz, so it again seems like it should be connecting properly. I'm still working on making sure it's connecting on the 2.4, but I'm having a separate issue with the pythonwifi module. Since I couldn't find anything in the Adafruit libraries to let me see the WiFi frequency, I'm trying to use python-wifi 0.6.1; however, I get an error saying the module can't be found. Just so I can rule out that it's an issue with the frequency, do you know of any other way to check which frequency it's using to connect?

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”