mongoose/examples/rp2040/pico-rndis-dashboard
2023-02-08 12:38:11 -03:00
..
netif Add Pico dashboard 2023-01-02 16:49:15 -03:00
CMakeLists.txt Add mass-storage disk with an index file 2023-02-08 12:38:11 -03:00
main.c Move mip/ -> src/tcpip/, rename mip_ -> mg_tcpip_ 2023-02-07 21:35:37 +00:00
Makefile Add mass-storage disk with an index file 2023-02-08 12:38:11 -03:00
msc_disk.c Add mass-storage disk with an index file 2023-02-08 12:38:11 -03:00
README.md Add mass-storage disk with an index file 2023-02-08 12:38:11 -03:00
tusb_config.h Add mass-storage disk with an index file 2023-02-08 12:38:11 -03:00
usb_descriptors.c Add mass-storage disk with an index file 2023-02-08 12:38:11 -03:00

Device Dashboard via RNDIS on an RP2040

Your headless Raspberry Pi Pico-based hardware can also have a device dashboard on a web browser when you connect it to your computer via USB

Build and run

Clone Mongoose repo, go to this example, and build it:

git clone https://github.com/cesanta/mongoose
cd mongoose/examples/rp2040/pico-rndis-dashboard
make build

This will generate a firmware file: build/firmware.uf2. Reboot your Pico board in bootloader mode, and copy it to the RPI disk.

The device will reboot, register as a USB RNDIS device, and add a network and a removable read-only disk to your computer. Open the new drive, named Mongoose, and double click on its INDEX.HTM file; your browser should open and you should see a device dashboard.

Alternatively, you may just run a browser, and open 192.168.3.1,

Note: USB stdio in the Pico-SDK is done in background with TinyUSB and an interrupt to hide it from the user and periodically call tusb_task(). When we use TinyUSB, that code is removed from the compilation list; so this example uses UART stdio (UART 0) to keep things simple and focused on the RNDIS example. If you want to see the console output, connect an USB-to-UART or a low-voltage-TTL-to-RS-232 adapter to GPIO0

Note for Mac users: For this example to run on Mac, please set DUAL_CONFIG=1 in CMakeLists.txt before building; this enables CDC-ECM. Please notice that Windows may not recognize the mass-storage device in that case.