4IceG / luci-app-3ginfo-lite

Graphic visualization of the mPCI-E / M.2 and USB 3G / LTE / LTE-A / 5G modem connection status. (LuCI JS) | OpenWrt >= 21.02
104 stars 41 forks source link

Add support for Foxconn T99W175 also known as Dell DW5930e #55

Open 4IceG opened 10 months ago

4IceG commented 10 months ago

Would you like to add support for Foxconn T99W175 also known as Dell DW5930e? Device connected to board with PCI MHI and AT port available at /dev/wwan0at0, MBIM at /dev/wwan0mbim0 and QCDM at /dev/wwan0qcdm0

AT Commands available here: https://www.codico.com/media/productattach/m/v/mv31_w_atc_v00058_2111538_1.pdf

by now only this info are shown image

Originally posted by @riccardoferti in https://github.com/4IceG/luci-app-3ginfo-lite/issues/28#issuecomment-1871015490

4IceG commented 10 months ago

Hi @riccardoferti ,

I moved your post to a new thread. We can try to add support for this modem.

First, show the output of the commands:

cat /sys/kernel/debug/usb/devices
sms_tool -d /dev/wwan0at0 at "at^ca_info?"
sms_tool -d /dev/wwan0at0 at "at^debug?"
riccardoferti commented 10 months ago

@4IceG

cat /sys/kernel/debug/usb/devices

No USB devices available, but:

cat /sys/kernel/debug/mhi/mhi0/devices

mhi0: type: Controller dev_wake: 0
LOOPBACK: type: Transfer dev_wake: 0 channels: 0(UL)/1(DL)
DIAG: type: Transfer dev_wake: 0 channels: 4(UL)/5(DL)
MBIM: type: Transfer dev_wake: 0 channels: 12(UL)/13(DL)
DUN: type: Transfer dev_wake: 0 channels: 32(UL)/33(DL)
IP_HW0_MBIM: type: Transfer dev_wake: 0 channels: 100(UL)/101(DL)

sms_tool -d /dev/wwan0at0 at "at^ca_info?"

LTE serving information :
PCC info: Band is LTE_B3, Band_width is 20.0 MHz
SCC1 info: Band is LTE_B20, Band_width is 10.0 MHz
SCC2 info: Band is LTE_B7, Band_width is 15.0 MHz
PCC info: Band is NR5G_N78, Band_width is 80.0 MHz

sms_tool -d /dev/wwan0at0 at "at^debug?"


RAT:LTE+NR
mcc:222,mnc:10
lte_cell_id:19403297
lte_tac:43083
lte_tx_pwr:NA
lte_ant_rsrp:rx_diversity:3 (-94.1dBm,-103.5dBm,NA,NA)
pcell: lte_band:3 lte_band_width:20.0MHz
channel:1850 pci:389
lte_rsrp:-93.0dBm,rsrq:-12.7dB
lte_rssi:-55.9dBm,lte_snr:1.0dB
scell: lte_band:20 lte_band_width:10.0MHz
channel:6400 pci:230
lte_rsrp:-84.2dBm,rsrq:-11.9dB
lte_rssi:-64.6dBm,lte_snr:NA
scell: lte_band:7 lte_band_width:15.0MHz
channel:3025 pci:53
lte_rsrp:-97.1dBm,rsrq:-11.6dB
lte_rssi:-77.5dBm,lte_snr:NA
scell: lte_band:1 lte_band_width:15.0MHz
channel:525 pci:168
lte_rsrp:-93.2dBm,rsrq:-12.0dB
lte_rssi:-73.4dBm,lte_snr:NA

nr_band:n78
nr_band_width:80.0MHz
nr_channel:643296
nr_pci:736
nr_rsrp:-98dBm rx_diversity: 15 (-110.1dBm,-98.0dBm,-103.9dBm,-103.8dBm)
nr_rsrq:-11dB
nr_snr:21.0dB
4IceG commented 10 months ago

@obsy Cezary masz moze pomysl jak zidentyfikowac w systemie takie modemy, aby je potem przypisac do skryptow?

Same wyniki tez sa ciekawe, dwa pasma glowne.. 5G komplikuje znow skrypty.

obsy commented 10 months ago

Kod nie jest przystosowany do innych urządzeń niż usb. Albo robisz nowe obejście tak jak zrobiłeś dla np. hilinka albo trzeba sporo zmodyfikować główny kod żeby wykrywał też urządzenia pci. Przydał by się bezpośredni dostęp do takiego modemu.

obsy commented 10 months ago

@riccardoferti

Could you show also

