Connecting IDE to RP2040 Connect using WiFi

I want to develop and use my IoT untether using WiFi and Micropython. The project is to be used as a micropython teaching platform.

I have installed micropython on the RP2040 and successfully run a script to connect it to my local network. None of the IDEs, Thonny, Arduino IDE etc seem to look towards the network to discover a micro computer such as the RP2040, only USB and COM ports.

Surely having your IoT untethered from USB must be of interest to many IoT projects.
Either it's only me, or I'm missing something simple

As any one achieved this

Thanks

Hi @jblyth. You might be interested in the "OTA" upload capability that is available for use with the Nano RP2040 Connect board when using the Arduino Cloud service:

there is OTA for RP2040 with Arduino IDE, but not for micro-python

Have just downloaded the latest version of Thonny 4.1.2 and the good news is there is now the possibility of a WebREPL network interface connection with the RP2040 Connect. The bad news is it won't connect.

This is what you get when you try

WebREPL connected
OK
MPY: soft reboot

Connection lost -- [WinError 1225] The remote computer refused the network connection

Use Stop/Restart to reconnect.

Process ended with exit code 1.

It does however connect ok if using WebREPL from a browser (It always did).

I took a network trace of the TCP activity between the PC and the RP2040 when using Thonny. After the initial three way sync completes the first payload the PC sends to the 2040 is

GET / HTTP/1.1..Host: 192.168.1.65:8266..Upgrade: websocket..Connection: Upgrade..Sec-WebSocket-Key: C9idtNEIJd/bnvMbCwSulg==..Sec-WebSocket-Version: 13..Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits..User-Agent: Python/3.10 websockets/11.0.3....

It responds with

HTTP/1.1 101 Switching Protocols..Upgrade: websocket..Connection: Upgrade..Sec-WebSocket-Accept:

Then sends a message with the RST bit set. Hence the refusal.

The first payload from the PC when using a browser is different.

GET / HTTP/1.1..Host: 192.168.1.65:8266..Connection: Upgrade..Pragma: no-cache..Cache-Control: no-cache..User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36..Upgrade: websocket..Origin: http://micropython.org..Sec-WebSocket-Version: 13..Accept-Encoding: gzip, deflate..Accept-Language: en-GB,en-US;q=0.9,en;q=0.8..Sec-WebSocket-Key: X0yjqAWfmIgJVPDof6TSbQ==..Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits....

Followed again by

HTTP/1.1 101 Switching Protocols..Upgrade: websocket..Connection: Upgrade..Sec-WebSocket-Accept:

This first payload I think is negotiating parameters, and although the 2040 initially accepts them from Thonny, it changes it's mind and resets the connection.

Anybody got a RP2040 connect they could try.

Interesting problem (I think)

Thanks

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.