Error 304 - cloud connection

Hello everyone,
i have the same issue as yell, but i didn’t want to create an extra thread.
I flashed my toniebox twice, that’s why i had ( i think) some issue with the certs. After i figured that out i extracted the certs from my backuped .bin and copied the 3 files into:

  • /teddycloud/certs/client
  • /teddycloud/certs/client/
  • and the ca.der also in /teddycloud/certs/server

Now i’m getting the [304] issue.
I did a freshness-test and this is the result:

INFO |toniesJson.c:0124:tonies_update| ... success updating tonies.json from api.revvox.de, reloading
INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 338
INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.json with size 4995321
INFO |toniesJson.c:0211:tonieboxes_update| Updating tonies.json from api.revvox.de...
INFO |cloud_request.c:0200:web_request| Connecting to HTTP server api.revvox.de:443...
INFO |cloud_request.c:0252:web_request|   trying IP: 157.90.183.226
INFO |cloud_request.c:0382:web_request| Redirecting to: https://raw.githubusercontent.com/toniebox-reverse-engineering/tonies-json/release/tonieboxes.json
INFO |cloud_request.c:0200:web_request| Connecting to HTTP server raw.githubusercontent.com:443...
INFO |cloud_request.c:0252:web_request|   trying IP: 185.199.110.133
INFO |toniesJson.c:0238:tonieboxes_update| ... success updating tonieboxes.json from api.revvox.de, reloading
INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 338
INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.json with size 4995321
WARN |platform_linux.c:0292:socketReceive| buffer does not contain null terminator
INFO |handler_cloud.c:0041:handleCloudTime|  >> respond with current time
INFO |mqtt.c:0685:mqtt_init_box| Skipping client 'Toniebox' (cn: 'default')
INFO |cloud_request.c:0200:web_request| Connecting to HTTP server prod.de.tbs.toys:443...
INFO |cloud_request.c:0252:web_request|   trying IP: 18.156.186.144
ERROR|cloud_request.c:0262:web_request| Failed to connect to HTTP server! HTTP=Not Modified error=End of file reached [304]
WARN |platform_linux.c:0292:socketReceive| buffer does not contain null terminator
INFO |server.c:0959:server_init| 2 open HTTPS API connections
INFO |server.c:0430:httpServerRequestCallback| UA=toniebox-esp32-eu/v5.233.0, ESPFW=eu/v5.233.0
INFO |handler_cloud.c:0092:handleCloudOTA|  >> OTA-Request for 5 with timestamp 1669853893 (2022-12-01 00:18:13)
INFO |mqtt.c:0699:mqtt_init_box| Registered new box 'teddyCloud Box 70041DCC1838' (cn: '70041DCC1838')
INFO |mqtt.c:0700:mqtt_init_box| Using base path 'teddyCloud/box/70041DCC1838' and id 'teddyCloud_Box_70041DCC1838'
INFO |handler_cloud.c:0184:handleCloudOTA|  >> Replaced OTA query cv=1669853893 with new OTA query cv=1
INFO |handler_cloud.c:0234:handleCloudOTA|  >> No OTA (newer) found for 5
INFO |server.c:0430:httpServerRequestCallback| UA=toniebox-esp32-eu/v5.233.0, ESPFW=eu/v5.233.0
INFO |handler_cloud.c:0092:handleCloudOTA|  >> OTA-Request for 2 with timestamp 1715951265 (2024-05-17 13:07:45)
INFO |handler_cloud.c:0184:handleCloudOTA|  >> Replaced OTA query cv=1715951265 with new OTA query cv=1
INFO |handler_cloud.c:0234:handleCloudOTA|  >> No OTA (newer) found for 2
INFO |server.c:0430:httpServerRequestCallback| UA=toniebox-esp32-eu/v5.233.0, ESPFW=eu/v5.233.0
INFO |handler_cloud.c:0092:handleCloudOTA|  >> OTA-Request for 6 with timestamp 1534781997 (2018-08-20 16:19:57)
INFO |handler_cloud.c:0184:handleCloudOTA|  >> Replaced OTA query cv=1534781997 with new OTA query cv=1
INFO |handler_cloud.c:0234:handleCloudOTA|  >> No OTA (newer) found for 6
INFO |server.c:0430:httpServerRequestCallback| UA=toniebox-esp32-eu/v5.233.0, ESPFW=eu/v5.233.0
INFO |handler_cloud.c:0092:handleCloudOTA|  >> OTA-Request for 3 with timestamp 1715951512 (2024-05-17 13:11:52)
INFO |handler_cloud.c:0184:handleCloudOTA|  >> Replaced OTA query cv=1715951512 with new OTA query cv=1
INFO |handler_cloud.c:0234:handleCloudOTA|  >> No OTA (newer) found for 3
INFO |server.c:0430:httpServerRequestCallback| UA=toniebox-esp32-eu/v5.233.0, ESPFW=eu/v5.233.0
INFO |handler_cloud.c:0817:handleCloudFreshnessCheck| Content (576 of 576)
INFO |handler_cloud.c:0825:handleCloudFreshnessCheck| Found 36 tonies:
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: E00403501B24265C, nocloud: 0, live: 0, updated: 0, audioid: 646B6349 (2023-05-22 12:42:49)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: E004035015616AC7, nocloud: 0, live: 0, updated: 0, audioid: 6502C325 (2023-09-14 08:24:05)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: E00403500DD89BB1, nocloud: 0, live: 0, updated: 0, audioid: 651AD8BC (2023-10-02 14:50:36)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: E00403501E2040D9, nocloud: 0, live: 0, updated: 0, audioid: 656F8CAC (2023-12-05 20:48:44)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: E00403501BA295D2, nocloud: 0, live: 0, updated: 0, audioid: 61113F95 (2021-08-09 14:45:41)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: E00403501B5014BB, nocloud: 0, live: 0, updated: 0, audioid: 63E61BF8 (2023-02-10 10:27:04)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: E004035017A7FB6F, nocloud: 0, live: 0, updated: 0, audioid: 66673D50 (2024-06-10 17:52:16)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: E004035015E8B848, nocloud: 1, live: 0, updated: 0, audioid: 171E3A2B (2024-10-27 13:03:39, custom), audioid-server: 171E3A2B (2024-10-27 13:03:39, custom)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: E00403500CA6FB97, nocloud: 0, live: 0, updated: 0, audioid: 671279BE (2024-10-18 15:07:42)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: E0040350145E29ED, nocloud: 1, live: 0, updated: 0, audioid: 171C9B14 (2024-10-26 07:32:36, custom), audioid-server: 171C9B14 (2024-10-26 07:32:36, custom)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: E00403500EED7C85, nocloud: 1, live: 0, updated: 0, audioid: 172115DF (2024-10-29 17:05:35, custom), audioid-server: 172115DF (2024-10-29 17:05:35, custom)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0000000001000000, nocloud: 0, live: 0, updated: 0, audioid: 58DE2BEB (2017-03-31 10:14:03)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0100000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE8975 (2016-09-30 15:49:09)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0200000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE8975 (2016-09-30 15:49:09)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0300000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE8975 (2016-09-30 15:49:09)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0400000001000000, nocloud: 0, live: 0, updated: 0, audioid: 00000001 (special)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0500000001000000, nocloud: 0, live: 0, updated: 0, audioid: 00000001 (special)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0600000001000000, nocloud: 0, live: 0, updated: 0, audioid: 6644C1D2 (2024-05-15 14:08:18)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0700000001000000, nocloud: 0, live: 0, updated: 0, audioid: 595364DC (2017-06-28 08:12:12)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0800000001000000, nocloud: 0, live: 0, updated: 0, audioid: 59536396 (2017-06-28 08:06:46)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0900000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE8977 (2016-09-30 15:49:11)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0A00000001000000, nocloud: 0, live: 0, updated: 0, audioid: 595363CC (2017-06-28 08:07:40)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0B00000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE8977 (2016-09-30 15:49:11)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0C00000001000000, nocloud: 0, live: 0, updated: 0, audioid: 00000001 (special)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0D00000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE8978 (2016-09-30 15:49:12)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0E00000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE8978 (2016-09-30 15:49:12)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 0F00000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE8978 (2016-09-30 15:49:12)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 1000000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE8978 (2016-09-30 15:49:12)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 1100000001000000, nocloud: 0, live: 0, updated: 0, audioid: 59F0AC95 (2017-10-25 15:24:05)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 1200000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE8979 (2016-09-30 15:49:13)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 1300000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE8979 (2016-09-30 15:49:13)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 1400000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE8979 (2016-09-30 15:49:13)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 1500000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE897A (2016-09-30 15:49:14)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 1600000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE897A (2016-09-30 15:49:14)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 1700000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE897A (2016-09-30 15:49:14)
INFO |handler_cloud.c:0885:handleCloudFreshnessCheck|   uid: 1800000001000000, nocloud: 0, live: 0, updated: 0, audioid: 57EE897A (2016-09-30 15:49:14)
INFO |cloud_request.c:0200:web_request| Connecting to HTTP server prod.de.tbs.toys:443...
INFO |cloud_request.c:0252:web_request|   trying IP: 3.74.99.150
ERROR|cloud_request.c:0262:web_request| Failed to connect to HTTP server! HTTP=Not Modified error=End of file reached [304]
INFO |handler_cloud.c:0941:handleCloudFreshnessCheck| Freshness check response: size=14, content=
INFO |server.c:0430:httpServerRequestCallback| UA=toniebox-esp32-eu/v5.233.0, ESPFW=eu/v5.233.0
INFO |handler_cloud.c:0346:handleCloudClaim|  >> client claim requested rUID 48b8e815500304e0, auth 8C239416...
INFO |handler_cloud.c:0401:handleCloudClaim|  >> nocloud content, nothing forwarded
INFO |server.c:0959:server_init| 1 open HTTPS API connections
INFO |server.c:0959:server_init| 2 open HTTPS API connections
INFO |server.c:0430:httpServerRequestCallback| UA=toniebox-esp32-eu/v5.233.0, ESPFW=eu/v5.233.0
INFO |handler_cloud.c:0346:handleCloudClaim|  >> client claim requested rUID 5c26241b500304e0, auth AF7906B1...
INFO |cloud_request.c:0200:web_request| Connecting to HTTP server prod.de.tbs.toys:443...
INFO |cloud_request.c:0252:web_request|   trying IP: 3.74.99.150
ERROR|cloud_request.c:0262:web_request| Failed to connect to HTTP server! HTTP=Not Modified error=End of file reached [304]

