Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.
0

Nano RP2040 Connect AIO Issues
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Nano RP2040 Connect AIO Issues

by x00syn4ps3 on Tue May 25, 2021 11:15 pm

I was super stoked to finally have gotten my Arduino RP2040 Connect boards! I realize it is fresh on the scene, but had hoped that Arduino would've already had a micropython port cooked up and ready to go come launch...but oh well. Compiled up the current Beta for Circuitpython, and have already experienced some breakage after connecting to wifi and trying to retrieve values from various servers.

Solution, go back to the Arduino IDE...sort of..

Reading from sensors over I2C and what not is fine, but I've tried compiling code to use both the Adafruit IO Wifi library to connect over HTTPS, as well as MQTTS. Both throw errors when trying to compile for the board. Any idea of this is an issue with new board support for these Adafruit Arduino libraries, or just waiting on an update to be pushed?

Thanks!

no-bueno.png
no-bueno.png (92.1 KiB) Viewed 467 times

x00syn4ps3
 
Posts: 7
Joined: Thu Sep 19, 2019 11:59 pm

Re: Nano RP2040 Connect AIO Issues

by mikeysklar on Thu May 27, 2021 1:25 pm

The initial pull request for CircuitPython support on the Nano RP2040 Connect is only six days old and did not include any testing of WiFi. Otherwise the digial/analog, i2c and LSM6D should be working.

https://github.com/adafruit/circuitpython/pull/4802

The errors you are now seeing on the Arduino IDE side about WiFi NINA looks like they are due to duplicate conflicting header files. Sometimes the easiest way to resolve this is to move your Arduino folder to a new name and start with a fresh install.

mikeysklar
 
Posts: 4576
Joined: Mon Aug 01, 2016 8:10 pm

Re: Nano RP2040 Connect AIO Issues

by x00syn4ps3 on Fri May 28, 2021 10:25 pm

Thanks for the quick reply,

I was hoping that the solution would be something simple like that, but that apparently is not the case. I went in and removed any old duplicate libraries, and even went ahead and did a fresh install of what I needed. The issue appears to be in the MQTT library itself. I tried changing the variable type as well to see if that alleviated any issues, but float, int32_t, and uint32_t all still produce the same compilation error.

I also plan to share a screen snip of the circuitpython internet connect issues as well sometime tomorrow. The Nano Connect is able to connect to wifi just fine, but there is an issue establishing the socket that is used for the actual request to any url I try to make. I'll probably just submit an issue on GitHub with the snip later. For now, here is the continued compilation failure output in the Arduino IDE:

no-bueno2.png
no-bueno2.png (103.7 KiB) Viewed 435 times

x00syn4ps3
 
Posts: 7
Joined: Thu Sep 19, 2019 11:59 pm

Re: Nano RP2040 Connect AIO Issues

by x00syn4ps3 on Sun May 30, 2021 10:00 pm

Hey All,

Just wanted to make a quick post after doing some troubleshooting on the Circuitpython side of things, I appear to have figured out what the issue seems to be when making requests and trying to connect to Adafruit IO...whether it be using the HTTP Client or MQTT. There is an issue establishing a socket connection when using a HTTPS url endpoint, as well as using the default MQTTS broker when using a client that way as well.

I haven't gotten around yet to re-loading C/C++ on my RP2040 Nano Connect, but it almost certainly will require the same solution as in circuitpython...and that is by using either standard HTTP or MQTT. The screenshot below is from my posting on the circuitpython issue tracker thread that I opened. While using un-encrypted MQTT traffic is not ideal, I personally have no issues using it as a work-around for right now simply because I have my router send all outgoing traffic through a VPN tunnel to wherever it needs to go. I'm sure Ladyada and everyone else will have a fix soon enough!!!

Screen Shot 2021-05-30 at 9.46.09 PM.png
Screen Shot 2021-05-30 at 9.46.09 PM.png (428.18 KiB) Viewed 421 times

x00syn4ps3
 
Posts: 7
Joined: Thu Sep 19, 2019 11:59 pm

Re: Nano RP2040 Connect AIO Issues

by x00syn4ps3 on Wed Jun 09, 2021 9:07 pm

Hey Everyone,

For the sake of completeness I wanted to go ahead and post that I can confirm the same issues I reported about the failure to establish an SSL/TLS socket on C/C++ using the Arduino IDE as well on this board. I first tried using the sketches with the new IDE 2.0, and then thought maybe the stable 1.8 version of the IDE might produce different results...but alas, there still seems to be a failure retrieving page data over HTTPS.

I have been emailing back and forth with someone at Arduino trying to get things figured out, but for the time being, WifiSSLClient does not seem to work properly. Only using the WifiWebClient and port 80 will result in successful code execution and data retrieval. Hopefully this can be fixed sooner rather than later so I don't have to rely on a VPN tunnel to make my connections with this board secure.

The following snip just shows the HTTP client successfully retrieving data from Google. The HTTPS client fails to do so still...

Screen Shot 2021-06-09 at 8.30.11 PM.png
Screen Shot 2021-06-09 at 8.30.11 PM.png (537.14 KiB) Viewed 203 times


Good Luck!

x00syn4ps3
 
Posts: 7
Joined: Thu Sep 19, 2019 11:59 pm

Re: Nano RP2040 Connect AIO Issues

by brubell on Fri Jun 11, 2021 9:36 am

I have been emailing back and forth with someone at Arduino trying to get things figured out, but for the time being, WifiSSLClient does not seem to work properly.


It may be possible they don't have the Adafruit IO root SSL certificate stored in their nina-fw firmware (runs on the ESP32, on the RP2040 Connect). Our "airlift" modules contain the Adafruit IO root SSL cert, we've included it in our fork of nina-fw.

Considering you had success in CircuitPython by using the insecure port (1883), this is likely the case. Arduino will need to add the Adafruit IO Root SSL certificate to nina-fw.

If you are still having an ongoing convo with them, please point them towards this forum thread and I can discuss it with them here.

brubell
 
Posts: 1381
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.


cron