Teddycloud CC3200 newbie guide

it worked, i simply changed to port 81 as suggested.

thanks a lot both of you!

edit:
i think i found out where the apache was coming from.
i installed git-all while trying to run cc3200tool. which has ~100 packages. any idea how i can remove them all together?

No gurantee, according to the documentation

apt autoremove git-all

is what you want. Take a look here.

I think git itself already ships with ubuntu so you probably wouldn’t have had to install it.

thank you, i removed it already manually. apache is gone and teddycloud is still running.

now i completed the guide till the end. but the box is not connecting to the cloud.
the last step i already tried with the original ngCfg.json then the box light is green but nothing more.
when i try with the altUrl.custom.305 the box says “error code: ant”

edit: the teddycloud gui lets me create the patched ltUrl.custom.305 and asks for the “TeddyCloud-Hostname”. where can i see what my hostname is? is it the name of the container?

here are all the commands i used

cc3200tool -p /dev/ttyUSB0 --reset dtr read_all_files /read_all_files/ 
cc3200tool -p /dev/ttyUSB0 --reset dtr read_flash /read_flash/ backup.bin
docker inspect -f '{{range .Mounts}}{{ if eq .Type "volume" }}{{println .Source }}{{ end }}{{end}}' teddycloud
sudo cp /teddycloud_certs/_data/server/ca.der /server_ca/ca.der 
sudo cp -r /read_all_files/cert/. /teddycloud_certs/_data/client/
cc3200tool -p /dev/ttyUSB0 --reset dtr write_file /server_ca/ca.der /cert/c2.der
cc3200tool -p /dev/ttyUSB0 --reset dtr write_file /read_all_files/sys/mcuimg.bin  /sys/pre-img.bin
cc3200tool -p /dev/ttyUSB0 --reset dtr write_file /hbng-bootloader.v0.9.3c/flash/sys/mcuimg.bin  /sys/mcuimg.bin

You can use the ip if your teddycloud. Or if you have assigned a url… the url.

thanks. ok, i used the ip to generate the altUrl.custom.305. now it says error owl.

Is the box shown in your router?

yes, it is shown in the router

have you also the c2 patch in place?

Let’s review your setup.

# Okay!
cc3200tool -p /dev/ttyUSB0 --reset dtr read_all_files /read_all_files/ 
# Okay!
cc3200tool -p /dev/ttyUSB0 --reset dtr read_flash /read_flash/ backup.bin
# Okay!
docker inspect -f '{{range .Mounts}}{{ if eq .Type "volume" }}{{println .Source }}{{ end }}{{end}}' teddycloud
# This path is correct and leads to the certs volume? Did you omit the part before /teddycloud_certs or did you map your volume to root /?
sudo cp /teddycloud_certs/_data/server/ca.der /server_ca/ca.der 
# Okay!
sudo cp -r /read_all_files/cert/. /teddycloud_certs/_data/client/
# Okay!
cc3200tool -p /dev/ttyUSB0 --reset dtr write_file /server_ca/ca.der /cert/c2.der
# Okay!
cc3200tool -p /dev/ttyUSB0 --reset dtr write_file /read_all_files/sys/mcuimg.bin  /sys/pre-img.bin
# Okay!
cc3200tool -p /dev/ttyUSB0 --reset dtr write_file /hbng-bootloader.v0.9.3c/flash/sys/mcuimg.bin  /sys/mcuimg.bin

I assume you also copied the SD cards contents for the bootloader and created the sd:/revvox/boot/ng-ofw1.bin

So this is all looking good if I didn’t miss anything.

So let’s see about your DNS settings.

You have a file here: sd:revvox/boot/patch/altUrl.305.json and it is also name correctly (not altUrl.custom.305 or at least the ngCfg.json knows the same name). And in your ngCfg.json it’s also added to use the certificate you uploaded and the correct atlURL patch?

