Timed out while waiting for ack

Hi all,

Just like Hophi, i tried to read the flash of my Toniebox, without success.

I tried this with differrent USB to UART converters.
The cheap China converter that I use for my ESP8266, a CP2103 evaluation board, and a FTDI cable.
The FTDI cable doesn’t have a DTR pin, I think I have to use the RTS pin, right?

I use the 10 pin adapter cable from Aliexpress to connect to the C3200’s debug port.
I use Windows 10, Python 3.8.1, PIP 24.3.1

d:\TonieBox\revvoxx\cc3200tool\cc3200tool>cc3200tool -p COM4 --reset dtr read_all_files ExtractedFromBox/
2024-12-22 13:03:58,099 -- Connecting to target...
2024-12-22 13:04:00,415 -- timed out while waiting for ack
2024-12-22 13:04:02,633 -- timed out while waiting for ack
2024-12-22 13:04:04,853 -- timed out while waiting for ack
2024-12-22 13:04:07,070 -- timed out while waiting for ack
2024-12-22 13:04:09,275 -- timed out while waiting for ack
2024-12-22 13:04:09,276 -- Could not connect to target: Did not get ACK on break condition

So used my LogicAnalyzer to see what happens.
First without a Toniebox connected.
What I do not understand:
TXD from the PC only goes to low level for 192ms.
I would have expected some kind of data (a request or so).
Or is only the change from high to low the request, and the C3200 should start to send some data?

I also tried this with the Toniebox connected:

There is no reaction from C3200.
What I also do not understand, why is the RXD signal (Toniebox’ TXD) always low?
I would have expected it to be high when idle.

Regards,
Nobby

Please give us more details. How you wired everything etc.

Might be a stupid question but this is what held me up for a loooong time: do you provide additional power to the box? I didn’t and I had basically the same problem. As soon as I connected the battery to the board after connecting the board to the UART, everything went quite smooth.

Here is a drawing of my wiring:


Does this help?

Has anyone before used a logic analyzer to log the communication between PC and Toniebox?
I hoped that comparison between good case and my case could give some hints what I am doing wrong…

The Toniebox board is only connected to the speaker, but not to the ears.

I guess I have already tried every combination of power supply.
Both, battery and charger.
Only battery.
Only charger.

But I will try again:

  1. Connect UART to Toniebox
  2. Connect battery (but not charger) to the Toniebox
  3. Start communication:
    cc3200tool -p COM4 --reset dtr read_all_files ExtractedFromBox/

Nothing change :frowning:

I know my cabling is quite long, especially for 921600 bit/s.
The FTI cable is around 150cm, the pcb clip from Aliexpress is 24cm, my breadboard wires between FTDI cable and pcb clip are 10cm…
That’s why I already tried with the CP2103 board to save the 150cm of wires.

But since I don’t see any data being sent from PC to Toniebox, I’m not sure if this is really a wiring problem, or a software problem…

I also beeped the Aliexpress PCB clip, every connection was OK.
I even used the LogicAnalyzer at the pcb clip pins. With cc3200tool I saw the same as shown above.
When sending test data with a terminal program, I saw the expected data.

If I read your image correctly then you don’t have dtr? Why are you using —reset dtr then?

Thank you Henry,
I think that was the hint that I needed.
I thought that RTS and DTR were just different names for the same things, but it seems they are not…
I could have seen in the LogicAnalyzer log, that the C3200’s RST was held low all the time, I think that’s why RXD was also low all the time!

So I manually held the RST line to GND when connecting power (only charger, not battery, that’s easier for me with only two hands).
Then I released RST and executed
cc3200tool -p COM4 read_all_files ExtractedFromBox/
Then communication looks like this:

At the end I get “One or more files could not be verified or read at all”
but that’s much better than before and might be due to the very long wires.

I will now try to make the wires as short as possible and then try again.

This is totally fine in most cases. Please always post the full log. Be sure you got the full flash based backup!

I read the data three times and compared the content.
It was everytime completely the same, expect. that the first dear contained the file
sys/date_time.cfg
and the others didn’t.

Here is the log:


