wlan.active(True) hang up for Arduino RP2040 Connect

Hi. I am trying to do the wifi scan using with Arduino RP2040 Connect with MicroPython. However, I am struggling with activating the wifi. Here is the code below :-

Basically, I just copied from standard code from Arduino's MicroPython example. The different is I am using the UART port for displaying instead of using print statement for output.

I am using PyCharm IDE. But I think it is not relevant because I try with Pico-W with similar coding (wifi scan) but it works well on Pico-W.

Anyone have idea how to solve it?

Thanks,
Cimiy

------- Code --------

"""
Demo program for Arduino RP2040 Connect
"""

import machine, time, network

led = machine.Pin("LED", machine.Pin.OUT)
uart = machine.UART(0, baudrate=9600, tx=machine.Pin(0), rx=machine.Pin(1))
wlan = network.WLAN()
wlan.active(True) # <----- Hang up this line

uart.write('Scanning\r\n')
uart.write(f'Status = {wlan.status()}')
while True:
    led.on()
    #scan_result = wlan.scan()
    uart.write('Message from Arduino RP Connect...MicroPython\r\n')
    time.sleep(1)
    led.off()
    time.sleep(0.1)

Hi all,

I spent couple of hours to trial and error and I found that due to the old version of NINA WiFi firmware 1.4.8. The latest MircoPython (ARDUINO_NANO_RP2040_CONNECT-20231227-v1.22.0.uf2) cannot support it.

So right now, I downgrade the MicroPython version to V1.18 (ARDUINO_NANO_RP2040_CONNECT-20220117-v1.18.uf2) and now it's working properly. I am using simple Thonny IDE.

This is the containment solution, I think.

Regards
Cimiy

1 Like

Hi @cimiy.

I don't know whether it is possible to do using MicroPython, but if you want to update the firmware on the board you can do that using Arduino IDE. Instructions are available here:

https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-fw-cert-uploader/

You'll need to first restore the board's compatibility for use with Arduino IDE by performing this procedure:

https://docs.arduino.cc/tutorials/nano-rp2040-connect/rp2040-01-technical-reference/#board-not-detected

Hi @ptillisch , thx for your response.

For trying to update the firmware from 1.4.8 to 1.5.0. I did try different way of working as below:-

  1. Use the CLI command line updater to directly do the update - failed
  2. Use the Arduino build in IDE (version 2.3.2) to do the updating - failed. Please see the capture below :-

By the way, I have gone a lot of messages at this forum, seems this issue is kept on-going and no solid solution yet.

My application target to using MicroPython. Right now for the WiFi part, I proved it works using the combination of NINA@1.4.8 + MicroPython@1.18. But I sure that is it not the good combination as both of them are already outdated. MP@1.18 doesn't support to lit on the RGB LEDs :frowning:

So, it is the best if I can update the NINA to 1.5.0.

Regards
Cimiy

I'm sorry to hear the firmware update failed.

Please post the full output from a failed update using the command line updater.

Unfortunately Arduino IDE does not provide any information that can be used to troubleshoot a firmware update failure (deficiency tracked here).