"ofw2": {
    "checkHash": true,
    "hashFile": false,
    "watchdog": true,
    "ofwFix": true,
    "ofwSimBL": true,
    "patches": ["altCa.305", "altUrl.305"]

The contents of your altUrl.305.json are also correct? I didn’t know the GUI allows you to create a patched version, I though you would need to convert to hex yourself :upside_down_face: (just dropping cyberchef here).

What IP / hostname did you enter in web-gui for the patch? I could have sworn from some post I infered you’re german, and usually the IP range for home use is 192.168.178.X around here, and that’s more than 12 characters.

My best bets at the moment are: not named the patch correctly or the specified hostname is wrong.

That’s a new feature in 0.6.2 introduced. So using altUrl.custom.305 (without the json) in the config is legit if it placed as altUrl.custom.305.json in the patches folder.

yes, c2 is in place.
i copied again all files from the board to verify. there it is: /cert/c2.der (1.4 KB)
also opened it and compared to the original ca.der from server. at first glance it is the same.

yes, here shown are shorted paths. i used the complete path given from the docker inspect output.

yes, i copied over the /read_all_files/sys/mcuimg.bin to sd/revvox/boot/ng-ofw1.bin and again to sd/revvox/boot/ng-ofw2.bin

yes, there are both: sd/revvox/boot/patch/altUrl.305.json and my newly generated sd/revvox/boot/patch/altUrl.custom.305.json

togehter with modified ngCfg.json:

03           "activeImg": "ofw2",
32           "patches": ["altCa.305", "altUrl.custom.305"]

i used the ip shown in portainer for my teddycloud. in this case the ip has only 10 characters.

edit:
when copying all files from the board today, i noticed there are 2 files which were not copied.

File /sys/servicepack.ucf could not be read, /sys/servicepack.ucf does not exist on target
File /sys/pref.net could not be read, /sys/pref.net does not exist on target

i checked my backup from yesterday /read_all_files/ and both files are there but with 0 kb. so i assume they were also not copied yesterday.
is this relevant?

edit2:
the correct paths on the sd are like this for example: sd:/revvox/boot/patch/altUrl.305.json

Please don’t, this is not written in the docs and doesn’t belong there

There shouldn’t be a folder sd on your SD card.

You may debug the bootloader using it’s UART output to be sure it patches everything as it should.

Can you post that please? I suspect that’s an internal IP on the docker network.

The IP of Teddycloud is the one you use to access the webGUI. If you can’t get to the webGUI with that IP it’s wrong.

Depending on the range you use in your home network it may be too long.

If you’re using a fritzbox use the fritzbox patch or it you use a local DNS server, use a hostname that will resolve to your Teddycloud instance for all your network devices.

I stand to be corrected, whatever you put in your patch file, needs to resolve to your Teddycloud IP. So if you use the alturl patch, it rewrites rtnl.bxcl.de to rtnl.revvox, pull up your phone, connected to your wifi, and go to rtnl.revvox/web
If that does open the webGUI of Teddycloud, it’s working.
For the fritzbox patch tc.fritz.box/web should send you to your GUI.

Since I also got this question via PM from someone else, I updated the guide in regards to this.

In my opinion: no. That’s why I split the commands in my guide, the one liner in combination with these errors will give you a 0kb backup.bin

Maybe someone can confirm, I interpreted these files simply do not exist on the box.

ok, how exactly do i do this, is it somewhere described?

the ip is 172.18.0.2 it is the same ip i use to open the webgui

no, i dont use fritzbox.

did not work, it is not even working on the machine from where teddycloud is running. only when i use the ip it opens the webgui.

now i still have the error owl. the troubleshoot wiki here recommends to delete the certs/server/ca.der
should i try it? do i have to upload the new generated ca.der again to /cert/c2.der?

Have a look at the wiki:

If you don’t mind a slightly slower boot but want some log output via UART (Baud 921600, TX Pin) use the debug variant (check the ngCfg.json to enable it!).

For that you would need to use the hbng-bootloader_debug.release_v0.9.3c.zip

Sorry if I’m so hung up on the DNS issue, but since the box connects to your wifi. I still assume it’s a DNS issue.

Just to make absolutely sure I have the correct idea about what’s your setup:

172.18.0.2:9443 → you reach portainer
172.18.0.2/web → you reach teddycloud

Both of the above is true for other devices that are not the host machine (your phone connected to the wifi).

Can you also post the contents of your altUrl.custom.305.json? Since your ngCfg.json seems to rely on that one.

Of course, if you are not using a local dns entry this can’t work.

What do you mean new generated ca.der? The c2.der on the box must be the same as the
/teddycloud_certs/_data/server/ca.der of the currently running teddycloud instance.

yes, but portainer has 172.17.0.2:9443

i tried with a different machine in the same wifi and it does not connect to either.

here is the altUrl.custom.305.json

{
    "general": {
        "_desc": "Changes Boxine URLs to custom ones.",
        "_memPos": "",
        "_fwVer": "3.0.5+"
    },
    "searchAndReplace": [{
        "_desc": "prod.de.tbs.toys to 172.18.0.2",
        "search":  ["70", "72", "6f", "64", "2e", "64", "65", "2e", "74", "62", "73", "2e", "74", "6f", "79", "73", "00"],
        "replace": ["31", "37", "32", "2e", "31", "38", "2e", "30", "2e", "32", "00", "??", "??", "??", "??", "??", "??"]
    }, {
        "_desc": "rtnl.bxcl.de to 172.18.0.2",
        "search":  ["72", "74", "6e", "6c", "2e", "62", "78", "63", "6c", "2e", "64", "65", "00"],
        "replace": ["31", "37", "32", "2e", "31", "38", "2e", "30", "2e", "32", "00", "??", "??"]
    }]
}

Can this machine ping the IP and it just doesn’t connect to the Teddycloud UI or both Teddycloud UI and portainer?

If it can ping the IP but can’t access the UIs, do you run a firewall on the host that closed ports 443 and 80 and 9443?

If you can’t ping the IP at all, is this really the IP of the host machine? Your other machines have IPs from the same subnet?

I bet you do this on the same machine where your Portainer and Teddycloud is running, right? So the Browser where you open the webgui is running on the same machine? Because this should be the only place where this actually works.

The IP ranges 172.17.x.x or 172.18.x.x. etc. are normally virtual docker networks which are used by the bridge or by other running containers with their own configured networks. You can double check this on your machine in the Portainer network tab (or by running something like docker network inspect teddycloud_default).

In my case it looks like this:

For the Toniebox you have to use the IP address of your Teddycloud machine in your LAN, normally starting with 192.168.x.x. So the subnet which your DHCP server/Router is using. Only this ip address is reachable from every other device in your LAN (like your Toniebox).

So as @chuckf already wrote, I also highly suspect that you are using the wrong ip address.

Run ifconfig eth0 | grep inet to get the correct address:

inet 192.168.178.11  netmask 255.255.255.0  broadcast 192.168.178.255

You could also check the network tab in your Router/Fritzbox to obtain the correct ip address of our Teddycloud machine. So in my case, I should NOT use 172.18.0.1 (→ internal docker network on my Teddycloud-Pi, unreachable by any other device) but 192.168.178.11 (local ip address of my LAN).