Wi-Fi and RTSP Camera Stream¶
The IPRO7AI Reef EVK reaches the network through the FIN card: an IPRO6S Wi-Fi card that plugs into the microSD slot (CARD1) and talks SDIO to the IPRO7AI. At the end of this tutorial the Reef runs the Wi-Fi build of its out-of-box firmware ipro7ai_reef_demo (defconfig_wifi_ipro6s), joins your access point and serves the camera as MJPEG over RTSP at rtsp://<IP>:8554/av0_0, which you watch in VLC or ffplay. The last step shows how to update the FIN card's firmware over Wi-Fi with ipro6s_ota.
Prerequisites¶
- An IPRO7AI Reef EVK, an IPRO6S FIN card and an OV5640 FLEX-24 camera module.
- Wi-Fi firmware on the FIN card: the IPRO6S
ipro6_if_wifiapplication built withdefconfig_ipro6_sdio(the SDIO version, see step 2). - An IPRO Debug Probe or a 3.3 V USB-UART cable on U6 (115200 8N1; wiring in IPRO7AI Reef EVK).
- First FreeRTOS Application done, and the IntelProCube 0.7.0.1 command-line flasher installed as in Set Up Your Host.
- A Wi-Fi access point (SSID and passphrase) and a computer on the same network with VLC or
ffplay.
First firmware on a FIN card
The SDK provides the FIN card firmware's sources and build configuration, and the ipro6s_ota command that updates it over Wi-Fi. To write firmware to a FIN card that has none yet, contact INTELPRO.
Steps¶
-
Fit the FIN card and the camera. Unplug USB-C first. Set JP3 to GPIO (the slot supply then follows GPIO14, which
fin cycleneeds to power-cycle the card), insert the FIN card into the microSD slot and the camera cable into FPC1, check that SW7 is on CAM and SW8 on PWR, connect U6, and plug in USB-C last. -
(Optional) Build the FIN card firmware. You need it only to update the card (step 10). From the SDK root:
Output:
apps/platform/ipro6_if_wifi/build_ipro6_sdio/build_out/ipro6_if_wifi_IPRO6.bin. This configuration starts Wi-Fi and the SDIO bridge on its own about 600 ms after reset; nothing is typed on the FIN card, and the Reef drives association and DHCP. -
Build the Reef's Wi-Fi version.
Output:
apps/platform/ipro7ai_reef_demo/build_wifi_ipro6s/build_out/ipro7ai_reef_demo_IPRO7.bin. This configuration addscomponents/network/ipronet_host(the SDIO host side), lwIP and the RTSP server (port 8554) to the out-of-box firmware, and drops the USB microphone (mic usb) to make room. -
Flash. Hold SW1 (BOOT), tap SW2 (RESET) and release SW1 to enter download mode (if the out-of-box firmware is running,
reboot_dldoes the same), then from the IntelProCube directory:Check the output for
[All Success](the tool exits with 0 even on failure). -
Open the console and check the FIN card. Open the console at 115200 baud and tap SW2. The boot log ends with the available commands (level and time fields left out):
REEF: shell ready - `reef`, `led`, `btn`, `spk`, `mic`, `sd`, `fin`, `cam`, `hp` REEF: IPRO-WiFi - `ipronet_up <ssid> <psk>` REEF: RTSP - `rtsp_cam on [fps]`Type
finto check that the card is seated and powered:IPRO6S_FIN: SDIO slave in the SD slot, SD_VDD = its 3V3. seated : yes (DET GPIO15) supply : on (GPIO14, JP3 2-3 required for control) host : SDH_0 on GPIO28-33, see apps/platform/ipro7_sdio_wifi fin cycle | fin power on|off("JP3 2-3" in the message is the jumper name of an earlier board revision; on the V4.0 board it is JP3 = GPIO.)
-
Start Wi-Fi and scan for access points.
Without arguments,
ipronet_uponly starts Wi-Fi on the FIN card and printsipronet_start -> 0.ipro6s_scanstarts a scan whose results arrive asynchronously; after a second or two,ipro6s_scan_lastlists the latest result: -
Join the access point.
[ctrl] connect '<SSID>' -> 0 (CONNECTED_IND + IP_UPDATE_IND arrive async) [ctrl] STA CONNECTED [ctrl] IP <IP address> / <netmask> gw <gateway>To start and connect in one go, type
ipronet_up <SSID> <passphrase>right after a reset instead. If no[ctrl] IP …line appears, typeipro6s_link_status:host connected=1 ip=1means the link is up with an address. -
Start the RTSP stream.
It starts the camera if it is not running yet, then prints the format and the URL:
rtsp_cam: on, <sensor> <width>x<height> JPEG q<quality>, 15 fps rtsp_cam: rtsp://<IP address>:8554/av0_0The default is 15 fps;
rtsp_cam on <fps>takes 1 to 30. -
Watch it on the computer. With the computer on the same network, open a network stream in VLC (Media > Open Network Stream) with the URL from the previous step, or use
ffplay:rtsp_cam statsshows the frames sent, the average JPEG size and encoder errors;rtsp_cam offstops sending (the camera keeps running untilcam stop);ipronet_downshuts Wi-Fi down. -
Update the FIN card firmware.
ipro6s_otadownloads an IPRO6S OTA package from an HTTP server and writes it to the FIN card, whose boot2 installs it after a restart. The package is an IPRO6S package generated by IntelProCube (FW_OTA.bin.xz.ota, a 512-byte header plus XZ-compressed content); for the steps that turn the build from step 2 into a package, contact INTELPRO. Put the package in a folder on your computer and serve that folder over HTTP:At the Reef's console (with Wi-Fi connected), type:
The whole update takes about 30 to 60 seconds: the Reef stops Wi-Fi traffic and downloads the package, the FIN card writes and checks it and restarts to install it, and the Reef enumerates the card again and reconnects. On success it prints:
On failure it prints
[ota] RESULT ERR rc=<code> … phase=<phase>.
Verify¶
finshowsseated : yes, andipro6s_scan_lastlists the access points around you.- After connecting, the console prints
[ctrl] IP …andipro6s_link_statusshowshost connected=1 ip=1. rtsp_cam onprintsrtsp://<IP>:8554/av0_0, VLC orffplayshows live video, and the frame count inrtsp_cam statskeeps rising.
Troubleshooting¶
| Symptom | Cause | Fix |
|---|---|---|
fin shows seated : no |
The card is not fully inserted | Unplug USB-C, reseat the FIN card and power up again |
ipronet_start returns non-zero |
The FIN card does not answer: no firmware, not the SDIO version, or the card is stuck | With JP3 on GPIO, type fin cycle to power-cycle it and try again; check that the card runs ipro6_if_wifi built with defconfig_ipro6_sdio |
ipro6s_scan_last shows 0 APs |
The scan result has not arrived yet | Wait a second or two and run ipro6s_scan_last again; rerun ipro6s_scan if needed |
[ctrl] IP … never appears |
Wrong SSID or passphrase, or the access point is out of range | Check the SSID with ipro6s_scan_last; ipro6s_disconnect, then ipro6s_connect again |
rtsp_cam: camera gives no frames - … |
The camera produces no frames | Check SW7 on CAM and the camera cable; type cam stop, then rtsp_cam on |
rtsp_cam: no IP yet - … |
Wi-Fi has no address yet | Finish step 7, then run rtsp_cam on again for the URL |
| VLC cannot connect | The computer and the Reef are on different networks, or the access point isolates wireless clients | Check that the computer can ping <IP address>; turn off client isolation on the access point |
ipro6s_ota prints [ota] RESULT ERR … phase=fetch |
The computer's HTTP server cannot be reached, or the path is wrong | Open the same URL in a browser on the computer; check the firewall |
Next steps¶
- Networking: the
ipronet_hostAPI, lwIP integration and network settings. - IPRO6S: the IPRO6S chip on the FIN card and the other
ipro6_if_wificonfigurations. - USB Webcam and Rock-Paper-Scissors: send the camera video over USB instead.
- Camera & Imaging: the image pipeline and sensor settings.