How to prepare for using this software and how to interface with the abstraction provided by this driver
-
Create tmpfs filesystem in RAM and mount it under path /custom :
$ mount -t tmpfs -o size=16m tmpfs /custom -
Set appropriate permissions for /custom
-
The driver control files will be present inside the /custom/ucdX driver provided device directory which is created upon running the driver executable for a given serial port and device index (see below)
-
A serial port file has to be provided as an argument to the driver executable, together with a device index, for example
$ ucd /dev/ttyUSB0 0will attach the driver to the serial port/dev/ttyUSB0and create a driver-provided device directory/custom/ucd0. -
Writing
fto/custom/ucdX/requestwill request a frame from an ESP32-CAM running the uart-cam firmware. To check if the frame is ready, you can read from/custom/ucdX/state.1means ready and0means not ready. -
To perform an OTA update over UART, the driver user writes the new firmware to
/custom/ucdX/firmware(for example$ cat /path/to/firmware | tee /custom/ucdX/firmware), then triggers the update by writinguto/custom/ucdX/request.
In the newest version of the program there is an additional paramter - 0 or 1 indicating whether to drain the serial input before handling communications