Wio RP2040 WIFI UART or SPI

I am really struggling to understand Wifi on the WIO RP2040
UART does not work

Can anyone from SEED Studio tell me which UART port the ESP8285 is actually connected to and the baud rate and any other information needed to communicate with it?

I’m not really interested in Python I use Basic and want to use Picomite Basic with this module but to use the ESP8285 functions I need to know what the UART connection details are

I know the wifi works because I used the test script and using SPI it connected and worked in Python
I really would prefer to use UART though

In an earlier post someone from SeedStudio posted this for SPI communications

MISO:8
MOSI:11
CLK:10
CS:9
HandShake:21

Are those GPIO numbers or Pin numbers?

ALSO:

IS there a list of AT commands the ESP8285 uses?

Anyone???
Surely someone from Seeed reads these posts and must know the answer?

IS the uart of the esp8285 actually connected to the RP2040 or can we only use SPI?

Hello, esp8285 and RP 2040 are connected through SPI, the above is the pin number, you can refer to this document for more information

1 Like

Thanks
Is the ESP8285 programmed with the AT command set?
is there a definitive list of what commands are actually available ?

We don’t have a list like this, sorry.

The pins above do not correspond with ESP8285 pins, so we do not know if they are from SPI or HSPI, but they do with the RP2040 pins in the datasheet, see:

Anyway, I think it is irrelevant the pins used in ESP8285, as the firmware there won’t be changed, only pins in RP2040 are meaningful for the purpose of substituting the python image by the basic one.

Regarding AT commands, I found an article here:

which points to this AT command set:
http://room-15.github.io/blog/2015/03/26/esp8266-at-command-reference/

And there is another thread in this forum (Wio RP2040 mini - MicroPython firmware) speculating about the author of the micropython port, with a link to github for “IsQianGe” user and project “rp2040-spi”.

The interesting part is that the same author has another project “rp2040_uart_wifi_8285” which uses libat_core.a, and this also describes the ESP-AT command set:
https://docs.espressif.com/projects/esp-at/en/latest/

1 Like

I can connect to the WIO RP2040 using SPI now

Using this code I can switch the wifi to Station Mode but as soon as it does it loses connection to the computer (Thony Editor)

[CODE]import usocket
from machine import Pin, I2C, ADC, UART, SPI, PWM
from time import sleep

N1 = network.WLAN_SPI(network.STA_IF)
N1.active(True)

print(“API list:”)
dir(N1)

print(“wifi list:”)
lis = N1.scan()
for q in lis:
print(q)

N1.connect(“access point”,“password”)
if N1.isconnected():
print(" ip gateway netmask MAC ssid")
print(N1.ifconfig())[/CODE]

It returns this error:

Unable to connect to COM18: could not open port ‘COM18’: PermissionError(13, ‘Access is denied.’, None, 5)
If you have serial connection to the device from another program, then disconnect it there first.
Backend terminated or disconnected. Use ‘Stop/Restart’ to restart.

If I try this

[CODE]import usocket
from machine import Pin, I2C, ADC, UART, SPI, PWM
from time import sleep

N1 = network.WLAN_SPI(network.STA_IF)
N1.active(True)[/CODE] it does the same thing

I know it’s working because when I plug the RP2040 in I can see ESP-AP in my list of wifi stations
Is this right? shouldn’t that only happen if I used N1 = network.WLAN_SPI(network.AP_IF)?

Why do I lose my com port connection to the RP2040 after running the program and the only way to get control again is to reset it