xmm7360 / xmm7360-pci

PCI driver for Fibocom L850-GL modem based on Intel XMM7360 modem
433 stars 82 forks source link

on thinkpad x1 carbon gen8, ERROR:root:Attach failed again #192

Open yummy527 opened 2 years ago

yummy527 commented 2 years ago

No PIN code on my sim card.

My provider is ChinaTelecom, so in file xmm7360.ini I just set apn to ctlte. Nothing else modified. What's the problem? And how to solve it?

archcarbon% lte up
This script must be run as root, elevating!
lte.sh: manage xmm7360-pci
APN: ctlte
Script: /home/xxxx/Downloads/xmm7360-pci/scripts/lte.sh; Link: /usr/local/bin

bringing wwan0 up!
RPC executing UtaMsSmsInit
b'1600000002040000001602040000003011000100020400000000'
response: 0x0
RPC executing UtaMsCbsInit
b'1600000002040000001602040000002511000100020400000000'
response: 0x0
RPC executing UtaMsNetOpen
b'1600000002040000001602040000005311000100020400000000'
response: 0x0
RPC executing UtaMsCallCsInit
b'1600000002040000001602040000002411000100020400000000'
unsolicited: UtaMsNetGprsClassIndCb: 0x0, 0x2, 0x1, 0x0
response: 0x0
RPC executing UtaMsCallPsInitialize
b'1600000002040000001602040000003a11000100020400000000'
response: 0x0
RPC executing UtaMsSsInit
b'1600000002040000001602040000002611000100020400000000'
response: 0x0
RPC executing UtaMsSimOpenReq
b'1600000002040000001602040000000111000100020400000000'
response: 0x0
RPC executing CsiFccLockQueryReq
b'1c00000002040000001c02040000018e11000101020411000101020400000000'
async_ack: 0x0
response: 0x0, 0x1, 0x2
FCC lock: state 1 mode 2
RPC executing UtaModeSetReq
b'2200000002040000002202040000012f1100010002040000000002040000000f020400000001'
response: 0x0
unsolicited: UtaModeSetRspCb: 0x1, 0x0, 0xf
RPC executing UtaMsCallPsAttachApnConfigReq
b'e11300000204000013e10204000001af110001010204110001010201005582010102040000010402040000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204000000005541020400000042020400000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000554102040000004102040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005581fa0204000000fa020400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000201005581fa0204000000fc0204000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000202000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000055140204000000140204000000000000000000000000000000000000000000000000020400000000556502040000006802040000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005582010102040000010402040000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204000000005541020400000042020400000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000554102040000004102040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005581fa0204000000fa020400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000201005581fa0204000000fc0204000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000202000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000055140204000000140204000000000000000000000000000000000000000000000000020400000000556502040000006802040000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005582010102040000010402040000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204000000005541020400000042020400000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000554102040000004102040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005581fa0204000000fa020400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000201005581fa0204000000fc0204000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000202000002040000000002040000000002040000000002040000000002040000000102040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000102040000000002040000000002040000040402040000000102040000000002040000000102040000000002040000000055140204000000140204000000000000000000000000000000000000000000000000020400000003556502040000006802040000000363746c74650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005582010102040000010402040000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204000000005541020400000042020400000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000554102040000004102040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005581fa0204000000fa020400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000201005581fa0204000000fc0204000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000202000002040000000002040000000002040000000002040000000002040000000102040000000002040000000002040000000002040000000002040000000002040000000002040000000002040000000102040000000002040000000002040000040402040000000102040000000002040000000102040000000002040000000055140204000000140204000000000000000000000000000000000000000000000000020400000003556502040000006702040000000263746c74650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020103020400000000'
async_ack: 0x0
response: 0x0, 0x0, 0x0
RPC executing UtaMsNetAttachReq
b'4500000002040000004502040000005c110001010204110001010201000204000000000204000000000204000000000204000000000202ffff0202ffff020400000000020400000000'
async_ack: 0x0
unsolicited: UtaMsNetIsAttachAllowedIndCb: 0x0, 0x0, 0x0, 0x0
unsolicited: UtaMsNetCellInfoIndCb: 0x0, 0x0, 0x0, 0xffff, 0x0, 0x4b, 0x2, 0x0, 0x2, 0xef, 0x1, 0x1, 0x0, 0x0, 0x0, 0xa0ed, 0x30209f, 0x0, 0x1, 0x1cc, 0x0
unsolicited: UtaMsNetCellChangeIndCb: 0x0, 0xffffffff, 0x0
unsolicited: UtaMsNetCellInfoIndCb: 0x0, 0x0, 0x0, 0xffff, 0x0, 0x32, 0x2, 0x0, 0x2, 0xef, 0x1, 0x1, 0x0, 0x0, 0x0, 0xa0ed, 0x30209f, 0x0, 0x1, 0x1cc, 0x0
unsolicited: UtaMsNetCellChangeIndCb: 0x0, 0x30209f, 0x0
unsolicited: UtaMsNetCellInfoIndCb: 0x0, 0x0, 0x0, 0xffff, 0x0, 0x32, 0x2, 0x0, 0x2, 0xef, 0x1, 0x1, 0x0, 0x0, 0x0, 0xa0ed, 0x30209f, 0x0, 0x1, 0x1cc, 0x0
response: 0x0, 0xffffffff, 0x2, 0x2, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x2, 0x1, 0x0
INFO:root:Attach failed - waiting to see if we just weren't ready
unsolicited: UtaMsNetRegistrationInfoIndCb: 0x0, 0x0, 0x0, 0xb, 0x1cc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0xffff, 0xffffffff, 0xffff, 0xffff, 0x0, 0x0, 0xfe, 0xfffe, 0x0, 0xffff, 0xffff, 0xfffe, 0x0, 0xffff, 0xffff, 0x0, 0x0, 0x32, 0x2, 0x0, 0x1, 0x1cc, 0x0, 0x0, 0xff, 0x1, 0x2, 0xff, 0x1, 0x2, 0x0
unsolicited: UtaMsNetIsAttachAllowedIndCb: 0x0, 0xff, 0x1, 0x0
RPC executing UtaMsNetAttachReq
b'4500000002040000004502040000005c110001010204110001010201000204000000000204000000000204000000000204000000000202ffff0202ffff020400000000020400000000'
unsolicited: UtaMsNetCellInfoIndCb: 0x0, 0x0, 0x0, 0xffff, 0x0, 0x32, 0x2, 0x0, 0x2, 0xef, 0x1, 0x1, 0x0, 0x0, 0x0, 0xa0ed, 0x30209f, 0x0, 0x1, 0x1cc, 0x0
async_ack: 0x0
unsolicited: UtaMsNetIsAttachAllowedIndCb: 0x0, 0x0, 0x0, 0x0
unsolicited: UtaMsNetCellInfoIndCb: 0x0, 0x0, 0x0, 0xffff, 0x0, 0x4b, 0x2, 0x0, 0x2, 0xef, 0x1, 0x1, 0x0, 0x0, 0x0, 0xa0ed, 0x30209f, 0x0, 0x1, 0x1cc, 0x0
unsolicited: UtaMsNetCellChangeIndCb: 0x0, 0xffffffff, 0x0
unsolicited: UtaMsNetCellInfoIndCb: 0x0, 0x0, 0x0, 0xffff, 0x0, 0x32, 0x2, 0x0, 0x2, 0xef, 0x1, 0x1, 0x0, 0x0, 0x0, 0xa0ed, 0x30209f, 0x0, 0x1, 0x1cc, 0x0
unsolicited: UtaMsNetCellChangeIndCb: 0x0, 0x30209f, 0x0
unsolicited: UtaMsNetCellInfoIndCb: 0x0, 0x0, 0x0, 0xffff, 0x0, 0x32, 0x2, 0x0, 0x2, 0xef, 0x1, 0x1, 0x0, 0x0, 0x0, 0xa0ed, 0x30209f, 0x0, 0x1, 0x1cc, 0x0
response: 0x0, 0xffffffff, 0x2, 0x2, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x2, 0x1, 0x0
ERROR:root:Attach failed again, giving up
pswiatki commented 2 years ago

I started getting something similar:

[...]
async_ack: 0x0
response: 0x0, 0x0, 0x0
RPC executing UtaMsNetAttachReq
b'4500000002040000004502040000005c110001010204110001010201000204000000000204000000000204000000000204000000000202ffff0202ffff020400000000020400000000'
async_ack: 0x0
response: 0x0, 0xffffffff, 0x5, 0x5, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x5, 0x12, 0x0
INFO:root:Attach failed - waiting to see if we just weren't ready

[...]

unsolicited: UtaMsSimCardIndCb: 0x0, 0x15, 0xff, 0x1, 0x3, 0x0, bytearray(XXXXXXXXXXXXXXX), 0x0
unsolicited: UtaMsSimApplicationIndCb: 0x0, 0x44, bytearray(XXXXXXXXXXXXXXXXXXXX), 0x10, 0x0, 0x0, bytearray(XXXXXXXXXXXXXXXXXXXXXX), 0x0
unsolicited: UtaMsSimInfoIndCb: 0x0, 0x0, 0x0, 0x0, 0x2fe2, bytearray(b'pl'), bytearray(b'en'), bytearray(b'\xff\xff'), bytearray(XXXXXXXXXXXX), 0xff, 0xa, 0xa, 0x3, 0x3, 0x1, 0x2, 0xff, 0x0, bytearray(XXXXXXXXXXXXXXX), 0x3, 0x0
unsolicited: UtaMsSimMccMncIndCb: 0x0, 0x0, 0x3, 0x104, 0x0
unsolicited: UtaMsSimLockStatusIndCb: 0x0, 0x8, bytearray(XXXXXXXXXXXXXXXXXXXXXX
unsolicited: UtaMsSimFdnStateIndCb: 0x0, 0x1, 0x1, 0x0, 0x0
unsolicited: UtaMsSimBdnStateIndCb: 0x0, 0x0, 0x1, 0x0, 0x0
unsolicited: UtaMsSimInitIndCb: 0x0, 0x0, 0x0, 0x0, 0x6f07, 0x0, 0x1, bytearray(XXXXXXXXXXXXX), ..............
unsolicited: UtaMsSimTkProactiveCommandIndCb: 0x0, bytearray(XXXXXXXXXXXXXXXXXX), 0x...................
unsolicited: UtaMsSimFullAccessIndCb: 0x0
unsolicited: UtaMsSmsSimMsgCacheFinishedIndCb: 0x0, 0x0

Then it stops for a minute or so and then starts spitting unsolicited messages every ~30 seconds:

unsolicited: UtaMsSimTkTerminalResponseIndCb: 0x0, 0x0, 0x32ff, 0x25, 0x0, 0x90, 0x1, 0x1, 0x1, 0x1, 0x3, 0x0
unsolicited: UtaMsSimTkTerminalResponseIndCb: 0x0, 0x0, 0x2004, 0x26, 0x0, 0x90, 0x2, 0x1, 0x2, 0x1, 0x0, 0x0
unsolicited: UtaMsSimTkTerminalResponseIndCb: 0x0, 0x0, 0x2004, 0x26, 0x0, 0x90, 0x3, 0x1, 0x3, 0x1, 0x0, 0x0
unsolicited: UtaMsSimTkTerminalResponseIndCb: 0x0, 0x0, 0x2004, 0x26, 0x0, 0x90, 0x4, 0x1, 0x4, 0x1, 0x0, 0x0
unsolicited: UtaMsSimTkTerminalResponseIndCb: 0x0, 0x0, 0x2004, 0x26, 0x0, 0x90, 0x5, 0x1, 0x5, 0x1, 0x0, 0x0
.....

It used to work before, but not any more with: Linux sdr-aptv 5.19.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 05 Sep 2022 18:09:09 +0000 x86_64 GNU/Linux

yummy527 commented 2 years ago

Wi-Fi is a good choice now.🤷‍♂️

pswiatki commented 2 years ago

Unrelated. Stick to the WWAN subject here.

ankitsinghaniyaz commented 2 years ago

I'm getting the same error on Linux thinkpd 5.15.0-48-generic #54-Ubuntu SMP Fri Aug 26 13:26:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

yummy527 commented 1 year ago

Today I tried again, and it still does not work. The same error.

The card has no SIM PIN. The card is a normal one with both data service and calling service. It works well on my iPhone.

OS info: Linux archcarbon 6.2.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 30 Mar 2023 14:51:14 +0000 x86_64 GNU/Linux

python version: 3.10 (does it matter?)

In the xmm7360.ini file, I just set APN as ctnet or ctwap or ctlet, since I the card's provider is China Telecom.

Any help?

yummy527 commented 1 year ago

In the file open_xdatachannel:

# Add DNS values to /etc/resolv.conf
if not cfg.noresolv:
    with open('/etc/resolv.conf', 'a') as resolv:
        resolv.write('\n# Added by xmm7360\n')
        for dns in dns_values['v4'] + dns_values['v6']:
            resolv.write('nameserver %s\n' % dns)

Together with the file xmm7360.ini :

# uncomment to not add DNS values to /etc/resolv.conf
#noresolv=True

From the content of the two file mentioned above, I guess that: when running the command in shell lte.sh setup and lte up, the script is intended to write nameserver to the file /etc/resolv.conf. However, I just found that this conf file could not be changed by user and the lte script easily. Even after running command echo "namesever 8.8.8.8" | sudo tee -a /etc/resolv.conf(this command is mentioned in INSTALLING.md), nothing was appended to file resolv.conf at all.

An old post discussed how to set DNS in details, and I have not dig it a lot yet. But if this DNS writing problem causes the Attach failed again, giving up error mentioned here, the post will be helpful.

I have an intuition that this DNS setting problem may be leading to the failure.

update: Sorry. I rechecked and found that the error Attach failed again, giving up is lines before the code block of adding DNS, so the error is not caused by failure of adding DNS.