Project

General

Profile

Actions

Bug #5639

open

No packet captured but only "Card state change:"

Added by g1bbs 6 months ago. Updated 2 months ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
firmware
Target version:
-
Start date:
07/31/2022
Due date:
% Done:

0%

Spec Reference:

Description

Hello, I'm facing a problem when using the trace function. It doesn't capture any packets and the phone (iphone se/iphone xs) shows "No SIM card".

I used the latest version firmware, flashed with dfu-util. I inserted the valid sim card into the simtrace board, inserted the cable-sim into the phone, start the sniff program and turn on the phone. But it keep output "Card state change:". Is it a bug or my problem? Thanks!

(the board version on the back is v1.5 with ATSAM3SD8B chip)

Here's the console output when flushing. *************************************
test@1-NUC8i7BEH:~/SIMtrace$ sudo dfu-util --device 1d50:60e3 --cfg 1 --alt 1 --reset --download simtrace-trace-dfu-latest.bin
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 1d50:60e3
Run-time device DFU version 0100
Claiming USB DFU Runtime Interface...
Determining device status: state = appIDLE, status = 0
Device really in Runtime Mode, send DFU detach request...
Device will detach and reattach...
Opening DFU USB Device...
Claiming USB DFU Interface...
Setting Alternate Setting #1 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0100
Device returned transfer size 512
Copying data from PC to DFU device
Download [=========================] 100% 23532 bytes
Download done.
state(7) = dfuMANIFEST, status(0) = No error condition is present
state(2) = dfuIDLE, status(0) = No error condition is present
Done!
dfu-util: can't detach
Resetting USB to switch back to runtime mode

the console will stuck here
------------------------------------------------

Here's the console output when tracing. ****************************************
test@1-NUC8i7BEH:~/SIMtrace/simtrace2/host/src$ ./simtrace2-list
USB matches: 2
1d50:60e3 Addr=6, Path=1-4, Cfg=1, Intf=0, Alt=0: 255/1/0 (SIMtrace Sniffer)
1d50:60e3 Addr=6, Path=1-4, Cfg=2, Intf=0, Alt=0: 255/255/0 (0.8.1.36-a5d53)
test@1-NUC8i7BEH:~/SIMtrace/simtrace2/host/src$ sudo ./simtrace2-sniff
simtrace2-sniff - Phone-SIM card communication sniffer
(C) 2010-2017 by Harald Welte <>
(C) 2018 by Kevin Redon <>

Using USB device 1d50:60e3 Addr=6, Path=1-4, Cfg=1, Intf=0, Alt=0: 255/1/0 (SIMtrace Sniffer)
Entering main loop
Card state change: reset de-asserted
Card state change: reset asserted
Card state change: reset de-asserted
Card state change: reset asserted
Card state change: reset de-asserted
Card state change: reset asserted, reset de-asserted
Card state change: reset asserted, reset de-asserted
Card state change: reset asserted, reset de-asserted
Card state change: reset asserted, reset de-asserted
Card state change: reset asserted, reset de-asserted
Card state change: reset asserted, reset de-asserted
Card state change: reset asserted
Card state change: reset de-asserted
^Ctest@1-NUC8i7BEH:~/SIMtrace/simtrace2/host/src$ sudo ./simtrace2-sniff
simtrace2-sniff - Phone-SIM card communication sniffer
(C) 2010-2017 by Harald Welte <>
(C) 2018 by Kevin Redon <>

Using USB device 1d50:60e3 Addr=6, Path=1-4, Cfg=1, Intf=0, Alt=0: 255/1/0 (SIMtrace Sniffer)
Entering main loop
Card state change: reset de-asserted
Card state change: reset asserted
Card state change: reset de-asserted
Card state change: reset asserted
Card state change: reset de-asserted
Card state change: reset asserted
Card state change: reset de-asserted
Card state change: reset asserted
^Ctest@1-NUC8i7BEH:~/SIMtrace/simtrace2/host/src$
------------------------------------------------


Files

1.jpg View 1.jpg 5.66 MB someonebw, 11/17/2022 10:35 AM
2.jpg View 2.jpg 6.49 MB someonebw, 11/17/2022 10:35 AM
3.png View 3.png 55.4 KB someonebw, 11/17/2022 10:36 AM
Actions #1

Updated by laforge 6 months ago

  • Category set to firmware
  • Assignee set to laforge

this is very strange indeed.

just to narrow this down a bit:
  • does the same simtrace + SIM card work in any other phone or modem?

Also, do you have any 3.3V UART around? If yes, the output from the debug UART (2.5mm stereo jack, but as far as I recall also on other pins, see schematics) would be most useful.

I have never used any iPhones myself, so I don't have personal experience with those specific two units, but I've used the SIMtrace2 with tons of phone / modem models.

Actions #2

Updated by g1bbs 6 months ago

laforge wrote in #note-1:

this is very strange indeed.

just to narrow this down a bit:
  • does the same simtrace + SIM card work in any other phone or modem?

Also, do you have any 3.3V UART around? If yes, the output from the debug UART (2.5mm stereo jack, but as far as I recall also on other pins, see schematics) would be most useful.

I have never used any iPhones myself, so I don't have personal experience with those specific two units, but I've used the SIMtrace2 with tons of phone / modem models.

Hi Laforge,

Thanks for replying so quick!

For the question "does the same simtrace + SIM card work in any other phone or modem?":
(1)No, it never worked as expected.I have used another sim card from another operator, also the same problem. (Both sim cards works fine when directly inserted into the target phone)
(2)I have tested another Android phone with Snapdragon 888 modem but also resulted same bug pattern, so I assume it's not the phone's problem.
(3)Plus, I have seen examples using iPhone as target.

For the question "Also, do you have any 3.3V UART around?":
Sorry, currently I don't have any UART cable, is the UART a must for diagnosis? If so, I will buy one and it should be arrived in a week, and I will provide some more info then.

I noticed that you set this issue as category-firmware. However, I would still like to ask, is it probably a hardware problem or a host software problem?

Is there any other solution I can try without UART/JTAG?

And I wonder if the sim card tray is needed for the cable-sim? like is there any switch inside the sim card slot on the phone to be triggered with the insertion of the card tray? Do you use the card tray? (it can not fit in the right position with the cable as a hinder)

Thanks again for all your help!
Regards,

Actions #3

Updated by laforge 6 months ago

On Mon, Aug 01, 2022 at 02:11:47AM +0000, g1bbs wrote:

For the question "Also, do you have any 3.3V UART around?":
Sorry, currently I don't have any UART cable, is the UART a must for diagnosis?

In general, yes. That's pretty universally true for most >= 90% of all electronics
devices with some form of microcontroller or cpu inside that I've worked with in my career.

If so, I will buy one and it should be arrived in a week, and I will provide some more info then.

I noticed that you set this issue as category-firmware. However, I would still like to ask, is it probably a hardware problem or a host software problem?

if there's a problem with your hardware, it is something to contact about. The hardware
category here is more about aspects of the OSHW simtrace2 design.

Host software can be pretty much excluded as you are getting the card reset events, so this means
that the USB communication between simtrace device and host software works.

And I wonder if the sim card tray is needed for the cable-sim?

you always need to use a tray when your device needs a tray.

like is there any switch inside the sim card slot on the phone to be triggered with the insertion of the card tray?

that is a question about the hardware design of your phone and not about the simtrace product.

Do you use the card tray? (it can not fit in the right position with the cable as a hinder)

you will have to use a file to file down the tray (get a spare one) so the cable can fit.

The best approach to me still seems like you should use a classic/old device with a 2FF socket. Get that
working and get some hands-on experience with simtrace, and then try something that's mechanically more
challenging like 4FF slots with trays.

Actions #4

Updated by g1bbs 6 months ago

laforge wrote in #note-3:

On Mon, Aug 01, 2022 at 02:11:47AM +0000, g1bbs wrote:

For the question "Also, do you have any 3.3V UART around?":
Sorry, currently I don't have any UART cable, is the UART a must for diagnosis?

In general, yes. That's pretty universally true for most >= 90% of all electronics
devices with some form of microcontroller or cpu inside that I've worked with in my career.

If so, I will buy one and it should be arrived in a week, and I will provide some more info then.

I noticed that you set this issue as category-firmware. However, I would still like to ask, is it probably a hardware problem or a host software problem?

if there's a problem with your hardware, it is something to contact about. The hardware
category here is more about aspects of the OSHW simtrace2 design.

Host software can be pretty much excluded as you are getting the card reset events, so this means
that the USB communication between simtrace device and host software works.

And I wonder if the sim card tray is needed for the cable-sim?

you always need to use a tray when your device needs a tray.

like is there any switch inside the sim card slot on the phone to be triggered with the insertion of the card tray?

that is a question about the hardware design of your phone and not about the simtrace product.

Do you use the card tray? (it can not fit in the right position with the cable as a hinder)

you will have to use a file to file down the tray (get a spare one) so the cable can fit.

The best approach to me still seems like you should use a classic/old device with a 2FF socket. Get that
working and get some hands-on experience with simtrace, and then try something that's mechanically more
challenging like 4FF slots with trays.

Hi laforge,

Thank you for your patient and informative reply. I will try to get an UART cable for further debug. I agree with you that those new to simtrace like me should start with some old/test-friendly UE, thanks for the advice. Also, if possible, your experience on the tray problem shoule be added to the wiki page since modern UE all use tray, it will be very helpful for simtrace users.

BRs

Actions #5

Updated by laforge 6 months ago

On Tue, Aug 02, 2022 at 01:40:33PM +0000, g1bbs wrote:

Thank you for your patient and informative reply. I will try to get an UART cable for further debug. I agree with you that those new to simtrace like me should start with some old/test-friendly UE, thanks for the advice.

Also, if possible, your experience on the tray problem shoule be added to the wiki page since modern UE all use tray, it will be very helpful for simtrace users.

Indeed. With so many osmocom projects in parallel, time is always an issue. I've added your user
acocunt to the group of people with wiki editing privileges.

I'll see if I can find a filed/modified tray for some pictures.

Actions #6

Updated by laforge 6 months ago

  • Status changed from New to Feedback
  • Assignee changed from laforge to g1bbs
Actions #7

Updated by laforge 3 months ago

g1bbs wrote in #note-4:

I will try to get an UART cable for further debug. I agree with you that those new to simtrace like me should start with some old/test-friendly UE, thanks for the advice.

Did you manage to get further debug information via the serial console, or did you manage to make simtrace2 work in your setup some way meanwhile?

Actions #8

Updated by g1bbs 3 months ago

laforge wrote in #note-7:

g1bbs wrote in #note-4:

I will try to get an UART cable for further debug. I agree with you that those new to simtrace like me should start with some old/test-friendly UE, thanks for the advice.

Did you manage to get further debug information via the serial console, or did you manage to make simtrace2 work in your setup some way meanwhile?

Hi laforge, sorry for the late reply. I returned the board to our local seller, and they confirmed it was a compatibility problem between the latest firmware and the board they produced, but no debug details were given. I will check with them to see if any debug info can be provided, or the problem is already solved. BTW, I don't know whether my experience on the card tray is correct since I didn't get successful output, so, to be prudent, I didn't update the wiki as you suggested. Thanks again.

Actions #9

Updated by someonebw 2 months ago

I have the same problem as you

g1bbs

Actions #10

Updated by someonebw 2 months ago

########
[899841.622018] usb 2-1.2: new full-speed USB device number 59 using ehci-pci
[899841.702636] usb 2-1.2: New USB device found, idVendor=1d50, idProduct=60e3
[899841.702647] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=11
[899841.702654] usb 2-1.2: Product: SIMtrace 2
[899841.702660] usb 2-1.2: Manufacturer: sysmocom - s.f.m.c. GmbH
[899841.702666] usb 2-1.2: SerialNumber: 442031204c4b51363030343134323033 ########
[root@test-desktop src]# ./simtrace2-list
USB matches: 2
1d50:60e3 Addr=59, Path=2-1.2, Cfg=1, Intf=0, Alt=0: 255/1/0 (SIMtrace Sniffer)
1d50:60e3 Addr=59, Path=2-1.2, Cfg=2, Intf=0, Alt=0: 255/255/0 (0.8.1.36-a5d53) ########
[root@test-desktop src]# ./simtrace2-sniff
simtrace2-sniff - Phone-SIM card communication sniffer
(C) 2010-2017 by Harald Welte <>
(C) 2018 by Kevin Redon <>

Using USB device 1d50:60e3 Addr=59, Path=2-1.2, Cfg=1, Intf=0, Alt=0: 255/1/0 (SIMtrace Sniffer)
Entering main loop
Card state change: reset asserted, reset de-asserted
Card state change: reset asserted, reset de-asserted
Card state change: reset de-asserted
Card state change: reset de-asserted
Card state change: reset de-asserted
Card state change: reset asserted, reset de-asserted
Card state change: reset de-asserted
Card state change: reset asserted, reset de-asserted ###############
ttl debug log ############ =============================================================================
SIMtrace2 firmware 0.8.1.36-a5d53, BOARD=simtrace, APP=trace
(C) 2010-2019 by Harald Welte, 2018-2019 by Kevin Redon =============================================================================
I Chip ID: 0x299b0a60 (Ext 0x00000000)
I Serial Nr. 44203120-4c4b5136-30303431-34323033
I Reset Cause: user reset (NRST pin detected low)
I USB init...
USBD_Init
SetAddr(32) W Sta 0x888A8 [0] W _ W Sta 0x888A8 [0] W _ W Sta 0x888A8 [0] W _ SetCfg(1) cfgChanged1 I calling configure of all configurations...
I Sniffer config
I calling init of config 1...
I Sniffer Init
I entering main loop...
I USB is now configured
I Changed to ISO 7816-3 state 1
reset de-asserted
W Sta 0x88828 [0] W _ I WT updated to 9600 ETU
I Changed to ISO 7816-3 state 0
reset asserted
I Changed to ISO 7816-3 state 1
reset de-asserted
I WT updated to 9600 ETU
I Changed to ISO 7816-3 state 0
reset asserted
I Changed to ISO 7816-3 state 1
reset de-asserted
I WT updated to 9600 ETU
I Changed to ISO 7816-3 state 0
reset asserted
I Changed to ISO 7816-3 state 1
reset de-asserted #########################
(the board version on the back is v1.5 with ATSAM3SD8B chip)

Actions #11

Updated by jelson_simEng 2 months ago

Hello All,

Just thought i should put a comment in here:
I faced the same issue, exactly as it was happening in here, and i found out after all that the issue was the 3FF FPC cable that was not working 100%.
I started taking more attention to the devices used, some of them stretch to much the cables and due to that the cables have a very reduced lifetime.
I bought a new cable and it worked fine.

So my suggestion to anyone who has this problem, test with different SIMs and Cables.

Thank you,
Jelson G.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)