Repo that contains scripts to control a ClearView receiver as well as the code for the ESP32 wireless module
$ git clone https://github.com/ryaniftron/clearview_interface_public.git
- Install python 3.8.1 or later. Recommended to use pyenv
https://realpython.com/intro-to-pyenv/
$ cd clearview_interface_public
$ pyenv install 3.8.1
$ pyenv local 3.8.1
$ python --version
Expect3.8.1
python -m pip install pyserial
- Remove .espressif if it exists with
$ rm -r ~/.espressif/
- Install espidf
- Checkout and use release/v4.2 branch as shown here
Warning: Docker only can access USB devices if your host is Linux. See here for Windows and here for Mac.
The 4.3 release will be used for development, as found here
$ sudo docker pull espressif/idf:release-v4.3
clang-format will be used to format code. See here for vscode setup. Use the format on save option in VSCode.
To build:
$ cd src/cvesp32
$ scripts/init.sh
To build and connect to /dev/ttyUSB0
$ cd src/cvesp32
$ ../scripts/init.sh 0
To exit the IDF monitor, type ctrl+]
Check main.py to turn on simulator if you do not have a ClearView. If you do have one connected, turn off the simulator and supply the correct serial port name.
$ cd clearview_interface_public
$ python src/clearview-py/main.py
As of May 2, 2018, the wireless ESP32 modules are still in production at Iftron. To get off the ground running before than, any ESP-wroom-32 development board can be used.
Required Hardware
- ClearView 2.0 Receiver
- ClearView 2.0 Update Board
- ESP32 Development Board
Connections
- ESP32 P16 (U2RXD)- CV Breakout White (Tx of ClearView)
- ESP32 P17 (U2TXD)- CV Breaktout Green (Rx of ClearView)
- ESP32 GND - CV Breakout GND
- ESP32 3V3 - CV Breakout 3.3V pad
On the update board, I soldered from the +3.3v pad of the LED to an unconnected pin on the breakout. On the back side, you can then solder a jumper to the ESP32.
- Install ESPIDF. Ensure you can successfully flash the hello world example
$ cd clearview_interface_public/src/cvesp32
- If you are doing development and want to view the log output, comment out the sdkconfig defaults that are used in production as seen here
$ idf.py build flash monitor
- You may need to specify port like
$ idf.py -p /dev/ttyUSB0 build flash monitor
- On Linux, you can find the port by plugging in the ESP32 and then running
$ dmesg | grep tty
- You may need to specify port like
- Using any device that supports WiFi and has a web browser, connect to the network starting in "CV"
- Navigate to the ESP32 Home Page on a web browser
$ http://192.168.4.1
- It should show the ClearView ESP32 Config screen
ClearView manufactures a ready to use module that plugs directly into the ClearView 2.0. This is strongly recommended and does not require installing the ESPIDF development environment
- Purchase a CV2.0 Wireless Module from ClearView
- Plug into a ClearView 2.0
- If the firmware is not up to date, you will be able to update it wirelessly. The exact process is still in development