d:\TonieBox\revvoxx\cc3200tool\cc3200tool>cc3200tool -p COM4 read_all_files ExtractedFromBox/
2024-12-23 11:51:21,619 -- Connecting to target...
2024-12-23 11:51:23,846 -- timed out while waiting for ack
2024-12-23 11:51:24,055 -- Connected, reading version...
2024-12-23 11:51:24,064 -- connected to target
2024-12-23 11:51:24,064 -- Version: CC3x00VersionInfo((0, 4, 1, 2), (0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0), (16, 0, 0, 0))
2024-12-23 11:51:24,065 -- This is a CC3200 device
2024-12-23 11:51:24,065 -- Switching to NWP bootloader...
2024-12-23 11:51:24,080 -- Switching UART to APPS...
2024-12-23 11:51:24,096 -- Resetting communications ...
2024-12-23 11:51:25,327 -- Uploading rbtl3100s.dll...
2024-12-23 11:51:25,328 -- Reading rbtl3100s.dll from file C:\Users\Norbert\AppData\Local\Programs\Python\Python38\lib\site-packages\cc3200tool\dll\rbtl3100s.dll
2024-12-23 11:51:25,328 -- Getting storage list...
2024-12-23 11:51:26,063 -- APPS version: CC3x00VersionInfo((0, 4, 0, 2), (0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0), (16, 0, 0, 0))
2024-12-23 11:51:26,063 -- Getting storage info...
2024-12-23 11:51:26,079 -- storage #2 info bytes: 0x10, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0
2024-12-23 11:51:26,079 -- Getting storage list...
2024-12-23 11:51:26,096 -- Reading raw storage #2 start 0x0, size 0x2000...
..
2024-12-23 11:51:26,222 -- [0] detected a valid FAT revision: 88
2024-12-23 11:51:26,223 -- [1] detected a valid FAT revision: 87
2024-12-23 11:51:26,223 -- Getting storage list...
2024-12-23 11:51:26,239 -- Reading raw storage #2 start 0x1774, size 0x2774...
...
2024-12-23 11:51:26,403 -- selected FAT revision: 88 (active)
2024-12-23 11:51:26,404 -- Serial Flash block size:     4096 bytes
2024-12-23 11:51:26,404 -- Serial Flash capacity:       1024 blocks
2024-12-23 11:51:26,405 --
2024-12-23 11:51:26,405 --      file    start   size    fail    flags   total   filename
2024-12-23 11:51:26,406 --      index   block   [BLKs]  safe    [BLKs]
2024-12-23 11:51:26,406 -- ----------------------------------------------------------------------------
2024-12-23 11:51:26,407 --      N/A     0       5       N/A     N/A     5       FATFS
2024-12-23 11:51:26,407 --      0       71      8       yes     0x0     16      /sys/mcuimg.bin
2024-12-23 11:51:26,408 --      4       105     1       no      0x4     1       /sys/mcubootinfo.bin
2024-12-23 11:51:26,409 --      6       106     53      yes     0x0     106     /sys/mcuimg1.bin
2024-12-23 11:51:26,409 --      7       212     53      no      0x4     53      /sys/mcuimg2.bin
2024-12-23 11:51:26,410 --      8       265     53      no      0x4     53      /sys/mcuimg3.bin
2024-12-23 11:51:26,410 --      9       408     5       yes     0x8     10      /tmp/phy.cal
2024-12-23 11:51:26,411 --      10      418     1       yes     0x8     2       /tmp/table.arp
2024-12-23 11:51:26,411 --      11      5       33      yes     0x8     66      /sys/servicepack.ucf
2024-12-23 11:51:26,412 --      12      87      1       yes     0x8     2       /sys/mode.cfg
2024-12-23 11:51:26,412 --      13      89      1       yes     0x8     2       /sys/ipcfg.ini
2024-12-23 11:51:26,413 --      14      91      1       yes     0x8     2       /sys/ap.cfg
2024-12-23 11:51:26,413 --      15      93      1       yes     0x8     2       /sys/devname.cfg
2024-12-23 11:51:26,414 --      16      95      1       yes     0x8     2       /sys/mdns.cfg
2024-12-23 11:51:26,414 --      17      97      2       yes     0x8     4       /sys/pref.net
2024-12-23 11:51:26,415 --      18      101     1       yes     0x8     2       /sys/stacfg.ini
2024-12-23 11:51:26,415 --      19      103     1       yes     0x8     2       /sys/pmcfg.ini
2024-12-23 11:51:26,416 --      20      318     40      yes     0x8     80      /www/index.html
2024-12-23 11:51:26,419 --      21      398     4       yes     0x8     8       /www/toniebox.js
2024-12-23 11:51:26,419 --      22      406     1       yes     0x8     2       /cert/ca.der
2024-12-23 11:51:26,420 --      23      931     1       yes     0x8     2       /sys/otastat.txt
2024-12-23 11:51:26,420 --      24      421     255     yes     0x8     510     /fw/sfx.bin
2024-12-23 11:51:26,421 --      26      933     1       yes     0x8     2
2024-12-23 11:51:26,421 --      27      935     1       yes     0x8     2       /settings.cfg
2024-12-23 11:51:26,422 --      28      420     1       no      0xc     1       /cert/client.der
2024-12-23 11:51:26,422 --      29      937     1       no      0xc     1       /cert/private.der
2024-12-23 11:51:26,423 --
2024-12-23 11:51:26,423 --    Flash usage
2024-12-23 11:51:26,424 -- -------------------------
2024-12-23 11:51:26,425 -- used space:  938 blocks
2024-12-23 11:51:26,425 -- free space:  86 blocks
2024-12-23 11:51:26,426 -- memory hole: [938-1023]
2024-12-23 11:51:26,427 -- Created local directory ExtractedFromBox/
2024-12-23 11:51:26,498 -- Reading file /sys/mcuimg.bin -> ExtractedFromBox/sys/mcuimg.bin
2024-12-23 11:51:26,898 -- Reading file /sys/mcuimg.bin -> C:\Users\Norbert\AppData\Local\Temp\tmpp7t8ux91
2024-12-23 11:51:27,292 -- File ExtractedFromBox/sys/mcuimg.bin verified
2024-12-23 11:51:27,299 -- Reading file /sys/mcubootinfo.bin -> ExtractedFromBox/sys/mcubootinfo.bin
2024-12-23 11:51:27,379 -- Reading file /sys/mcubootinfo.bin -> C:\Users\Norbert\AppData\Local\Temp\tmp2x7okmo6
2024-12-23 11:51:27,451 -- File ExtractedFromBox/sys/mcubootinfo.bin verified
2024-12-23 11:51:27,459 -- Reading file /sys/mcuimg1.bin -> ExtractedFromBox/sys/mcuimg1.bin
2024-12-23 11:51:30,031 -- Reading file /sys/mcuimg1.bin -> C:\Users\Norbert\AppData\Local\Temp\tmpesq12dhr
2024-12-23 11:51:32,595 -- File ExtractedFromBox/sys/mcuimg1.bin verified
2024-12-23 11:51:32,602 -- Reading file /sys/mcuimg2.bin -> ExtractedFromBox/sys/mcuimg2.bin
2024-12-23 11:51:35,203 -- Reading file /sys/mcuimg2.bin -> C:\Users\Norbert\AppData\Local\Temp\tmpb7cbmc8t
2024-12-23 11:51:37,798 -- File ExtractedFromBox/sys/mcuimg2.bin verified
2024-12-23 11:51:37,803 -- Reading file /sys/mcuimg3.bin -> ExtractedFromBox/sys/mcuimg3.bin
2024-12-23 11:51:40,403 -- Reading file /sys/mcuimg3.bin -> C:\Users\Norbert\AppData\Local\Temp\tmpknc3la7k
2024-12-23 11:51:43,002 -- File ExtractedFromBox/sys/mcuimg3.bin verified
2024-12-23 11:51:43,020 -- Reading file /tmp/phy.cal -> ExtractedFromBox/tmp/phy.cal
2024-12-23 11:51:43,146 -- Reading file /tmp/phy.cal -> C:\Users\Norbert\AppData\Local\Temp\tmpni2u8t5f
2024-12-23 11:51:43,264 -- File ExtractedFromBox/tmp/phy.cal verified
2024-12-23 11:51:43,272 -- Reading file /tmp/table.arp -> ExtractedFromBox/tmp/table.arp
2024-12-23 11:51:43,353 -- Reading file /tmp/table.arp -> C:\Users\Norbert\AppData\Local\Temp\tmp54__o5sn
2024-12-23 11:51:43,427 -- File ExtractedFromBox/tmp/table.arp verified
2024-12-23 11:51:43,580 -- File /sys/servicepack.ucf could not be read, /sys/servicepack.ucf does not exist on target
2024-12-23 11:51:43,596 -- Reading file /sys/mode.cfg -> ExtractedFromBox/sys/mode.cfg
2024-12-23 11:51:43,677 -- Reading file /sys/mode.cfg -> C:\Users\Norbert\AppData\Local\Temp\tmpptg1z6sd
2024-12-23 11:51:43,744 -- File ExtractedFromBox/sys/mode.cfg verified
2024-12-23 11:51:43,758 -- Reading file /sys/ipcfg.ini -> ExtractedFromBox/sys/ipcfg.ini
2024-12-23 11:51:43,840 -- Reading file /sys/ipcfg.ini -> C:\Users\Norbert\AppData\Local\Temp\tmp_8f4xazj
2024-12-23 11:51:43,908 -- File ExtractedFromBox/sys/ipcfg.ini verified
2024-12-23 11:51:43,922 -- Reading file /sys/ap.cfg -> ExtractedFromBox/sys/ap.cfg
2024-12-23 11:51:44,004 -- Reading file /sys/ap.cfg -> C:\Users\Norbert\AppData\Local\Temp\tmpulv77ujc
2024-12-23 11:51:44,072 -- File ExtractedFromBox/sys/ap.cfg verified
2024-12-23 11:51:44,086 -- Reading file /sys/devname.cfg -> ExtractedFromBox/sys/devname.cfg
2024-12-23 11:51:44,167 -- Reading file /sys/devname.cfg -> C:\Users\Norbert\AppData\Local\Temp\tmp7oz9140f
2024-12-23 11:51:44,234 -- File ExtractedFromBox/sys/devname.cfg verified
2024-12-23 11:51:44,248 -- Reading file /sys/mdns.cfg -> ExtractedFromBox/sys/mdns.cfg
2024-12-23 11:51:44,351 -- Reading file /sys/mdns.cfg -> C:\Users\Norbert\AppData\Local\Temp\tmpll6pdoq1
2024-12-23 11:51:44,440 -- File ExtractedFromBox/sys/mdns.cfg verified
2024-12-23 11:51:44,582 -- File /sys/pref.net could not be read, /sys/pref.net does not exist on target
2024-12-23 11:51:44,598 -- Reading file /sys/stacfg.ini -> ExtractedFromBox/sys/stacfg.ini
2024-12-23 11:51:44,679 -- Reading file /sys/stacfg.ini -> C:\Users\Norbert\AppData\Local\Temp\tmpx6nqdtth
2024-12-23 11:51:44,745 -- File ExtractedFromBox/sys/stacfg.ini verified
2024-12-23 11:51:44,760 -- Reading file /sys/pmcfg.ini -> ExtractedFromBox/sys/pmcfg.ini
2024-12-23 11:51:44,840 -- Reading file /sys/pmcfg.ini -> C:\Users\Norbert\AppData\Local\Temp\tmphtbar8rj
2024-12-23 11:51:44,905 -- File ExtractedFromBox/sys/pmcfg.ini verified
2024-12-23 11:51:44,920 -- Reading file /www/index.html -> ExtractedFromBox/www/index.html
2024-12-23 11:51:46,466 -- Reading file /www/index.html -> C:\Users\Norbert\AppData\Local\Temp\tmpx8m79435
2024-12-23 11:51:48,189 -- File ExtractedFromBox/www/index.html verified
2024-12-23 11:51:48,204 -- Reading file /www/toniebox.js -> ExtractedFromBox/www/toniebox.js
2024-12-23 11:51:48,295 -- Reading file /www/toniebox.js -> C:\Users\Norbert\AppData\Local\Temp\tmp5th8w9be
2024-12-23 11:51:48,386 -- File ExtractedFromBox/www/toniebox.js verified
2024-12-23 11:51:48,402 -- Reading file /cert/ca.der -> ExtractedFromBox/cert/ca.der
2024-12-23 11:51:48,498 -- Reading file /cert/ca.der -> C:\Users\Norbert\AppData\Local\Temp\tmpyjkybj5o
2024-12-23 11:51:48,580 -- File ExtractedFromBox/cert/ca.der verified
2024-12-23 11:51:48,595 -- Reading file /sys/otastat.txt -> ExtractedFromBox/sys/otastat.txt
2024-12-23 11:51:48,678 -- Reading file /sys/otastat.txt -> C:\Users\Norbert\AppData\Local\Temp\tmp716xxoqj
2024-12-23 11:51:48,749 -- File ExtractedFromBox/sys/otastat.txt verified
2024-12-23 11:51:48,763 -- Reading file /fw/sfx.bin -> ExtractedFromBox/fw/sfx.bin
2024-12-23 11:52:02,392 -- Reading file /fw/sfx.bin -> C:\Users\Norbert\AppData\Local\Temp\tmpr4a25am5
2024-12-23 11:52:16,015 -- File ExtractedFromBox/fw/sfx.bin verified
2024-12-23 11:52:16,015 -- Found file without filename, skipping index=26
2024-12-23 11:52:16,021 -- Reading file /settings.cfg -> ExtractedFromBox/settings.cfg
2024-12-23 11:52:16,101 -- Reading file /settings.cfg -> C:\Users\Norbert\AppData\Local\Temp\tmphur2prp5
2024-12-23 11:52:16,167 -- File ExtractedFromBox/settings.cfg verified
2024-12-23 11:52:16,181 -- Reading file /cert/client.der -> ExtractedFromBox/cert/client.der
2024-12-23 11:52:16,273 -- Reading file /cert/client.der -> C:\Users\Norbert\AppData\Local\Temp\tmp9kdk4d20
2024-12-23 11:52:16,350 -- File ExtractedFromBox/cert/client.der verified
2024-12-23 11:52:16,365 -- Reading file /cert/private.der -> ExtractedFromBox/cert/private.der
2024-12-23 11:52:16,459 -- Reading file /cert/private.der -> C:\Users\Norbert\AppData\Local\Temp\tmphto0ealm
2024-12-23 11:52:16,546 -- File ExtractedFromBox/cert/private.der verified
2024-12-23 11:52:16,546 -- One or more files could not be verified or read at all