ls -al /dev/* 
riccardoferti commented 10 months ago

@riccardoferti

Could you show also

ls -al /dev/* 
crw-------    1 root     root        5,   1 Dec 29 00:42 /dev/console
crw-------    1 root     root       10, 125 Dec 29 00:42 /dev/cpu_dma_latency
crw-------    1 root     root       29,   0 Dec 29 00:42 /dev/fb0
lrwxrwxrwx    1 root     root            13 Dec 29 00:42 /dev/fd -> /proc/self/fd
crw-rw-rw-    1 root     root        1,   7 Dec 29 00:42 /dev/full
crw-------    1 root     root       10, 228 Dec 29 00:42 /dev/hpet
crw-------    1 root     root       10, 183 Dec 29 00:42 /dev/hwrng
crw-------    1 root     root       89,   0 Dec 29 00:42 /dev/i2c-0
crw-------    1 root     root       89,   1 Dec 29 00:42 /dev/i2c-1
crw-------    1 root     root       89,   2 Dec 29 00:42 /dev/i2c-2
crw-------    1 root     root       89,   3 Dec 29 00:42 /dev/i2c-3
crw-------    1 root     root       89,   4 Dec 29 00:42 /dev/i2c-4
crw-------    1 root     root       89,   5 Dec 29 00:42 /dev/i2c-5
crw-------    1 root     root        1,  11 Dec 29 00:42 /dev/kmsg
srw-rw-rw-    1 root     root             0 Dec 29 00:42 /dev/log
crw-------    1 root     root       10, 237 Dec 29 00:42 /dev/loop-control
brw-------    1 root     root        7,   0 Dec 29 00:42 /dev/loop0
brw-------    1 root     root        7,   1 Dec 29 00:42 /dev/loop1
brw-------    1 root     root        7,   2 Dec 29 00:42 /dev/loop2
brw-------    1 root     root        7,   3 Dec 29 00:42 /dev/loop3
brw-------    1 root     root        7,   4 Dec 29 00:42 /dev/loop4
brw-------    1 root     root        7,   5 Dec 29 00:42 /dev/loop5
brw-------    1 root     root        7,   6 Dec 29 00:42 /dev/loop6
brw-------    1 root     root        7,   7 Dec 29 00:42 /dev/loop7
crw-rw-rw-    1 root     root        1,   3 Dec 29 00:42 /dev/null
crw-------    1 root     root       10, 144 Dec 29 00:42 /dev/nvram
crw-------    1 root     root        1,   4 Dec 29 00:42 /dev/port
crw-------    1 root     root      108,   0 Dec 29 00:42 /dev/ppp
crw-rw-rw-    1 root     root        5,   2 Dec 29 09:34 /dev/ptmx
crw-------    1 root     root      249,   0 Dec 29 00:42 /dev/ptp0
crw-rw-rw-    1 root     root        1,   8 Dec 29 00:42 /dev/random
crw-------    1 root     root      251,   0 Dec 29 00:42 /dev/rtc0
brw-------    1 root     root        8,   0 Dec 29 00:42 /dev/sda
brw-------    1 root     root        8,   1 Dec 29 00:42 /dev/sda1
brw-------    1 root     root      259,   0 Dec 29 00:42 /dev/sda128
brw-------    1 root     root        8,   2 Dec 29 00:42 /dev/sda2
brw-------    1 root     root        8,  16 Dec 29 00:42 /dev/sdb
brw-------    1 root     root        8,  17 Dec 29 00:42 /dev/sdb1
brw-------    1 root     root        8,  18 Dec 29 00:42 /dev/sdb2
brw-------    1 root     root        8,  19 Dec 29 00:42 /dev/sdb3
brw-------    1 root     root        8,  20 Dec 29 00:42 /dev/sdb4
brw-------    1 root     root        8,  21 Dec 29 00:42 /dev/sdb5
lrwxrwxrwx    1 root     root             8 Dec 29 00:42 /dev/shm -> /tmp/shm
lrwxrwxrwx    1 root     root            15 Dec 29 00:42 /dev/stderr -> /proc/self/fd/2
lrwxrwxrwx    1 root     root            15 Dec 29 00:42 /dev/stdin -> /proc/self/fd/0
lrwxrwxrwx    1 root     root            15 Dec 29 00:42 /dev/stdout -> /proc/self/fd/1
crw-rw-rw-    1 root     root        5,   0 Dec 29 00:42 /dev/tty
crw-rw----    1 root     dialout     4,   0 Dec 29 00:42 /dev/tty0
crw-rw----    1 root     dialout     4,   1 Dec 29 00:43 /dev/tty1
crw-rw----    1 root     dialout     4,  10 Dec 29 00:42 /dev/tty10
crw-rw----    1 root     dialout     4,  11 Dec 29 00:42 /dev/tty11
crw-rw----    1 root     dialout     4,  12 Dec 29 00:42 /dev/tty12
crw-rw----    1 root     dialout     4,  13 Dec 29 00:42 /dev/tty13
crw-rw----    1 root     dialout     4,  14 Dec 29 00:42 /dev/tty14
crw-rw----    1 root     dialout     4,  15 Dec 29 00:42 /dev/tty15
crw-rw----    1 root     dialout     4,  16 Dec 29 00:42 /dev/tty16
crw-rw----    1 root     dialout     4,  17 Dec 29 00:42 /dev/tty17
crw-rw----    1 root     dialout     4,  18 Dec 29 00:42 /dev/tty18
crw-rw----    1 root     dialout     4,  19 Dec 29 00:42 /dev/tty19
crw-rw----    1 root     dialout     4,   2 Dec 29 00:42 /dev/tty2
crw-rw----    1 root     dialout     4,  20 Dec 29 00:42 /dev/tty20
crw-rw----    1 root     dialout     4,  21 Dec 29 00:42 /dev/tty21
crw-rw----    1 root     dialout     4,  22 Dec 29 00:42 /dev/tty22
crw-rw----    1 root     dialout     4,  23 Dec 29 00:42 /dev/tty23
crw-rw----    1 root     dialout     4,  24 Dec 29 00:42 /dev/tty24
crw-rw----    1 root     dialout     4,  25 Dec 29 00:42 /dev/tty25
crw-rw----    1 root     dialout     4,  26 Dec 29 00:42 /dev/tty26
crw-rw----    1 root     dialout     4,  27 Dec 29 00:42 /dev/tty27
crw-rw----    1 root     dialout     4,  28 Dec 29 00:42 /dev/tty28
crw-rw----    1 root     dialout     4,  29 Dec 29 00:42 /dev/tty29
crw-rw----    1 root     dialout     4,   3 Dec 29 00:42 /dev/tty3
crw-rw----    1 root     dialout     4,  30 Dec 29 00:42 /dev/tty30
crw-rw----    1 root     dialout     4,  31 Dec 29 00:42 /dev/tty31
crw-rw----    1 root     dialout     4,  32 Dec 29 00:42 /dev/tty32
crw-rw----    1 root     dialout     4,  33 Dec 29 00:42 /dev/tty33
crw-rw----    1 root     dialout     4,  34 Dec 29 00:42 /dev/tty34
crw-rw----    1 root     dialout     4,  35 Dec 29 00:42 /dev/tty35
crw-rw----    1 root     dialout     4,  36 Dec 29 00:42 /dev/tty36
crw-rw----    1 root     dialout     4,  37 Dec 29 00:42 /dev/tty37
crw-rw----    1 root     dialout     4,  38 Dec 29 00:42 /dev/tty38
crw-rw----    1 root     dialout     4,  39 Dec 29 00:42 /dev/tty39
crw-rw----    1 root     dialout     4,   4 Dec 29 00:42 /dev/tty4
crw-rw----    1 root     dialout     4,  40 Dec 29 00:42 /dev/tty40
crw-rw----    1 root     dialout     4,  41 Dec 29 00:42 /dev/tty41
crw-rw----    1 root     dialout     4,  42 Dec 29 00:42 /dev/tty42
crw-rw----    1 root     dialout     4,  43 Dec 29 00:42 /dev/tty43
crw-rw----    1 root     dialout     4,  44 Dec 29 00:42 /dev/tty44
crw-rw----    1 root     dialout     4,  45 Dec 29 00:42 /dev/tty45
crw-rw----    1 root     dialout     4,  46 Dec 29 00:42 /dev/tty46
crw-rw----    1 root     dialout     4,  47 Dec 29 00:42 /dev/tty47
crw-rw----    1 root     dialout     4,  48 Dec 29 00:42 /dev/tty48
crw-rw----    1 root     dialout     4,  49 Dec 29 00:42 /dev/tty49
crw-rw----    1 root     dialout     4,   5 Dec 29 00:42 /dev/tty5
crw-rw----    1 root     dialout     4,  50 Dec 29 00:42 /dev/tty50
crw-rw----    1 root     dialout     4,  51 Dec 29 00:42 /dev/tty51
crw-rw----    1 root     dialout     4,  52 Dec 29 00:42 /dev/tty52
crw-rw----    1 root     dialout     4,  53 Dec 29 00:42 /dev/tty53
crw-rw----    1 root     dialout     4,  54 Dec 29 00:42 /dev/tty54
crw-rw----    1 root     dialout     4,  55 Dec 29 00:42 /dev/tty55
crw-rw----    1 root     dialout     4,  56 Dec 29 00:42 /dev/tty56
crw-rw----    1 root     dialout     4,  57 Dec 29 00:42 /dev/tty57
crw-rw----    1 root     dialout     4,  58 Dec 29 00:42 /dev/tty58
crw-rw----    1 root     dialout     4,  59 Dec 29 00:42 /dev/tty59
crw-rw----    1 root     dialout     4,   6 Dec 29 00:42 /dev/tty6
crw-rw----    1 root     dialout     4,  60 Dec 29 00:42 /dev/tty60
crw-rw----    1 root     dialout     4,  61 Dec 29 00:42 /dev/tty61
crw-rw----    1 root     dialout     4,  62 Dec 29 00:42 /dev/tty62
crw-rw----    1 root     dialout     4,  63 Dec 29 00:42 /dev/tty63
crw-rw----    1 root     dialout     4,   7 Dec 29 00:42 /dev/tty7
crw-rw----    1 root     dialout     4,   8 Dec 29 00:42 /dev/tty8
crw-rw----    1 root     dialout     4,   9 Dec 29 00:42 /dev/tty9
crw-rw----    1 root     dialout     4,  64 Dec 29 00:42 /dev/ttyS0
crw-rw----    1 root     dialout     4,  65 Dec 29 00:42 /dev/ttyS1
crw-rw----    1 root     dialout     4,  74 Dec 29 00:42 /dev/ttyS10
crw-rw----    1 root     dialout     4,  75 Dec 29 00:42 /dev/ttyS11
crw-rw----    1 root     dialout     4,  76 Dec 29 00:42 /dev/ttyS12
crw-rw----    1 root     dialout     4,  77 Dec 29 00:42 /dev/ttyS13
crw-rw----    1 root     dialout     4,  78 Dec 29 00:42 /dev/ttyS14
crw-rw----    1 root     dialout     4,  79 Dec 29 00:42 /dev/ttyS15
crw-rw----    1 root     dialout     4,  66 Dec 29 00:42 /dev/ttyS2
crw-rw----    1 root     dialout     4,  67 Dec 29 00:42 /dev/ttyS3
crw-rw----    1 root     dialout     4,  68 Dec 29 00:42 /dev/ttyS4
crw-rw----    1 root     dialout     4,  69 Dec 29 00:42 /dev/ttyS5
crw-rw----    1 root     dialout     4,  70 Dec 29 00:42 /dev/ttyS6
crw-rw----    1 root     dialout     4,  71 Dec 29 00:42 /dev/ttyS7
crw-rw----    1 root     dialout     4,  72 Dec 29 00:42 /dev/ttyS8
crw-rw----    1 root     dialout     4,  73 Dec 29 00:42 /dev/ttyS9
crw-rw-rw-    1 root     root        1,   9 Dec 29 00:42 /dev/urandom
crw-------    1 root     root        7,   0 Dec 29 00:42 /dev/vcs
crw-------    1 root     root        7,   1 Dec 29 00:42 /dev/vcs1
crw-------    1 root     root        7, 128 Dec 29 00:42 /dev/vcsa
crw-------    1 root     root        7, 129 Dec 29 00:42 /dev/vcsa1
crw-------    1 root     root        7,  64 Dec 29 00:42 /dev/vcsu
crw-------    1 root     root        7,  65 Dec 29 00:42 /dev/vcsu1
crw-------    1 root     root       10, 127 Dec 29 00:42 /dev/vmci
crw-------    1 root     root       10, 126 Dec 29 00:42 /dev/vsock
crw-------    1 root     root      242,   2 Dec 29 00:42 /dev/wwan0at0
crw-------    1 root     root      242,   1 Dec 29 00:42 /dev/wwan0mbim0
crw-------    1 root     root      242,   0 Dec 29 00:42 /dev/wwan0qcdm0
crw-rw-rw-    1 root     root        1,   5 Dec 29 00:42 /dev/zero

/dev/bus:
drwxr-xr-x    3 root     root            60 Dec 29 00:42 .
drwxr-xr-x    6 root     root          2920 Dec 29 00:42 ..
drwxr-xr-x    5 root     root           100 Dec 29 00:42 usb

/dev/cpu:
drwxr-xr-x    6 root     root           120 Dec 29 00:42 .
drwxr-xr-x    6 root     root          2920 Dec 29 00:42 ..
drwxr-xr-x    2 root     root            80 Dec 29 00:42 0
drwxr-xr-x    2 root     root            80 Dec 29 00:42 1
drwxr-xr-x    2 root     root            80 Dec 29 00:42 2
drwxr-xr-x    2 root     root            80 Dec 29 00:42 3

/dev/dri:
drwxr-xr-x    2 root     root            80 Dec 29 00:42 .
drwxr-xr-x    6 root     root          2920 Dec 29 00:42 ..
crw-------    1 root     root      226,   0 Dec 29 00:42 card0
crw-------    1 root     root      226, 128 Dec 29 00:42 renderD128

/dev/pts:
drwxr-xr-x    2 root     root             0 Dec 29 00:42 .
drwxr-xr-x    6 root     root          2920 Dec 29 00:42 ..
crw--w--w-    1 root     root      136,   0 Dec 29 09:34 0
c---------    1 root     root        5,   2 Dec 29 00:42 ptmx
obsy commented 10 months ago

And show us:

sms_tool -d /dev/wwan0at0 at "AT+CPIN?"
sms_tool -d /dev/wwan0at0 at "AT+CSQ"
sms_tool -d /dev/wwan0at0 at "AT+COPS=3,0;+COPS?"
sms_tool -d /dev/wwan0at0 at "AT+COPS=3,2;+COPS?"
sms_tool -d /dev/wwan0at0 at "AT+CREG=2;+CREG?"
riccardoferti commented 10 months ago

sms_tool -d /dev/wwan0at0 at "AT+CPIN?" sms_tool -d /dev/wwan0at0 at "AT+CSQ" sms_tool -d /dev/wwan0at0 at "AT+COPS=3,0;+COPS?" sms_tool -d /dev/wwan0at0 at "AT+COPS=3,2;+COPS?" sms_tool -d /dev/wwan0at0 at "AT+CREG=2;+CREG?"

sms_tool -d /dev/wwan0at0 at "AT+CPIN?"

+CPIN: READY

root@OpenWrt:~# sms_tool -d /dev/wwan0at0 at "AT+CSQ"

+CSQ: 29,99

root@OpenWrt:~# sms_tool -d /dev/wwan0at0 at "AT+COPS=3,0;+COPS?"

+COPS: 0,0,"vodafone IT",13

root@OpenWrt:~# sms_tool -d /dev/wwan0at0 at "AT+COPS=3,2;+COPS?"

+COPS: 0,2,"22210",13

root@OpenWrt:~# sms_tool -d /dev/wwan0at0 at "AT+CREG=2;+CREG?"

+CREG: 2,1,"A84B","1281221",13

obsy commented 10 months ago

Hmm, very sad that /dev/mhi_DIAG does not exist like in Quectel.

riccardoferti commented 10 months ago

Hmm, very sad that /dev/mhi_DIAG does not exist like in Quectel.

It should be /dev/wwan0qcdm0 but don't know if It works

riccardoferti commented 10 months ago

what i see in device:

root@OpenWrt:/sys/devices/pci0000:00/0000:00:1c.5/0000:02:00.0/mhi0# ls mhi0_DIAG mhi0_IP_HW0_MBIM mhi0_MBIM power subsystem wakeup mhi0_DUN mhi0_LOOPBACK oem_pk_hash serial_number uevent wwan

obsy commented 10 months ago
sms_tool -d /dev/wwan0at0 at "AT+CGMI"
sms_tool -d /dev/wwan0at0 at "AT+CGMM"
sms_tool -d /dev/wwan0at0 at "AT+CGMR"
sms_tool -d /dev/wwan0at0 at "AT+CGSN"
sms_tool -d /dev/wwan0at0 at "AT+ICCID"
riccardoferti commented 10 months ago

sms_tool -d /dev/wwan0at0 at "AT+CGMI" sms_tool -d /dev/wwan0at0 at "AT+CGMM" sms_tool -d /dev/wwan0at0 at "AT+CGMR" sms_tool -d /dev/wwan0at0 at "AT+CGSN" sms_tool -d /dev/wwan0at0 at "AT+ICCID"

AT+CGMI DELL AT+CGMM T99W175 AT+CGMR T99W175.F0.1.0.0.9.VF.008 1 [Jan 20 2023 12:00:00] AT+CGSN 3522801100xxxxx AT+ICCID ICCID: 8939104520038678xxxx

x are for privacy

obsy commented 10 months ago

I made the parser and it seems to work. But I'm still wondering how to create a framework to support PCI devices.

riccardoferti commented 10 months ago

I made the parser and it seems to work. But I'm still wondering how to create a framework to support PCI devices.

It's not simple to use AT port as device?

obsy commented 10 months ago

Nope. It's a matter of discovering what is available and what script to use to process it. The script itself is simple.

riccardoferti commented 10 months ago

Nope. It's a matter of discovering what is available and what script to use to process it. The script itself is simple.

On USB 2.0 debug mode, it shows AT console in /dev/ttyUSB3

obsy commented 10 months ago

Show us

cat /sys/kernel/debug/usb/devices

in this "usb 2.0 debug mode".

riccardoferti commented 10 months ago

Show us

cat /sys/kernel/debug/usb/devices

in this "usb 2.0 debug mode".

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=05c6 ProdID=90d5 Rev= 4.14
S:  Manufacturer=Microsoft
S:  Product=Generic Mobile Broadband Adapter
S:  SerialNumber=90b86942
C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
A:  FirstIf#= 2 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=option
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
I:  If#= 3 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#= 3 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E:  Ad=84(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

obtained assigning echo "05c6 90d5 ff" > /sys/bus/usb-serial/drivers/option1/new_id

jfrogg commented 10 months ago

Let me share some thoughts on discovery process. The user will enter or select the serial port in the configuration. No change here. Knowing serial device like "/dev/wwan0at0" allows the parent device be discovered the same way as with USB, but in this case the result will be a PCI path/device. The code should be similar to what is currently used in https://github.com/4IceG/luci-app-3ginfo-lite/blob/main/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh#L151

Unfortunately, I do not have a suitable device to experiment with at the moment, so this is an example based on PCI Wi-Fi card:

# cat /sys/devices/platform/1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0/vendor
0x14c3
# cat /sys/devices/platform/1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0/device
0x7915

It should be possible to find a path similar to "/sys/devices/platform/1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0" for "/dev/wwan0at0" from SysFS. In my example with net device "phy0-ap0" it was easy like that:

# readlink -f /sys/class/net/phy0-ap0/device
/sys/devices/platform/1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0

"vendor + product" combination is exactly what is currently used to select modem-specific scripts.

Hope it helps )

riccardoferti commented 10 months ago

Let me share some thoughts on discovery process. The user will enter or select the serial port in the configuration. No change here. Knowing serial device like "/dev/wwan0at0" allows the parent device be discovered the same way as with USB, but in this case the result will be a PCI path/device. The code should be similar to what is currently used in https://github.com/4IceG/luci-app-3ginfo-lite/blob/main/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh#L151

Unfortunately, I do not have a suitable device to experiment with at the moment, so this is an example based on PCI Wi-Fi card:

cat /sys/devices/platform/1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/vendor
0x14c3
cat /sys/devices/platform/1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/device
0x7916

It should be possible to find a path similar to "1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0" for "/dev/wwan0at0" from SysFS.

"vendor + product" combination is exactly what is currently used to select modem-specific scripts.

Hope it helps )

Clear, It Is as you said

obsy commented 10 months ago

@riccardoferti

Show me

find /sys/bus/pci
find /sys -name wwan0at0

also install pciutils and show lspci -nn

riccardoferti commented 10 months ago

lspci -nn

find /sys/bus/pci
/sys/bus/pci
/sys/bus/pci/uevent
/sys/bus/pci/slots
/sys/bus/pci/drivers_autoprobe
/sys/bus/pci/devices
/sys/bus/pci/devices/0000:00:1f.2
/sys/bus/pci/devices/0000:00:1c.0
/sys/bus/pci/devices/0000:00:1f.0
/sys/bus/pci/devices/0000:02:00.0
/sys/bus/pci/devices/0000:00:04.0
/sys/bus/pci/devices/0000:00:1c.5
/sys/bus/pci/devices/0000:00:16.0
/sys/bus/pci/devices/0000:01:00.0
/sys/bus/pci/devices/0000:00:1b.0
/sys/bus/pci/devices/0000:00:19.0
/sys/bus/pci/devices/0000:00:1f.3
/sys/bus/pci/devices/0000:00:00.0
/sys/bus/pci/devices/0000:00:03.0
/sys/bus/pci/devices/0000:00:1d.0
/sys/bus/pci/devices/0000:00:02.0
/sys/bus/pci/devices/0000:00:14.0
/sys/bus/pci/rescan
/sys/bus/pci/resource_alignment
/sys/bus/pci/drivers_probe
/sys/bus/pci/drivers
/sys/bus/pci/drivers/pata_amd
/sys/bus/pci/drivers/pata_amd/uevent
/sys/bus/pci/drivers/pata_amd/bind
/sys/bus/pci/drivers/pata_amd/new_id
/sys/bus/pci/drivers/pata_amd/remove_id
/sys/bus/pci/drivers/pata_amd/unbind
/sys/bus/pci/drivers/ata_piix
/sys/bus/pci/drivers/ata_piix/uevent
/sys/bus/pci/drivers/ata_piix/bind
/sys/bus/pci/drivers/ata_piix/new_id
/sys/bus/pci/drivers/ata_piix/remove_id
/sys/bus/pci/drivers/ata_piix/unbind
/sys/bus/pci/drivers/ehci-pci
/sys/bus/pci/drivers/ehci-pci/uevent
/sys/bus/pci/drivers/ehci-pci/bind
/sys/bus/pci/drivers/ehci-pci/new_id
/sys/bus/pci/drivers/ehci-pci/remove_id
/sys/bus/pci/drivers/ehci-pci/unbind
/sys/bus/pci/drivers/ehci-pci/0000:00:1d.0
/sys/bus/pci/drivers/mptsas
/sys/bus/pci/drivers/mptsas/uevent
/sys/bus/pci/drivers/mptsas/bind
/sys/bus/pci/drivers/mptsas/new_id
/sys/bus/pci/drivers/mptsas/remove_id
/sys/bus/pci/drivers/mptsas/unbind
/sys/bus/pci/drivers/xhci_hcd
/sys/bus/pci/drivers/xhci_hcd/uevent
/sys/bus/pci/drivers/xhci_hcd/bind
/sys/bus/pci/drivers/xhci_hcd/new_id
/sys/bus/pci/drivers/xhci_hcd/remove_id
/sys/bus/pci/drivers/xhci_hcd/unbind
/sys/bus/pci/drivers/xhci_hcd/0000:00:14.0
/sys/bus/pci/drivers/pata_oldpiix
/sys/bus/pci/drivers/pata_oldpiix/uevent
/sys/bus/pci/drivers/pata_oldpiix/bind
/sys/bus/pci/drivers/pata_oldpiix/new_id
/sys/bus/pci/drivers/pata_oldpiix/remove_id
/sys/bus/pci/drivers/pata_oldpiix/unbind
/sys/bus/pci/drivers/intel_pch_thermal
/sys/bus/pci/drivers/intel_pch_thermal/uevent
/sys/bus/pci/drivers/intel_pch_thermal/bind
/sys/bus/pci/drivers/intel_pch_thermal/new_id
/sys/bus/pci/drivers/intel_pch_thermal/remove_id
/sys/bus/pci/drivers/intel_pch_thermal/unbind
/sys/bus/pci/drivers/intel_pch_thermal/module
/sys/bus/pci/drivers/mptspi
/sys/bus/pci/drivers/mptspi/uevent
/sys/bus/pci/drivers/mptspi/bind
/sys/bus/pci/drivers/mptspi/new_id
/sys/bus/pci/drivers/mptspi/remove_id
/sys/bus/pci/drivers/mptspi/unbind
/sys/bus/pci/drivers/vmw_vmci
/sys/bus/pci/drivers/vmw_vmci/uevent
/sys/bus/pci/drivers/vmw_vmci/bind
/sys/bus/pci/drivers/vmw_vmci/new_id
/sys/bus/pci/drivers/vmw_vmci/remove_id
/sys/bus/pci/drivers/vmw_vmci/unbind
/sys/bus/pci/drivers/pata_via
/sys/bus/pci/drivers/pata_via/uevent
/sys/bus/pci/drivers/pata_via/bind
/sys/bus/pci/drivers/pata_via/new_id
/sys/bus/pci/drivers/pata_via/remove_id
/sys/bus/pci/drivers/pata_via/unbind
/sys/bus/pci/drivers/iosf_mbi_pci
/sys/bus/pci/drivers/iosf_mbi_pci/uevent
/sys/bus/pci/drivers/iosf_mbi_pci/bind
/sys/bus/pci/drivers/iosf_mbi_pci/new_id
/sys/bus/pci/drivers/iosf_mbi_pci/remove_id
/sys/bus/pci/drivers/iosf_mbi_pci/unbind
/sys/bus/pci/drivers/snd_hda_intel
/sys/bus/pci/drivers/snd_hda_intel/uevent
/sys/bus/pci/drivers/snd_hda_intel/bind
/sys/bus/pci/drivers/snd_hda_intel/new_id
/sys/bus/pci/drivers/snd_hda_intel/remove_id
/sys/bus/pci/drivers/snd_hda_intel/0000:00:1b.0
/sys/bus/pci/drivers/snd_hda_intel/0000:00:03.0
/sys/bus/pci/drivers/snd_hda_intel/unbind
/sys/bus/pci/drivers/snd_hda_intel/module
/sys/bus/pci/drivers/bochs-drm
/sys/bus/pci/drivers/bochs-drm/uevent
/sys/bus/pci/drivers/bochs-drm/bind
/sys/bus/pci/drivers/bochs-drm/new_id
/sys/bus/pci/drivers/bochs-drm/remove_id
/sys/bus/pci/drivers/bochs-drm/unbind
/sys/bus/pci/drivers/bochs-drm/module
/sys/bus/pci/drivers/i40e
/sys/bus/pci/drivers/i40e/uevent
/sys/bus/pci/drivers/i40e/bind
/sys/bus/pci/drivers/i40e/new_id
/sys/bus/pci/drivers/i40e/remove_id
/sys/bus/pci/drivers/i40e/unbind
/sys/bus/pci/drivers/i40e/module
/sys/bus/pci/drivers/r8125
/sys/bus/pci/drivers/r8125/uevent
/sys/bus/pci/drivers/r8125/bind
/sys/bus/pci/drivers/r8125/new_id
/sys/bus/pci/drivers/r8125/remove_id
/sys/bus/pci/drivers/r8125/unbind
/sys/bus/pci/drivers/r8125/module
/sys/bus/pci/drivers/ahci
/sys/bus/pci/drivers/ahci/uevent
/sys/bus/pci/drivers/ahci/0000:00:1f.2
/sys/bus/pci/drivers/ahci/bind
/sys/bus/pci/drivers/ahci/new_id
/sys/bus/pci/drivers/ahci/remove_id
/sys/bus/pci/drivers/ahci/unbind
/sys/bus/pci/drivers/ahci/module
/sys/bus/pci/drivers/xen-platform-pci
/sys/bus/pci/drivers/xen-platform-pci/uevent
/sys/bus/pci/drivers/xen-platform-pci/bind
/sys/bus/pci/drivers/xen-platform-pci/new_id
/sys/bus/pci/drivers/xen-platform-pci/remove_id
/sys/bus/pci/drivers/xen-platform-pci/unbind
/sys/bus/pci/drivers/vmw_pvscsi
/sys/bus/pci/drivers/vmw_pvscsi/uevent
/sys/bus/pci/drivers/vmw_pvscsi/bind
/sys/bus/pci/drivers/vmw_pvscsi/new_id
/sys/bus/pci/drivers/vmw_pvscsi/remove_id
/sys/bus/pci/drivers/vmw_pvscsi/unbind
/sys/bus/pci/drivers/vmw_pvscsi/module
/sys/bus/pci/drivers/snd_via82xx
/sys/bus/pci/drivers/snd_via82xx/uevent
/sys/bus/pci/drivers/snd_via82xx/bind
/sys/bus/pci/drivers/snd_via82xx/new_id
/sys/bus/pci/drivers/snd_via82xx/remove_id
/sys/bus/pci/drivers/snd_via82xx/unbind
/sys/bus/pci/drivers/snd_via82xx/module
/sys/bus/pci/drivers/lpc_sch
/sys/bus/pci/drivers/lpc_sch/uevent
/sys/bus/pci/drivers/lpc_sch/bind
/sys/bus/pci/drivers/lpc_sch/new_id
/sys/bus/pci/drivers/lpc_sch/remove_id
/sys/bus/pci/drivers/lpc_sch/unbind
/sys/bus/pci/drivers/nvme
/sys/bus/pci/drivers/nvme/uevent
/sys/bus/pci/drivers/nvme/bind
/sys/bus/pci/drivers/nvme/new_id
/sys/bus/pci/drivers/nvme/remove_id
/sys/bus/pci/drivers/nvme/unbind
/sys/bus/pci/drivers/nvme/module
/sys/bus/pci/drivers/tg3
/sys/bus/pci/drivers/tg3/uevent
/sys/bus/pci/drivers/tg3/bind
/sys/bus/pci/drivers/tg3/new_id
/sys/bus/pci/drivers/tg3/remove_id
/sys/bus/pci/drivers/tg3/unbind
/sys/bus/pci/drivers/tg3/module
/sys/bus/pci/drivers/igb
/sys/bus/pci/drivers/igb/uevent
/sys/bus/pci/drivers/igb/bind
/sys/bus/pci/drivers/igb/new_id
/sys/bus/pci/drivers/igb/remove_id
/sys/bus/pci/drivers/igb/unbind
/sys/bus/pci/drivers/igb/module
/sys/bus/pci/drivers/forcedeth
/sys/bus/pci/drivers/forcedeth/uevent
/sys/bus/pci/drivers/forcedeth/bind
/sys/bus/pci/drivers/forcedeth/new_id
/sys/bus/pci/drivers/forcedeth/remove_id
/sys/bus/pci/drivers/forcedeth/unbind
/sys/bus/pci/drivers/forcedeth/module
/sys/bus/pci/drivers/snd_intel8x0
/sys/bus/pci/drivers/snd_intel8x0/uevent
/sys/bus/pci/drivers/snd_intel8x0/bind
/sys/bus/pci/drivers/snd_intel8x0/new_id
/sys/bus/pci/drivers/snd_intel8x0/remove_id
/sys/bus/pci/drivers/snd_intel8x0/unbind
/sys/bus/pci/drivers/snd_intel8x0/module
/sys/bus/pci/drivers/bdw_uncore
/sys/bus/pci/drivers/bdw_uncore/uevent
/sys/bus/pci/drivers/bdw_uncore/bind
/sys/bus/pci/drivers/bdw_uncore/new_id
/sys/bus/pci/drivers/bdw_uncore/remove_id
/sys/bus/pci/drivers/bdw_uncore/0000:00:00.0
/sys/bus/pci/drivers/bdw_uncore/unbind
/sys/bus/pci/drivers/e1000
/sys/bus/pci/drivers/e1000/uevent
/sys/bus/pci/drivers/e1000/bind
/sys/bus/pci/drivers/e1000/new_id
/sys/bus/pci/drivers/e1000/remove_id
/sys/bus/pci/drivers/e1000/unbind
/sys/bus/pci/drivers/e1000/module
/sys/bus/pci/drivers/ata_generic
/sys/bus/pci/drivers/ata_generic/uevent
/sys/bus/pci/drivers/ata_generic/bind
/sys/bus/pci/drivers/ata_generic/new_id
/sys/bus/pci/drivers/ata_generic/remove_id
/sys/bus/pci/drivers/ata_generic/unbind
/sys/bus/pci/drivers/ixgbevf
/sys/bus/pci/drivers/ixgbevf/uevent
/sys/bus/pci/drivers/ixgbevf/bind
/sys/bus/pci/drivers/ixgbevf/new_id
/sys/bus/pci/drivers/ixgbevf/remove_id
/sys/bus/pci/drivers/ixgbevf/unbind
/sys/bus/pci/drivers/ixgbevf/module
/sys/bus/pci/drivers/k10temp
/sys/bus/pci/drivers/k10temp/uevent
/sys/bus/pci/drivers/k10temp/bind
/sys/bus/pci/drivers/k10temp/new_id
/sys/bus/pci/drivers/k10temp/remove_id
/sys/bus/pci/drivers/k10temp/unbind
/sys/bus/pci/drivers/k10temp/module
/sys/bus/pci/drivers/pcieport
/sys/bus/pci/drivers/pcieport/uevent
/sys/bus/pci/drivers/pcieport/0000:00:1c.0
/sys/bus/pci/drivers/pcieport/bind
/sys/bus/pci/drivers/pcieport/new_id
/sys/bus/pci/drivers/pcieport/remove_id
/sys/bus/pci/drivers/pcieport/0000:00:1c.5
/sys/bus/pci/drivers/pcieport/unbind
/sys/bus/pci/drivers/tulip
/sys/bus/pci/drivers/tulip/uevent
/sys/bus/pci/drivers/tulip/bind
/sys/bus/pci/drivers/tulip/new_id
/sys/bus/pci/drivers/tulip/remove_id
/sys/bus/pci/drivers/tulip/unbind
/sys/bus/pci/drivers/tulip/module
/sys/bus/pci/drivers/r8168
/sys/bus/pci/drivers/r8168/uevent
/sys/bus/pci/drivers/r8168/bind
/sys/bus/pci/drivers/r8168/new_id
/sys/bus/pci/drivers/r8168/remove_id
/sys/bus/pci/drivers/r8168/unbind
/sys/bus/pci/drivers/r8168/module
/sys/bus/pci/drivers/r8101
/sys/bus/pci/drivers/r8101/uevent
/sys/bus/pci/drivers/r8101/bind
/sys/bus/pci/drivers/r8101/new_id
/sys/bus/pci/drivers/r8101/remove_id
/sys/bus/pci/drivers/r8101/unbind
/sys/bus/pci/drivers/r8101/module
/sys/bus/pci/drivers/ohci-pci
/sys/bus/pci/drivers/ohci-pci/uevent
/sys/bus/pci/drivers/ohci-pci/bind
/sys/bus/pci/drivers/ohci-pci/new_id
/sys/bus/pci/drivers/ohci-pci/remove_id
/sys/bus/pci/drivers/ohci-pci/unbind
/sys/bus/pci/drivers/lpc_ich
/sys/bus/pci/drivers/lpc_ich/uevent
/sys/bus/pci/drivers/lpc_ich/bind
/sys/bus/pci/drivers/lpc_ich/0000:00:1f.0
/sys/bus/pci/drivers/lpc_ich/new_id
/sys/bus/pci/drivers/lpc_ich/remove_id
/sys/bus/pci/drivers/lpc_ich/unbind
/sys/bus/pci/drivers/k8temp
/sys/bus/pci/drivers/k8temp/uevent
/sys/bus/pci/drivers/k8temp/bind
/sys/bus/pci/drivers/k8temp/new_id
/sys/bus/pci/drivers/k8temp/remove_id
/sys/bus/pci/drivers/k8temp/unbind
/sys/bus/pci/drivers/virtio-pci
/sys/bus/pci/drivers/virtio-pci/uevent
/sys/bus/pci/drivers/virtio-pci/bind
/sys/bus/pci/drivers/virtio-pci/new_id
/sys/bus/pci/drivers/virtio-pci/remove_id
/sys/bus/pci/drivers/virtio-pci/unbind
/sys/bus/pci/drivers/virtio-pci/module
/sys/bus/pci/drivers/i5500_temp
/sys/bus/pci/drivers/i5500_temp/uevent
/sys/bus/pci/drivers/i5500_temp/bind
/sys/bus/pci/drivers/i5500_temp/new_id
/sys/bus/pci/drivers/i5500_temp/remove_id
/sys/bus/pci/drivers/i5500_temp/unbind
/sys/bus/pci/drivers/e1000e
/sys/bus/pci/drivers/e1000e/uevent
/sys/bus/pci/drivers/e1000e/bind
/sys/bus/pci/drivers/e1000e/new_id
/sys/bus/pci/drivers/e1000e/remove_id
/sys/bus/pci/drivers/e1000e/0000:00:19.0
/sys/bus/pci/drivers/e1000e/unbind
/sys/bus/pci/drivers/e1000e/module
/sys/bus/pci/drivers/vmxnet3
/sys/bus/pci/drivers/vmxnet3/uevent
/sys/bus/pci/drivers/vmxnet3/bind
/sys/bus/pci/drivers/vmxnet3/new_id
/sys/bus/pci/drivers/vmxnet3/remove_id
/sys/bus/pci/drivers/vmxnet3/unbind
/sys/bus/pci/drivers/8139cp
/sys/bus/pci/drivers/8139cp/uevent
/sys/bus/pci/drivers/8139cp/bind
/sys/bus/pci/drivers/8139cp/new_id
/sys/bus/pci/drivers/8139cp/remove_id
/sys/bus/pci/drivers/8139cp/unbind
/sys/bus/pci/drivers/8139cp/module
/sys/bus/pci/drivers/sdhci-pci
/sys/bus/pci/drivers/sdhci-pci/uevent
/sys/bus/pci/drivers/sdhci-pci/bind
/sys/bus/pci/drivers/sdhci-pci/new_id
/sys/bus/pci/drivers/sdhci-pci/remove_id
/sys/bus/pci/drivers/sdhci-pci/unbind
/sys/bus/pci/drivers/8139too
/sys/bus/pci/drivers/8139too/uevent
/sys/bus/pci/drivers/8139too/bind
/sys/bus/pci/drivers/8139too/new_id
/sys/bus/pci/drivers/8139too/remove_id
/sys/bus/pci/drivers/8139too/unbind
/sys/bus/pci/drivers/8139too/module
/sys/bus/pci/drivers/fam15h_power
/sys/bus/pci/drivers/fam15h_power/uevent
/sys/bus/pci/drivers/fam15h_power/bind
/sys/bus/pci/drivers/fam15h_power/new_id
/sys/bus/pci/drivers/fam15h_power/remove_id
/sys/bus/pci/drivers/fam15h_power/unbind
/sys/bus/pci/drivers/pata_mpiix
/sys/bus/pci/drivers/pata_mpiix/uevent
/sys/bus/pci/drivers/pata_mpiix/bind
/sys/bus/pci/drivers/pata_mpiix/new_id
/sys/bus/pci/drivers/pata_mpiix/remove_id
/sys/bus/pci/drivers/pata_mpiix/unbind
/sys/bus/pci/drivers/amd-xgbe
/sys/bus/pci/drivers/amd-xgbe/uevent
/sys/bus/pci/drivers/amd-xgbe/bind
/sys/bus/pci/drivers/amd-xgbe/new_id
/sys/bus/pci/drivers/amd-xgbe/remove_id
/sys/bus/pci/drivers/amd-xgbe/unbind
/sys/bus/pci/drivers/amd-xgbe/module
/sys/bus/pci/drivers/serial
/sys/bus/pci/drivers/serial/uevent
/sys/bus/pci/drivers/serial/bind
/sys/bus/pci/drivers/serial/new_id
/sys/bus/pci/drivers/serial/remove_id
/sys/bus/pci/drivers/serial/unbind
/sys/bus/pci/drivers/igc
/sys/bus/pci/drivers/igc/uevent
/sys/bus/pci/drivers/igc/bind
/sys/bus/pci/drivers/igc/new_id
/sys/bus/pci/drivers/igc/remove_id
/sys/bus/pci/drivers/igc/unbind
/sys/bus/pci/drivers/igc/module
/sys/bus/pci/drivers/i915
/sys/bus/pci/drivers/i915/uevent
/sys/bus/pci/drivers/i915/bind
/sys/bus/pci/drivers/i915/new_id
/sys/bus/pci/drivers/i915/remove_id
/sys/bus/pci/drivers/i915/unbind
/sys/bus/pci/drivers/i915/0000:00:02.0
/sys/bus/pci/drivers/i915/module
/sys/bus/pci/drivers/mhi-pci-generic
/sys/bus/pci/drivers/mhi-pci-generic/uevent
/sys/bus/pci/drivers/mhi-pci-generic/bind
/sys/bus/pci/drivers/mhi-pci-generic/new_id
/sys/bus/pci/drivers/mhi-pci-generic/remove_id
/sys/bus/pci/drivers/mhi-pci-generic/0000:02:00.0
/sys/bus/pci/drivers/mhi-pci-generic/unbind
/sys/bus/pci/drivers/mhi-pci-generic/module
/sys/bus/pci/drivers/igbvf
/sys/bus/pci/drivers/igbvf/uevent
/sys/bus/pci/drivers/igbvf/bind
/sys/bus/pci/drivers/igbvf/new_id
/sys/bus/pci/drivers/igbvf/remove_id
/sys/bus/pci/drivers/igbvf/unbind
/sys/bus/pci/drivers/igbvf/module
/sys/bus/pci/drivers/pcnet32
/sys/bus/pci/drivers/pcnet32/uevent
/sys/bus/pci/drivers/pcnet32/bind
/sys/bus/pci/drivers/pcnet32/new_id
/sys/bus/pci/drivers/pcnet32/remove_id
/sys/bus/pci/drivers/pcnet32/unbind
/sys/bus/pci/drivers/pcnet32/module
/sys/bus/pci/drivers/uhci_hcd
/sys/bus/pci/drivers/uhci_hcd/uevent
/sys/bus/pci/drivers/uhci_hcd/bind
/sys/bus/pci/drivers/uhci_hcd/new_id
/sys/bus/pci/drivers/uhci_hcd/remove_id
/sys/bus/pci/drivers/uhci_hcd/unbind
/sys/bus/pci/drivers/uhci_hcd/module
/sys/bus/pci/drivers/ena
/sys/bus/pci/drivers/ena/uevent
/sys/bus/pci/drivers/ena/bind
/sys/bus/pci/drivers/ena/new_id
/sys/bus/pci/drivers/ena/remove_id
/sys/bus/pci/drivers/ena/unbind
/sys/bus/pci/drivers/ena/module
/sys/bus/pci/drivers/bnx2
/sys/bus/pci/drivers/bnx2/uevent
/sys/bus/pci/drivers/bnx2/bind
/sys/bus/pci/drivers/bnx2/new_id
/sys/bus/pci/drivers/bnx2/remove_id
/sys/bus/pci/drivers/bnx2/unbind
/sys/bus/pci/drivers/bnx2/module
/sys/bus/pci/drivers/pata_atiixp
/sys/bus/pci/drivers/pata_atiixp/uevent
/sys/bus/pci/drivers/pata_atiixp/bind
/sys/bus/pci/drivers/pata_atiixp/new_id
/sys/bus/pci/drivers/pata_atiixp/remove_id
/sys/bus/pci/drivers/pata_atiixp/unbind
/sys/bus/pci/drivers/agpgart-intel
/sys/bus/pci/drivers/agpgart-intel/uevent
/sys/bus/pci/drivers/agpgart-intel/bind
/sys/bus/pci/drivers/agpgart-intel/new_id
/sys/bus/pci/drivers/agpgart-intel/remove_id
/sys/bus/pci/drivers/agpgart-intel/unbind
/sys/bus/pci/drivers/ixgbe
/sys/bus/pci/drivers/ixgbe/uevent
/sys/bus/pci/drivers/ixgbe/bind
/sys/bus/pci/drivers/ixgbe/new_id
/sys/bus/pci/drivers/ixgbe/remove_id
/sys/bus/pci/drivers/ixgbe/unbind
/sys/bus/pci/drivers/ixgbe/module
 find /sys -name wwan0at0
/sys/class/wwan/wwan0at0
/sys/devices/pci0000:00/0000:00:1c.5/0000:02:00.0/mhi0/wwan/wwan0/wwan0at0
lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Broadwell-U Host Bridge -OPI [8086:1604] (rev 09)
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 5500 [8086:1616] (rev 09)
00:03.0 Audio device [0403]: Intel Corporation Broadwell-U Audio Controller [8086:160c] (rev 09)
00:04.0 Signal processing controller [1180]: Intel Corporation Broadwell-U Processor Thermal Subsystem [8086:1603] (rev 09)
00:14.0 USB controller [0c03]: Intel Corporation Wildcat Point-LP USB xHCI Controller [8086:9cb1] (rev 03)
00:16.0 Communication controller [0780]: Intel Corporation Wildcat Point-LP MEI Controller #1 [8086:9cba] (rev 03)
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection (3) I218-LM [8086:15a2] (rev 03)
00:1b.0 Audio device [0403]: Intel Corporation Wildcat Point-LP High Definition Audio Controller [8086:9ca0] (rev 03)
00:1c.0 PCI bridge [0604]: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 [8086:9c90] (rev e3)
00:1c.5 PCI bridge [0604]: Intel Corporation Wildcat Point-LP PCI Express Root Port #6 [8086:9c9a] (rev e3)
00:1d.0 USB controller [0c03]: Intel Corporation Wildcat Point-LP USB EHCI Controller [8086:9ca6] (rev 03)
00:1f.0 ISA bridge [0601]: Intel Corporation Wildcat Point-LP LPC Controller [8086:9cc3] (rev 03)
00:1f.2 SATA controller [0106]: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] [8086:9c83] (rev 03)
00:1f.3 SMBus [0c05]: Intel Corporation Wildcat Point-LP SMBus Controller [8086:9ca2] (rev 03)
01:00.0 SD Host controller [0805]: O2 Micro, Inc. SD/MMC Card Reader Controller [1217:8520] (rev 01)
02:00.0 Wireless controller [0d40]: Foxconn International, Inc. Device [105b:e0b0]
jfrogg commented 10 months ago

@riccardoferti please run when you have a chance: readlink -f /sys/class/wwan/wwan0at0/device

BTW, could you please share the details about the module you use - t99w175.?? version and whether it is Dell/HP/Lenovo branded.

obsy commented 10 months ago

cat /sys/devices/pci0000:00/0000:00:1c.5/0000:02:00.0/vendor cat /sys/devices/pci0000:00/0000:00:1c.5/0000:02:00.0/device

?

riccardoferti commented 10 months ago

readlink -f /sys/class/wwan/wwan0at0/device

readlink -f /sys/class/wwan/wwan0at0/device
/sys/devices/pci0000:00/0000:00:1c.5/0000:02:00.0/mhi0/wwan/wwan0

The device Is a Dell Prototype version, bought on AliExpress. You can change the device vendor switching at^customer=x 1 Dell 0 Foxconn 4 Lenovo 6 HP (maybe)

Mine Is 0 actually, with latest Lenovo firmware installed. It's the latest in Building time.

Manufacturer: DELL
Model: T99W175
Revision: T99W175.F0.1.0.0.9.VF.008  1  [Jan 20 2023 12:00:00]
riccardoferti commented 10 months ago

cat /sys/devices/pci0000:00/0000:00:1c.5/0000:02:00.0/vendor

0x105b

cat /sys/devices/pci0000:00/0000:00:1c.5/0000:02:00.0/device

0xe0b0

jfrogg commented 10 months ago

@riccardoferti I was mainly interested what is printed/engraved on the modem itself. Thank you.

riccardoferti commented 10 months ago

@riccardoferti I was mainly interested what is printed/engraved on the modem itself. Thank you.

Who wants can DM me on Telegram @nerdherd96

obsy commented 10 months ago

@4IceG : zaimplementuj to u siebie: https://github.com/obsy/packages/commit/e1daf558d51b275efe732ff5cdf6de4c062a7e6d

Jeżeli będzie wszystko ok to trzeba rozważyć czy nie przenieść danych do oddzielnych podkatalogów pci/ i usb/

4IceG commented 10 months ago

@4IceG : zaimplementuj to u siebie: obsy/packages@e1daf55

Jeżeli będzie wszystko ok to trzeba rozważyć czy nie przenieść danych do oddzielnych podkatalogów pci/ i usb/

Ok, thx @obsy Cezary. Jeżeli kod mnie nie zaskoczy to postaram się możliwie szybko go zaimplementować u siebie.

Co do modyfikacji podkatalogów myślę, że jest to wskazana, przyszłościowa koncepcja.

obsy commented 10 months ago

Teraz do testów dodałem po prostu prefix "pci". Ale docelowo trzeba będzie to przerzuć, tym bardziej że modemy pci chyba raczej będą stanowić przyszłość.

4IceG commented 10 months ago

@riccardoferti install package and check if it shows data ok.

I don't know yet what to do with the SINR parameter, we read SNR instead. (for test SINR=SNR).

luci-app-3ginfo-lite_1.0.62-20240108_all.zip

riccardoferti commented 10 months ago

@riccardoferti install package and check if it shows data ok.

I don't know yet what to do with the SINR parameter, we read SNR instead. (for test SINR=SNR).

luci-app-3ginfo-lite_1.0.62-20240108_all.zip

working also on pci mode?

4IceG commented 10 months ago

@riccardoferti install package and check if it shows data ok. working also on pci mode?

Yes, it should work.

riccardoferti commented 10 months ago

@riccardoferti install package and check if it shows data ok. working also on pci mode?

Yes, it should work.

a little bit buggy but works

image image
obsy commented 10 months ago

Where?

4IceG commented 10 months ago

@riccardoferti Copy extracted file to > /usr/share/3ginfo-lite/modem

I just fix scripts to make it faster. pci105be0b0.zip

It should look better. I don't know yet what protocol the modem works on.

riccardoferti commented 10 months ago

@riccardoferti Copy extracted file to > /usr/share/3ginfo-lite/modem

I just fix scripts to make it faster. pci105be0b0.zip

It should look better. I don't know yet what protocol the modem works on.

Should be MBIM Tò have more info you can check ModemManager

4IceG commented 10 months ago

@riccardoferti Copy extracted file to > /usr/share/3ginfo-lite/modem

Should be MBIM Tò have more info you can check ModemManager

pci105be0b0_last_fix.zip Ok, protocol should now be visible.

// Edit: I also back to SINR=SNR.

riccardoferti commented 10 months ago

Where?

It is slow to read and often it doesn't find modem

image
riccardoferti commented 10 months ago
image

All seems good maybe need only to check this:

5G NSA \| B3 (1800 MHz) + B28 (700 MHz) / B7 (2600 MHz) / B1 (2100 MHz) / n78 (3500 MHz) --

I advise to set only + or / symbol

4IceG commented 10 months ago

Where?

It is slow to read and often it doesn't find modem

Maybe other package is using modem at the same time?

4IceG commented 10 months ago
image

All seems good maybe need only to check this:

5G NSA \| B3 (1800 MHz) + B28 (700 MHz) / B7 (2600 MHz) / B1 (2100 MHz) / n78 (3500 MHz) --

I advise to set only + or / symbol

I'll check it tomorrow.

riccardoferti commented 10 months ago

Where?

It is slow to read and often it doesn't find modem

Maybe other package is using modem at the same time?

Should be Modem Manager

4IceG commented 10 months ago

Maybe other package is using modem at the same time?

Should be Modem Manager

So we have problem because MM and 3ginfo-lite cannot work together.

riccardoferti commented 10 months ago

Maybe other package is using modem at the same time?

Should be Modem Manager

So we have problem because MM and 3ginfo-lite cannot work together.

Oh ok, but T99w175 can't work without MM

frauhottelmann commented 8 months ago

Maybe other package is using modem at the same time?

Should be Modem Manager

So we have problem because MM and 3ginfo-lite cannot work together.

Oh ok, but T99w175 can't work without MM

In what device are you running this card with OpenWrt?

sp2003 commented 6 months ago

Can the package also be installed for USB2 version QMI protocol?

# cat /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 2
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 6.01
S:  Manufacturer=Linux 6.1.82 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=1e1c0000.xhci
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1e2d ProdID=00b7 Rev= 4.14
S:  Manufacturer=Cinterion
S:  Product=Cinterion PID 0x00B7 USB Mobile Broadband
S:  SerialNumber=7a7435d9
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev= 6.01
S:  Manufacturer=Linux 6.1.82 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=1e1c0000.xhci
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms
obsy commented 6 months ago

It does not matter. Package requires a serial interface to talk to the modem.