Not yet, I trusted the power of Apple
Will try another PC.
Start order:
- UART Adapter Connected to the Toniebox
- UART Adapter to PC
- Tonie to Power Connecter
All other peripherals and battery are disconnected
Not yet, I trusted the power of Apple
Will try another PC.
Start order:
All other peripherals and battery are disconnected
So just to drop this here that may help some of you with issues connecting UART to the board:
WWZMDiB EEPROM Programmer & CH341A Programmer (CH341A + SOIC8 Clip + Dual Conversion Plate Amazon.com
No need to solder, especially for something you probably only need to do once or twice.
UART sold separately
It it really an issue with the MacBook….
Successfully first try dump on the windows machine (after adapter driver installation, reboot, and bitlocker and windows recovery key query……)
Thanks for the hints and help!
Just so everyone can see the clamp kit I recommended in action. It works well, I’ve flashed 2 boxes so far:
Great, this clamp is dual use. UART + Flash SOP8
Hi, I’m stuck at extracting the certificates. I followed the doc and downloaded the bin. When I run teddycloud ESP32CERT extract data/firmware/ESP32_mac_ 1.bin certs/client
/certs/client stays empty and I get this output:
root@teddycloud:/teddycloud# teddycloud ESP32CERT extract data/firmware/ESP32_mac_1.bin certs/client/
TeddyCloud vX.X.X (9572d62) - 2024-07-06 19:24:58 +0000 ubuntu linux-x86_64(64)
INFO |settings.c:0779:settings_load_ovl()| Load settings from /teddycloud/config/config.overlay.ini
INFO |settings.c:0779:settings_load_ovl()| Load settings from /teddycloud/config/config.ini
INFO |tls_adapter.c:0208:read_certificate()| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
INFO |tls_adapter.c:0205:read_certificate()| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0208:read_certificate()| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
INFO |tls_adapter.c:0205:read_certificate()| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
ERROR|tls_adapter.c:0193:read_certificate()| Failed to open '/teddycloud/certs/client/ca.der' for cert type detection
ERROR|tls_adapter.c:0380:load_cert()| Loading cert '/teddycloud/certs/client/ca.der' failed
ERROR|tls_adapter.c:0193:read_certificate()| Failed to open '/teddycloud/certs/client/client.der' for cert type detection
ERROR|tls_adapter.c:0380:load_cert()| Loading cert '/teddycloud/certs/client/client.der' failed
ERROR|tls_adapter.c:0193:read_certificate()| Failed to open '/teddycloud/certs/client/private.der' for cert type detection
ERROR|tls_adapter.c:0380:load_cert()| Loading cert '/teddycloud/certs/client/private.der' failed
INFO |settings.c:0779:settings_load_ovl()| Load settings from /teddycloud/config/config.overlay.ini
INFO |tls_adapter.c:0394:tls_adapter_init()| Loading certificates...
INFO |tls_adapter.c:0208:read_certificate()| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
INFO |tls_adapter.c:0205:read_certificate()| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
INFO |tls_adapter.c:0208:read_certificate()| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
INFO |tls_adapter.c:0205:read_certificate()| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
ERROR|tls_adapter.c:0193:read_certificate()| Failed to open '/teddycloud/certs/client/ca.der' for cert type detection
ERROR|tls_adapter.c:0380:load_cert()| Loading cert '/teddycloud/certs/client/ca.der' failed
ERROR|tls_adapter.c:0193:read_certificate()| Failed to open '/teddycloud/certs/client/client.der' for cert type detection
ERROR|tls_adapter.c:0380:load_cert()| Loading cert '/teddycloud/certs/client/client.der' failed
ERROR|tls_adapter.c:0193:read_certificate()| Failed to open '/teddycloud/certs/client/private.der' for cert type detection
ERROR|tls_adapter.c:0380:load_cert()| Loading cert '/teddycloud/certs/client/private.der' failed
ERROR|server.c:0627:server_init()| httpServerInit() for HTTP failed with code 1
=================================================================
==161==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 936 byte(s) in 1 object(s) allocated from:
#0 0x564f01e8aa67 in __interceptor_malloc (/usr/local/bin/teddycloud+0x657a67)
#1 0x564f0238aff2 in socketOpen src/platform/platform_linux.c:48
#2 0x564f0210af21 in httpServerInit src/cyclone/cyclone_tcp/http/http_server.c:169
#3 0x564f01f8057b in server_init src/server.c:624
#4 0x564f01df4f0d in main src/main.c:567
#5 0x7f1329b47d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
Direct leak of 451 byte(s) in 16 object(s) allocated from:
#0 0x564f01e8aa67 in __interceptor_malloc (/usr/local/bin/teddycloud+0x657a67)
#1 0x564f01f82711 in custom_asprintf src/server_helpers.c:39
#2 0x564f01f70180 in mqtt_init src/mqtt.c:947
#3 0x564f01df4ee0 in main src/main.c:566
#4 0x7f1329b47d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
Direct leak of 367 byte(s) in 16 object(s) allocated from:
#0 0x564f01e8aa67 in __interceptor_malloc (/usr/local/bin/teddycloud+0x657a67)
#1 0x564f01f675bb in mqtt_topic_str src/mqtt.c:86
#2 0x564f01f701e2 in mqtt_init src/mqtt.c:949
#3 0x564f01df4ee0 in main src/main.c:566
#4 0x7f1329b47d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
Direct leak of 351 byte(s) in 16 object(s) allocated from:
#0 0x564f01e8aa67 in __interceptor_malloc (/usr/local/bin/teddycloud+0x657a67)
#1 0x564f01f675bb in mqtt_topic_str src/mqtt.c:86
#2 0x564f01f701b1 in mqtt_init src/mqtt.c:948
#3 0x564f01df4ee0 in main src/main.c:566
#4 0x7f1329b47d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
Direct leak of 191 byte(s) in 16 object(s) allocated from:
#0 0x564f01e8aa67 in __interceptor_malloc (/usr/local/bin/teddycloud+0x657a67)
#1 0x564f01f67431 in mqtt_settingname_clean src/mqtt.c:58
#2 0x564f01f700fd in mqtt_init src/mqtt.c:945
#3 0x564f01df4ee0 in main src/main.c:566
#4 0x7f1329b47d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
Direct leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x564f01e31ba7 in __interceptor_strdup (/usr/local/bin/teddycloud+0x5feba7)
#1 0x564f01f80512 in server_init src/server.c:621
#2 0x564f01df4f0d in main src/main.c:567
#3 0x7f1329b47d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
Direct leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x564f01e31ba7 in __interceptor_strdup (/usr/local/bin/teddycloud+0x5feba7)
#1 0x564f01f80362 in server_init src/server.c:613
#2 0x564f01df4f0d in main src/main.c:567
#3 0x7f1329b47d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
SUMMARY: AddressSanitizer: 2298 byte(s) leaked in 67 allocation(s).
root@teddycloud:/teddycloud# teddycloud ESP32CERT extract data/firmware/ESP32_mac_1.bin certs/client
TeddyCloud vX.X.X (9572d62) - 2024-07-06 19:24:58 +0000 ubuntu linux-x86_64(64)
I downloaded the bin several times via the webinterface and with esptool but it’s always the same when extracting ther certificates. Whats wrong here?
The guide uses an outdated syntax, please follow the original guide
Thank you for pointing this out! I got the certs now
Hey all,
I guess I am somehow stupid… I got the cloud up and running on my synology nas, I got the clamp attached so that I can read the serial information but what I do not get done is “short the jumper J100”. I put a cable in to connect the J100 with the whole next to it but it still starts in “SPI_FAST_FLASH_BOOT” mode and I do not get why. I tried multiple cables already so that I am sure that this is not the case.
Any idea what I could do?
can you maybe share a picture of that?
ah, this is J101 not J100, take a look into the board in the first post.
Fixed in the post
mmhhhmm… yes… sorry…
Hello, it is me again. I ran in the next issue and can not fix it on my own or with the FAQ :-(.
I was able to Read via the web UI and I was also able to move the certificates. When this was done I could also generate the patched version of the .bin file but I can not flash it to the ESP. In the UI it either timeouts or, when I restart the box and reconnect the usb port “Failed to communicate: Failed to execute ‘open’ on the ‘SerialPort’: Failed to open serial port”
When I try to do it via shell I also get an error on the corresponding type:
Serial port /dev/ttyUSB0
Connecting…
Detecting chip type…
/dev/ttyUSB0 failed to connect: Unexpected UART datecode value 0x03700000. Failed to autodetect chip type.
I am out of ideas and could so not fine any help online till now
EDIT
only restarting the box made the job.
The Toniebox needs to be powered through all this, correct?
Also, which is the adapter which didnt work for you? I got one which directly plugs into the USB port and I don’t get any output at all.
EDIT: No output, because my user didn’t have permission to /dev/ttyUSB0.
I had issues because I first put my UART to 5 V. Check to make sure it is set to 3,3 V. And remember to short J100 before you power up the box.
All worked for me now.
I used this adapter: https://www.amazon.de/dp/B08T24NML9.
For the documentation, I am missing an explicit mention of powering the board while having it connected to the UART. Connecting the battery worked for me. And yes, also mention to put it in 3,3V mode.
For the troubleshooting section, add a section for correct permissions for the USB device. Suggested by esptool
: sudo usermod -a -G dialout $USER
and then reboot.