Skip to content

Nano Connect RP2040 Requests Error #4828

Closed
@dedSyn4ps3

Description

@dedSyn4ps3

Firmware

Adafruit CircuitPython 6.2.0-beta.2 on 2021-05-28; Arduino Nano Connect RP2040
Adafruit CircuitPython 7 built on 2021-05-27; Arduino Nano Connect RP2040

Code/REPL

--- snip ---
print("Connected to", str(esp.ssid, "utf-8"), "\tRSSI:", esp.rssi)
print("My IP address is", esp.pretty_ip(esp.ip_address))

print()
print("Fetching json from Initial State")
r = requests.get("https://api.init.st/data/v1/events/latest?accessKey=abcd1234&bucketKey=efg5678") # This is line 52
print(r.text)
r.close()
--- snip ---

Behavior

Firmware vers. bytearray(b'1.4.5\x00')
MAC addr: ['0x6c', '0xb9', '0x2f', '0xa8', '0xcc', '0x84']
Connecting to AP...
Connected to GL-AR-Guest 	RSSI: -64
My IP address is 192.168.9.222

Fetching json from Initial State
Traceback (most recent call last):
  File "code.py", line 52, in <module>
  File "adafruit_requests.py", line 684, in get
  File "adafruit_requests.py", line 562, in request
  File "adafruit_requests.py", line 429, in _get_socket
RuntimeError: Sending request failed

Description

  • Error establishing socket to make request...
  • Only happens when making a request (so far, haven't tested additional cases)...
  • uBlox Co-processor makes successful connection to AP, so no issue there..only when attempting to make a request...

Additional Info

Prior to the official release on the Circuitpython.org website for the Arduino Nano Connect RP2040, I had compiled the "Absolute Newest" testing branch for the board right after the pull request was made and added it. I compiled everything and flashed it onto the nano connect.

I2C, SPI, and all the other basic protocols worked just fine, and I noticed that the release version was for circuitpython 7, so I went ahead and downloaded both the compiled .mpy bundle, as well as the .py bundle to test making web requests with both. Each time the board would successfully connect to wifi, retrieve an IP Address via DHCP...but then would fail upon trying to establish a proper socket.

The next day, I saw the official release for the board on circuitpython.org, but this time using the version 6.x of the firmware. I downloaded that, re-flashed my board, and then downloaded the bundles for the 6.x version of the firmware. Once again, there is a failure to establish a proper socket when attempting to make a request using the 'adafruit_requests' library.

I have not had the time to dig into the library code to locate what exactly seems to be the issue, but am attaching a screen snip of the debugger lines showing where in the code the problem seems to stem from. I realize that this board is super new, and development is ongoing. I'll keep tinkering with it, but also have issues using the C/C++ side of things as well with the MQTT library for Adafruit IO (which I have made a post about on the Adafruit Forums).

Screen Shot 2021-05-28 at 9 23 50 AM

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions