stacksmashing / tamarin-firmware

GNU General Public License v3.0
447 stars 52 forks source link

Possible issue with the lightning extension cable I used? Any help appreciated! #11

Open bebrws opened 1 year ago

bebrws commented 1 year ago

Hey, I was hoping I could follow this amazing work and try to make my own Tamarin cable. I am running into some issues though I believe point to the lightning extension cable I chose? Because everything seems like it is setup fine to me and I am stumped.

So my cord when cut has the following colors and I used a multimeter more times than I can count to map them to the provided pico pins.

Yellow is 1 - ground on board and ground from usb
Red is 2 - green on USB
Green is 3rd - White on USB
Blue is 4th - gp3
White is 5th - vbus
Grey is 6 - gp0
Orange is 7 - gp1
Black is 8 - gp2

I used this image as well:

lightning_port_pinout

I translated the pin number I found using the multimeter for each color listed above to a pin (matching the pin number scheme on the image above). And then matched up the colors/wires to the pico pics by following:

* [GP0] L1n (Green)
* [GP1] L1p (White)
* [GND] GND (Black)
* [GP2] ID1 (Orange)
* [GP3] ID0 (Red)
* [5V] 5V (Yellow)

I have seen pictures on twitter of people not using the 5v (vbus?) and using the 3v3_en for power (what is white for me or yellow in the list directly above).

So the issue I have is that I believe I have the phone correctly in demoted DFU mode.

When I plug it into my laptop using a palera!n compatible cord:

image

This is an iPhone 7 BTW.

To get this into a demoted DFU state I run:

palera1n-macos-arm64 -d

It's output looks good to me and since OSX finds it in DFU mode with a normal cable I assume that is fine:

image

Here are some images of my setup: IMG_3339

IMG_3340

IMG_3343

The additional (blue) USB cable I am using was from some UART USB cable order if I remember right? that I made on amazon. I hope that isnt causing any issues. When I try without that plugged in though I see no difference.

So now plugging in my unworking Tamarin cable (after building the firmware in this repo and dropping it onto the pico which I know works because I can connect to 2 USB interfaces, one of which shows the 5 Tamarin options.. JTAG, DCSD, RESET, etc..). So I know that the Tamarin firmware is installed and the pico is working I believe.

But after plugging in the Tamarin cable to the phone this is what I see on my USB bus:

image

If I plugin the Blue additional USB to the hub I am using:

image

So I am my cable just show Tamarin cable and no iPhone when plugged in.

I will continue to try to use ipwndfu instead of plaera1n to demote but was having some local dev env issues (python related) and just figured palera1n should work fine as well?

I was wondering if anyone has any ideas?

When I use pico com:

image

I just get success messages from Tamarin but see nothing change on my phone, the other picocom USB connection, etc.

When I try to run openocd from the repo here:

sudo openocd -s /usr/local/share/openocd/scripts -f ./interface/tamarin.cfg -f t8010.cfg -d3

I get:

Open On-Chip Debugger 0.10.0+dev-gc6d4abb-dirty (2023-05-08-12:08)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
User : 13 4 options.c:60 configuration_output_handler(): debug_level: 3
User : 14 4 options.c:60 configuration_output_handler(): 
Debug: 15 4 options.c:184 add_default_dirs(): bindir=/usr/local/bin
Debug: 16 4 options.c:185 add_default_dirs(): pkgdatadir=/usr/local/share/openocd
Debug: 17 4 options.c:186 add_default_dirs(): exepath=/Users/bbarrows/repos/openocd/src
Debug: 18 4 options.c:187 add_default_dirs(): bin2data=../share/openocd
Debug: 19 4 configuration.c:42 add_script_search_dir(): adding /Users/bbarrows/.openocd
Debug: 20 4 configuration.c:42 add_script_search_dir(): adding /Users/bbarrows/repos/openocd/src/../share/openocd/site
Debug: 21 4 configuration.c:42 add_script_search_dir(): adding /Users/bbarrows/repos/openocd/src/../share/openocd/scripts
Debug: 22 4 configuration.c:97 find_file(): found /usr/local/share/openocd/scripts/./interface/tamarin.cfg
Debug: 23 4 command.c:143 script_debug(): command - interface interface tamarin
Info : 25 4 transport.c:117 allow_transports(): only one transport option; autoselect 'swd'
Debug: 26 4 command.c:355 register_command_handler(): registering 'swd'...
Debug: 27 4 command.c:143 script_debug(): command - transport transport select swd
Warn : 28 4 transport.c:297 jim_transport_select(): Transport "swd" was already selected
Debug: 29 4 command.c:143 script_debug(): command - adapter_khz adapter_khz 5000
Debug: 31 4 core.c:1636 jtag_config_khz(): handle jtag khz
Debug: 32 4 core.c:1599 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 33 4 core.c:1599 adapter_khz_to_speed(): convert khz to interface specific speed value
User : 34 4 options.c:60 configuration_output_handler(): adapter speed: 5000 kHz
User : 35 4 options.c:60 configuration_output_handler(): 
Debug: 36 4 configuration.c:97 find_file(): found t8010.cfg
Debug: 37 5 command.c:143 script_debug(): command - interface interface bonobo
Warn : 39 5 adapter.c:108 handle_interface_command(): Interface already configured, ignoring
Debug: 40 5 command.c:143 script_debug(): command - transport transport select swd
Warn : 41 5 transport.c:297 jim_transport_select(): Transport "swd" was already selected
Debug: 42 5 command.c:143 script_debug(): command - adapter_khz adapter_khz 10000
Debug: 44 5 core.c:1636 jtag_config_khz(): handle jtag khz
Debug: 45 5 core.c:1599 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 46 5 core.c:1599 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 47 5 command.c:143 script_debug(): command - reset_config reset_config srst_only
Debug: 49 5 configuration.c:97 find_file(): found /usr/local/share/openocd/scripts/target/swj-dp.tcl
Debug: 50 5 command.c:143 script_debug(): command - transport transport select
Debug: 51 6 command.c:143 script_debug(): command - transport transport select
Debug: 52 6 command.c:143 script_debug(): command - transport transport select
Debug: 53 6 command.c:143 script_debug(): command - transport transport select
Debug: 54 6 command.c:143 script_debug(): command - transport transport select
Debug: 55 6 command.c:143 script_debug(): command - swd swd newdap iphone cpu -irlen 6 -ircapture 0x1 -irmask 0xf -expected-id 0x4ba02477
Debug: 56 6 tcl.c:567 jim_newtap_cmd(): Creating New Tap, Chip: iphone, Tap: cpu, Dotted: iphone.cpu, 8 params
Debug: 57 6 core.c:1304 jtag_tap_init(): Created Tap: iphone.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 58 6 command.c:143 script_debug(): command - dap dap create iphone.dap -chain-position iphone.cpu
Debug: 59 6 command.c:355 register_command_handler(): registering 'iphone.dap'...
Debug: 60 6 command.c:355 register_command_handler(): registering 'iphone.dap'...
Debug: 61 6 command.c:355 register_command_handler(): registering 'iphone.dap'...
Debug: 62 6 command.c:355 register_command_handler(): registering 'iphone.dap'...
Debug: 63 6 command.c:355 register_command_handler(): registering 'iphone.dap'...
Debug: 64 6 command.c:355 register_command_handler(): registering 'iphone.dap'...
Debug: 65 6 command.c:355 register_command_handler(): registering 'iphone.dap'...
Debug: 66 6 command.c:355 register_command_handler(): registering 'iphone.dap'...
Debug: 67 6 command.c:355 register_command_handler(): registering 'iphone.dap'...
Debug: 68 6 command.c:143 script_debug(): command - target target create iphone.dbg mem_ap -endian little -dap iphone.dap -ap-num 1
Debug: 69 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 70 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 71 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 72 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 73 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 74 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 75 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 76 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 77 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 78 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 79 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 80 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 81 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 82 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 83 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 84 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 85 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 86 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 87 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 88 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 89 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 90 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 91 6 command.c:355 register_command_handler(): registering 'iphone.dbg'...
Debug: 92 6 command.c:143 script_debug(): command - target target create iphone.mem mem_ap -endian little -dap iphone.dap -ap-num 4
Debug: 93 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 94 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 95 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 96 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 97 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 98 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 99 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 100 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 101 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 102 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 103 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 104 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 105 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 106 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 107 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 108 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 109 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 110 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 111 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 112 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 113 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 114 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 115 6 command.c:355 register_command_handler(): registering 'iphone.mem'...
Debug: 116 6 command.c:143 script_debug(): command - cti cti create iphone.cpu0.cti -dap iphone.dap -ap-num 1 -ctibase 0xc2020000
Debug: 117 6 command.c:355 register_command_handler(): registering 'iphone.cpu0.cti'...
Debug: 118 6 command.c:355 register_command_handler(): registering 'iphone.cpu0.cti'...
Debug: 119 6 command.c:355 register_command_handler(): registering 'iphone.cpu0.cti'...
Debug: 120 6 command.c:355 register_command_handler(): registering 'iphone.cpu0.cti'...
Debug: 121 6 command.c:355 register_command_handler(): registering 'iphone.cpu0.cti'...
Debug: 122 6 command.c:143 script_debug(): command - target target create iphone.cpu0 aarch64 -endian little -dap iphone.dap -ap-num 1 -dbgbase 0xc2010000 -cti iphone.cpu0.cti -coreid 0 -apple-utt 4 0x202040000 64
Debug: 123 6 command.c:355 register_command_handler(): registering 'catch_exc'...
Debug: 124 6 command.c:355 register_command_handler(): registering 'aarch64'...
Debug: 125 6 command.c:355 register_command_handler(): registering 'aarch64'...
Debug: 126 6 command.c:355 register_command_handler(): registering 'aarch64'...
Debug: 127 6 command.c:355 register_command_handler(): registering 'aarch64'...
Debug: 128 6 command.c:355 register_command_handler(): registering 'aarch64'...
Debug: 129 6 command.c:355 register_command_handler(): registering 'aarch64'...
Debug: 130 6 command.c:355 register_command_handler(): registering 'aarch64'...
Debug: 131 6 command.c:355 register_command_handler(): registering 'aarch64'...
Debug: 132 6 command.c:355 register_command_handler(): registering 'aarch64'...
Debug: 133 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 134 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 135 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 136 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 137 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 138 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 139 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 140 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 141 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 142 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 143 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 144 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 145 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 146 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 147 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 148 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 149 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 150 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 151 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 152 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 153 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 154 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 155 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 156 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 157 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 158 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 159 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 160 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 161 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 162 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 163 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 164 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 165 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 166 6 command.c:355 register_command_handler(): registering 'iphone.cpu0'...
Debug: 167 6 command.c:143 script_debug(): command - cti cti create iphone.cpu1.cti -dap iphone.dap -ap-num 1 -ctibase 0xc2120000
Debug: 168 6 command.c:355 register_command_handler(): registering 'iphone.cpu1.cti'...
Debug: 169 6 command.c:355 register_command_handler(): registering 'iphone.cpu1.cti'...
Debug: 170 6 command.c:355 register_command_handler(): registering 'iphone.cpu1.cti'...
Debug: 171 6 command.c:355 register_command_handler(): registering 'iphone.cpu1.cti'...
Debug: 172 6 command.c:355 register_command_handler(): registering 'iphone.cpu1.cti'...
Debug: 173 6 command.c:143 script_debug(): command - target target create iphone.cpu1 aarch64 -endian little -dap iphone.dap -ap-num 1 -dbgbase 0xc2110000 -cti iphone.cpu1.cti -coreid 1 -apple-utt 4 0x202140000 64
Debug: 174 6 command.c:377 register_command(): command 'catch_exc' is already registered in '<global>' context
Debug: 175 6 command.c:377 register_command(): command 'aarch64' is already registered in '<global>' context
Debug: 176 6 command.c:377 register_command(): command 'cache_info' is already registered in 'aarch64' context
Debug: 177 6 command.c:377 register_command(): command 'dbginit' is already registered in 'aarch64' context
Debug: 178 6 command.c:377 register_command(): command 'maskisr' is already registered in 'aarch64' context
Debug: 179 6 command.c:377 register_command(): command 'mcr' is already registered in 'aarch64' context
Debug: 180 6 command.c:377 register_command(): command 'mrc' is already registered in 'aarch64' context
Debug: 181 6 command.c:377 register_command(): command 'smp' is already registered in 'aarch64' context
Debug: 182 6 command.c:377 register_command(): command 'smp_on' is already registered in 'aarch64' context
Debug: 183 6 command.c:377 register_command(): command 'smp_off' is already registered in 'aarch64' context
Debug: 184 6 command.c:377 register_command(): command 'smp_gdb' is already registered in 'aarch64' context
Debug: 185 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 186 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 187 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 188 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 189 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 190 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 191 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 192 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 193 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 194 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 195 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 196 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 197 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 198 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 199 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 200 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 201 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 202 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 203 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 204 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 205 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 206 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 207 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 208 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 209 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 210 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 211 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 212 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 213 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 214 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 215 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 216 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 217 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 218 6 command.c:355 register_command_handler(): registering 'iphone.cpu1'...
Debug: 219 6 command.c:143 script_debug(): command - target target smp iphone.cpu0 iphone.cpu1
Debug: 220 6 target.c:5658 jim_target_smp(): 3
Debug: 221 6 target.c:5668 jim_target_smp(): iphone.cpu0 
Debug: 222 6 target.c:5668 jim_target_smp(): iphone.cpu1 
Debug: 223 6 command.c:143 script_debug(): command - target target create iphone.sep cortex_a -endian little -dap iphone.dap -ap-num 1 -dbgbase 0xcda20000
Debug: 224 6 command.c:355 register_command_handler(): registering 'arm'...
Debug: 225 6 command.c:355 register_command_handler(): registering 'arm'...
Debug: 226 6 command.c:355 register_command_handler(): registering 'arm'...
Debug: 227 6 command.c:355 register_command_handler(): registering 'arm'...
Debug: 228 6 command.c:355 register_command_handler(): registering 'arm'...
Debug: 229 6 command.c:355 register_command_handler(): registering 'arm'...
Debug: 230 6 command.c:355 register_command_handler(): registering 'arm'...
Debug: 231 6 command.c:355 register_command_handler(): registering 'arm'...
Debug: 232 6 command.c:355 register_command_handler(): registering 'arm'...
Debug: 233 6 command.c:355 register_command_handler(): registering 'cache_config'...
Debug: 234 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 235 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 236 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 237 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 238 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 239 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 240 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 241 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 242 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 243 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 244 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 245 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 246 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 247 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 248 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 249 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 250 6 command.c:355 register_command_handler(): registering 'cache'...
Debug: 251 6 command.c:355 register_command_handler(): registering 'cortex_a'...
Debug: 252 6 command.c:355 register_command_handler(): registering 'cortex_a'...
Debug: 253 6 command.c:355 register_command_handler(): registering 'cortex_a'...
Debug: 254 6 command.c:355 register_command_handler(): registering 'cortex_a'...
Debug: 255 6 command.c:355 register_command_handler(): registering 'cortex_a'...
Debug: 256 6 command.c:355 register_command_handler(): registering 'cortex_a'...
Debug: 257 6 command.c:355 register_command_handler(): registering 'cortex_a'...
Debug: 258 6 command.c:355 register_command_handler(): registering 'cortex_a'...
Debug: 259 6 command.c:355 register_command_handler(): registering 'cortex_a'...
Debug: 260 6 command.c:355 register_command_handler(): registering 'cortex_a'...
Debug: 261 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 262 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 263 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 264 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 265 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 266 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 267 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 268 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 269 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 270 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 271 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 272 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 273 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 274 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 275 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 276 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 277 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 278 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 279 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 280 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 281 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 282 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 283 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 284 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 285 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 286 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 287 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 288 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 289 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 290 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 291 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 292 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 293 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 294 6 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 295 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 296 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 297 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 298 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 299 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 300 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 301 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 302 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 303 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 304 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 305 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 306 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 307 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 308 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 309 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 310 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 311 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 312 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 313 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 314 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 315 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 316 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 317 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 318 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 319 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 320 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 321 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 322 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 323 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 324 7 command.c:355 register_command_handler(): registering 'iphone.sep'...
Debug: 325 7 command.c:143 script_debug(): command - init init
Debug: 327 7 command.c:143 script_debug(): command - target target init
Debug: 329 7 command.c:143 script_debug(): command - target target names
Debug: 330 7 command.c:143 script_debug(): command - iphone.dbg iphone.dbg cget -event gdb-flash-erase-start
Debug: 331 7 command.c:143 script_debug(): command - iphone.dbg iphone.dbg configure -event gdb-flash-erase-start reset init
Debug: 332 7 command.c:143 script_debug(): command - iphone.dbg iphone.dbg cget -event gdb-flash-write-end
Debug: 333 7 command.c:143 script_debug(): command - iphone.dbg iphone.dbg configure -event gdb-flash-write-end reset halt
Debug: 334 7 command.c:143 script_debug(): command - iphone.dbg iphone.dbg cget -event gdb-attach
Debug: 335 7 command.c:143 script_debug(): command - iphone.dbg iphone.dbg configure -event gdb-attach halt
Debug: 336 7 command.c:143 script_debug(): command - iphone.mem iphone.mem cget -event gdb-flash-erase-start
Debug: 337 7 command.c:143 script_debug(): command - iphone.mem iphone.mem configure -event gdb-flash-erase-start reset init
Debug: 338 7 command.c:143 script_debug(): command - iphone.mem iphone.mem cget -event gdb-flash-write-end
Debug: 339 7 command.c:143 script_debug(): command - iphone.mem iphone.mem configure -event gdb-flash-write-end reset halt
Debug: 340 7 command.c:143 script_debug(): command - iphone.mem iphone.mem cget -event gdb-attach
Debug: 341 7 command.c:143 script_debug(): command - iphone.mem iphone.mem configure -event gdb-attach halt
Debug: 342 7 command.c:143 script_debug(): command - iphone.cpu0 iphone.cpu0 cget -event gdb-flash-erase-start
Debug: 343 7 command.c:143 script_debug(): command - iphone.cpu0 iphone.cpu0 configure -event gdb-flash-erase-start reset init
Debug: 344 7 command.c:143 script_debug(): command - iphone.cpu0 iphone.cpu0 cget -event gdb-flash-write-end
Debug: 345 7 command.c:143 script_debug(): command - iphone.cpu0 iphone.cpu0 configure -event gdb-flash-write-end reset halt
Debug: 346 7 command.c:143 script_debug(): command - iphone.cpu0 iphone.cpu0 cget -event gdb-attach
Debug: 347 7 command.c:143 script_debug(): command - iphone.cpu0 iphone.cpu0 configure -event gdb-attach halt
Debug: 348 7 command.c:143 script_debug(): command - iphone.cpu1 iphone.cpu1 cget -event gdb-flash-erase-start
Debug: 349 7 command.c:143 script_debug(): command - iphone.cpu1 iphone.cpu1 configure -event gdb-flash-erase-start reset init
Debug: 350 7 command.c:143 script_debug(): command - iphone.cpu1 iphone.cpu1 cget -event gdb-flash-write-end
Debug: 351 7 command.c:143 script_debug(): command - iphone.cpu1 iphone.cpu1 configure -event gdb-flash-write-end reset halt
Debug: 352 7 command.c:143 script_debug(): command - iphone.cpu1 iphone.cpu1 cget -event gdb-attach
Debug: 353 7 command.c:143 script_debug(): command - iphone.cpu1 iphone.cpu1 configure -event gdb-attach halt
Debug: 354 7 command.c:143 script_debug(): command - iphone.sep iphone.sep cget -event gdb-flash-erase-start
Debug: 355 7 command.c:143 script_debug(): command - iphone.sep iphone.sep configure -event gdb-flash-erase-start reset init
Debug: 356 7 command.c:143 script_debug(): command - iphone.sep iphone.sep cget -event gdb-flash-write-end
Debug: 357 7 command.c:143 script_debug(): command - iphone.sep iphone.sep configure -event gdb-flash-write-end reset halt
Debug: 358 7 command.c:143 script_debug(): command - iphone.sep iphone.sep cget -event gdb-attach
Debug: 359 7 command.c:143 script_debug(): command - iphone.sep iphone.sep configure -event gdb-attach halt
Debug: 360 7 target.c:1424 handle_target_init_command(): Initializing targets...
Debug: 361 7 mem_ap.c:63 mem_ap_init_target(): mem_ap_init_target
Debug: 362 7 mem_ap.c:63 mem_ap_init_target(): mem_ap_init_target
Debug: 363 7 semihosting_common.c:97 semihosting_common_init():  
Debug: 364 7 semihosting_common.c:97 semihosting_common_init():  
Debug: 365 7 semihosting_common.c:97 semihosting_common_init():  
Debug: 366 7 command.c:355 register_command_handler(): registering 'target_request'...
Debug: 367 7 command.c:355 register_command_handler(): registering 'trace'...
Debug: 368 7 command.c:355 register_command_handler(): registering 'trace'...
Debug: 369 7 command.c:355 register_command_handler(): registering 'fast_load_image'...
Debug: 370 7 command.c:355 register_command_handler(): registering 'fast_load'...
Debug: 371 7 command.c:355 register_command_handler(): registering 'profile'...
Debug: 372 7 command.c:355 register_command_handler(): registering 'virt2phys'...
Debug: 373 7 command.c:355 register_command_handler(): registering 'reg'...
Debug: 374 7 command.c:355 register_command_handler(): registering 'poll'...
Debug: 375 7 command.c:355 register_command_handler(): registering 'wait_halt'...
Debug: 376 7 command.c:355 register_command_handler(): registering 'halt'...
Debug: 377 7 command.c:355 register_command_handler(): registering 'resume'...
Debug: 378 7 command.c:355 register_command_handler(): registering 'reset'...
Debug: 379 7 command.c:355 register_command_handler(): registering 'soft_reset_halt'...
Debug: 380 7 command.c:355 register_command_handler(): registering 'step'...
Debug: 381 7 command.c:355 register_command_handler(): registering 'mdd'...
Debug: 382 7 command.c:355 register_command_handler(): registering 'mdw'...
Debug: 383 7 command.c:355 register_command_handler(): registering 'mdh'...
Debug: 384 7 command.c:355 register_command_handler(): registering 'mdb'...
Debug: 385 7 command.c:355 register_command_handler(): registering 'mwd'...
Debug: 386 7 command.c:355 register_command_handler(): registering 'mww'...
Debug: 387 7 command.c:355 register_command_handler(): registering 'mwh'...
Debug: 388 7 command.c:355 register_command_handler(): registering 'mwb'...
Debug: 389 7 command.c:355 register_command_handler(): registering 'bp'...
Debug: 390 7 command.c:355 register_command_handler(): registering 'rbp'...
Debug: 391 7 command.c:355 register_command_handler(): registering 'wp'...
Debug: 392 7 command.c:355 register_command_handler(): registering 'rwp'...
Debug: 393 7 command.c:355 register_command_handler(): registering 'load_image'...
Debug: 394 7 command.c:355 register_command_handler(): registering 'dump_image'...
Debug: 395 7 command.c:355 register_command_handler(): registering 'verify_image_checksum'...
Debug: 396 7 command.c:355 register_command_handler(): registering 'verify_image'...
Debug: 397 7 command.c:355 register_command_handler(): registering 'test_image'...
Debug: 398 7 command.c:355 register_command_handler(): registering 'reset_nag'...
Debug: 399 7 command.c:355 register_command_handler(): registering 'ps'...
Debug: 400 7 command.c:355 register_command_handler(): registering 'test_mem_access'...
Debug: 401 11 core.c:1599 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 402 11 core.c:1603 adapter_khz_to_speed(): have interface set up
Debug: 403 11 tamarin.c:248 tamarin_set_frequency(): Enqueue set frequency: 10000
Debug: 404 11 core.c:1599 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 405 11 core.c:1603 adapter_khz_to_speed(): have interface set up
Info : 406 11 core.c:1381 adapter_init(): clock speed 10000 kHz
Debug: 407 11 openocd.c:143 handle_init_command(): Debug Adapter init complete
Debug: 408 11 command.c:143 script_debug(): command - transport transport init
Debug: 410 11 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 411 11 command.c:143 script_debug(): command - dap dap init
Debug: 413 11 arm_dap.c:105 dap_init_all(): Initializing all DAPs ...
Debug: 414 11 tamarin.c:321 tamarin_swd_switch_seq(): JTAG-to-SWD
Debug: 415 11 tamarin.c:304 tamarin_line_reset(): Enqueue line reset / SWD-to-JTAG sequence
Debug: 416 11 tamarin.c:205 tamarin_swd_read_reg(): Enqueue read: 0x24
Debug: 417 11 tamarin.c:228 tamarin_swd_write_reg(): Enqueue write: 0x00 - 0x0000001E
Debug: 418 11 tamarin.c:146 tamarin_swd_run_queue(): USB BULK WRITE
Debug: 419 11 tamarin.c:152 tamarin_swd_run_queue(): DONE, LETS REAAAD
Debug: 420 1107 tamarin.c:161 tamarin_swd_run_queue(): READ DONE
Debug: 421 1107 tamarin.c:162 tamarin_swd_run_queue(): Result is (id res data) : 0 4 2560000

Debug: 422 1107 tamarin.c:166 tamarin_swd_run_queue(): FAIL FAIL FAIL

Debug: 423 1107 command.c:630 run_command(): Command 'dap init' failed with error code -305
User : 424 1107 command.c:695 command_run_line(): 
Debug: 425 1107 command.c:630 run_command(): Command 'init' failed with error code -4
User : 426 1113 command.c:695 command_run_line(): 
Debug: 427 1113 target.c:1962 target_free_all_working_areas_restore(): freeing all working areas
Debug: 428 1113 target.c:1962 target_free_all_working_areas_restore(): freeing all working areas
Debug: 429 1113 target.c:1962 target_free_all_working_areas_restore(): freeing all working areas
Debug: 430 1113 target.c:1962 target_free_all_working_areas_restore(): freeing all working areas
Debug: 431 1113 target.c:1962 target_free_all_working_areas_restore(): freeing all working areas
Debug: 432 1116 tamarin.c:326 tamarin_swd_switch_seq(): SWD-to-JTAG
Debug: 433 1116 tamarin.c:327 tamarin_swd_switch_seq(): NOT IMPLEMENTED
Assertion failed: (false), function tamarin_swd_switch_seq, file tamarin.c, line 328.
Debug: 434 1117 server.c:609 sig_handler(): Terminating on Signal 6
zsh: abort      sudo $HOME/repos/openocd/src/openocd -s /usr/local/share/openocd/scripts -f  

And this is AFTER I connected to:

sudo picocom /dev/tty.usbmodem313371

And set JTAG mode:

image

I have tested the connection from my wiring to the pico a ton too. So I am thinking it is the cable I bought?

Any ideas? Thank you so much!

bebrws commented 1 year ago

Connecting with picocom to the other USB device doesnt print or take any input:

image
bebrws commented 1 year ago

Thank you so much for this amazing work and I really appreciate this!

bebrws commented 1 year ago

I believe these are the related devices that I have:

tty.usbmodem313371%                    
tty.usbmodem313374%                   
tty.usbserial-2130%  

I can connect to all with picocom. But only tty.usbmodem313371 shows the Tamarin interface and or any output.

I have tried every Tamarin option. Including the F option.

bebrws commented 1 year ago

Trying palera1n one more time to demote:

image
bebrws commented 1 year ago

And with ipwndfu I get some error related to libusb (I believe) which I have re isntalled.. so I was hoping demoting with some other tool will work.. i'll try my iphone 6 plus next and checkrain demote

image
bebrws commented 1 year ago

Using Checkrain on iphone 6 plus to demote after manually entering DFU mode:

image

Then I unplug the USB cable used to demote with checkrain and plug in the Tamarin cable

Connect to tamarin cable and hit JTAG mode

Then goto openocd and run with correct bonobo config

And same error with openocd after all of that: sudo $HOME/repos/openocd/src/openocd -s /usr/local/share/openocd/scripts -f ./interface/tamarin.cfg -f t7000.tcl -d3

bebrws commented 1 year ago

My lightning cable extension is pretty long. Prob 3 ft or so. Would cutting it down potentially help?

I might try and solder the wired directly to the pico too. Out of ideas

Checking with mu multimeter I get 0 resistance from the lightning cable pins down to the pico too.