mongoose/examples/rp2040/pico-rndis-dashboard
Sergio R. Caprile 45f7afb3e1 Simplify build
2023-01-17 13:54:22 -03:00
..
netif Add Pico dashboard 2023-01-02 16:49:15 -03:00
CMakeLists.txt Add Pico dashboard 2023-01-02 16:49:15 -03:00
main.c Rename mip_rxcb to mip_qwrite, add mip_qread and enforce rx() for drivers 2023-01-03 19:33:26 -03:00
Makefile Simplify build 2023-01-17 13:54:22 -03:00
mongoose.c Add Pico dashboard 2023-01-02 16:49:15 -03:00
mongoose.h Add Pico dashboard 2023-01-02 16:49:15 -03:00
net.c Add Pico dashboard 2023-01-02 16:49:15 -03:00
packed_fs.c Simplify build 2023-01-17 13:54:22 -03:00
README.md Add Pico dashboard 2023-01-02 16:49:15 -03:00
tusb_config.h Add Pico dashboard 2023-01-02 16:49:15 -03:00
usb_descriptors.c Add Pico dashboard 2023-01-02 16:49:15 -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/ro2040/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 to your computer. Run a browser, and open 192.168.3.1, you should see a device dashboard

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