5GHz ESP32 C5 finally here and was easy to port code to.
Espressif's C-centric IDF/FreeRTOS made this intuitive and fast.
They were kind enough to quickly sent samples of their ESP32-C5-WROOM-1 V1.2 module and we were up
and running across 2.4GHz and 5GHz hotspots in one day with dead bug wiring.
Also threw together the demo PCB in the picture (click pic for full image).
Notes:
The V1.2 WROOM module has a different pinout than the one in their C5 DevKit. So make sure to follow what is silkscreened on the module and not any diagrams. Espressif did send along a good document describing this difference as well as caveats regarding these advanced parts. I have:
As far as I can tell, as of this date, everything (net, time, nvs, wifi, freertos, ...) worked for me.
You really do not need an external UART. The default jtag USB port provides all flashing and console (eg, printf) functionality. You could theoretically just connect GPIO13/14 to a USB connector, 10K pullup to EN, 3.3V, GND and flash the firmware. We just did:
Connect the ESP32C5 USB pins to a USB port on your Linux machine and start a bash shell.
$ mkdir testdir
$ cd testdir
$ wget https://www.sms4iot.com/files/esp32893573.tar.gz
$ tar zxf esp32893573.tar.gz
$ . ~/esp32/esp-idf/export.sh <-- if you have not done so already as an esp32 developer
$ ./doflash /dev/ttyACM0
$ screen /dev/ttyACM0 <-- to see what the device is doing
The ESP32C5 should do a wifi scan and display a list of ssid's.
Typing "reset" will reboot so that you can see what is going on from the start.
If it finds a captive/non-captive portal hotspot, e.g., starbucks or mcdonalds, or airport, it will attempt to connect to it.
If unsuccessful it will scan again, skipping the failed one for a few tries.
If successful, it will try to connect to our test demo server using the protocol.
SMS was built on cellular managment infrastructure.
Simlarly SMS4IOT utilizes Internet managment infrastructure to communicate short messages. Therefore, SMS4IOT messages are also short and latency is high (~20sec).
However, like SMS, no "call" or login needs to have been established to communicate.
This removes burdensome WiFi configuration requirments and makes SMS4IOT a perfect candidate for the majority of IoT applications where data rate is very low or sporadic. ....
Note: There is no need to interact with hotspot splash/login screens.
If the sms4iot connection works, you should start seeing live airport code/temperature data from the demo server every ~30sec.
This will show up as <-IE_SETMSG2 on the serial screen and scroll on the ssd1306 display (if installed).
The IE_STATUS2-> message shows sample data being sent to the demo server like version, uptime, ADC reading, ssid.
Enter "qr" on console and scan the QR code returned (good for 15 seconds) to use our demo-test web app to monitor your device(s).
You must enter "qr" again to unblock the console. Note that the demo web app can
manage multiple devices from one account. Just successively scan the QR codes for all your devices.
To remotely toggle relay state, click on green relay state. It will turn yellow and wait until
the device communicates back the changed state.
Notes on f/w:Newest NIST ASCON crypto protecting 2-way messaging; ED25519/SHA3 validated OTA firmware updates; SSD1306 display support; mesh networking (thank you Espressif for fixing C5 bug); Autoprovisioning; and of course Seamless 5GHz 2.4GHz support.
FWIW: Demo ESP32S2 Firmware/hash/PGPsigDemo ESP32C3 Firmware/hash/PGPsigDemo ESP32 Firmware/hash/PGPsig