d:\TonieBox\revvoxx\cc3200tool\cc3200tool>

So it seems that reading data was OK.
But to be sure to do not brick the Toniebox when writing I used the CP2103 evaluation board as USB to UART converter. This alowed me to reduce wire length to around 30cm. And the board has a dedicated DTR pin.
With this board i executed
cc3200tool -p COM5 --reset dtr read_all_files targetdir/ read_flash backup.bin
and compared the read data again.
That data is the same again.
So I’m quite sure now that I can read and write without problems.

To summarize my problems, I think I made two mistakes:

  • I connected the FTDI’s RTS pin to the Toniebox’s RST pin because I thought it did the same as a DTR pin. But it didin’t. It held the Toniebox all the time in reset state.
    The CP2103 board even has separate RTS and DTR connectors.
  • When I tried reading without “–reset dtr” I didn’t handle the RST manualy because I thought it is enough to connect SOP2 to VCC.
    But it was necessary to connect RST to GND when powering up the Toniebox.
    When the Toniebox had started, I disconnected RST from GND.
    With correct handling of RST I had no problems to communicate with the Toniebox.

This looks fine to me. You got all certs, so the flash can be always rebuilt manually.
Be sure you also got the flash based backup too!

OK, that’s fine :slight_smile:
What do you mean with “flash based backup too!” ?

Just make sure that your single file backup.bin is not empty (0 KB) but 4MB in size.

If it is empty, try to read it again with this command:

cc3200tool -p COM5 --reset dtr read_flash backup.bin

Had the same issue with reset connected to RTS. The reset did not trigger that way if using --reset dtr. However, found out that --reset rts is also valid and works.