Can anyone help me with that ? Did i messed something up with the certs ?

Hi,

I also flashed my box yesterday and encountered the same error. After some trial and error I found out that the certificates must be stored in lower case letters in the respective folder. Like you, I extracted them directly from the BIN file and they are stored there in upper case.

However, the storage locations for the original certificates are only here as far as I have seen:

  • /teddycloud/certs/client/MAC-Address

  • /teddycloud/certs/client (if the Teddycloud should be able to load data itself)

No original certificates of the box need to be stored below “server”.

I hope this helps you.

Yes that helps thank you. But in the server folder is also an ca.der. Where is this from or can i delete it ?
Would it be also possible if you could upload your ca.der for me ? I heared that this file is the same for all the boxes and i’m not sure if i bricked mine during the second flash.

Thank you.

The certificates below “server” are the self-generated certificates that Teddycloud creates when it is first started.
See here in the wiki: Setup | Toniebox Hacking

No, you should not delete these certificates and they are also individual for each Teddycloud installation so my “ca.der” will not help you.

I don’t think you have bricked the box. Do you still have the backup of the first flash process? If I were you, I would proceed as follows:

  • shut down your current Teddycloud containers (don’t delete them yet to be on the safe side)
  • set up a new Docker container according to the instructions and start the flash process. Here, however, select “Load file” and not “Read flash” and upload the backup copy (bin file) of your first flash attempt, patch it and write it to the box.
  • If you do everything via the wizard, it should not be necessary to manually copy certificates anywhere here.
  • If everything fits, you can delete the Docker container from your first attempt
1 Like

That worked, thank you very much !!! :slight_smile: