Skip to content

Networking

Daniel Byshkin edited this page Nov 26, 2024 · 5 revisions

Connecting to a wireless network

This assumes you followed the setup guide and have the correct network firmware

Switch from wlan0 mode Ad-hoc to Managed

wapi mode wlan0 2

Set password

wapi psk wlan0 mypasswd 3

Set ssid

wapi essid wlan0 myssid 1

Apply config

renew wlan0

To see the active options for the connection

wapi show wlan0

Troubleshooting

If you get an error saying ERROR: netlib_obtain_ipv4addr() failed there are 2 possible reasons

  1. The ssid or password are wrong
  2. The custom wifi firmware wasn't integrated properly

To confirm the missing firmware run the following from the nuttx directory

cat boards/arm/rp2040/common/src/cyw43439.firmware.image

If the result is "dummy" then the custom firmware wasn't installed correctly, refer to the the installation steps about a possible fix. You can also monitor this thread in hope for an answer.

Using multicast

As for now we only manged to make multicast work with the pico sending and a pc receiving, not the other way around.

This guide assumes you used the defconfig file provided by the installation instructions, if that's not the case add the following config options:

NET_ROUTE=y
NET_IGMP=y

Setup

  1. Connect the pico to a wireless network
  2. Run the following command
ifconfig
  1. Add a multicast route
addroute 224.0.0.10/32 "DRaddress from the previous step"
  1. Confirm changes with
route ipv4

On Linux

sudo ip route add 224.0.0.10/32 dev YOUR_NETWORK_INTERFACE

Additional resources

https://nuttx.apache.org/docs/latest/applications/wireless/wapi/wireless.html

https://nuttx.apache.org/docs/latest/platforms/xtensa/esp32/index.html#esp32-wi-fi-sta

Clone this wiki locally