Plugin SMS - Clé USB 3G Huawai E3531i-2

Bonjour,

je viens de recevoir la clé Huawai E3531i-2. j’ai vu sur un poste qu’elle est compatible avec le plugin SMS, mais elle ne fonctionne pas pour l’instant en plug&play, elle n’est pas reconnu dans le plugin.

Est ce que quelqu’un a cette clé et comment procéder pour l’activer ?

Voici le résultat du lsusb :

Bus 001 Device 009: ID 12d1:14dc Huawei Technologies Co., Ltd. E33372 LTE/UMTS/GSM HiLink Modem/Networkcard

je suis sur Raspberry 4 + Buster + Jeedom 3.3.39

Bonjour @oussama1984,

Une méthode ici : [Présentation] akenad - #21 par akenad

akenad :slight_smile:

Bonjour @akenad et merci de te préoccuper de mon problème.

j’ai créé le fichier /etc/usb_modeswitch.d/12d1:157d avec ce contenu :

# Huawei E3531
DisableSwitching=1
TargetVendor=0x12d1
TargetProduct=0x1001
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NoDriverLoading=1

Voici le résultat du lsusb (différent d’avant)

Bus 001 Device 020: ID 12d1:157d Huawei Technologies Co., Ltd.

voici le résultat de dmesg

[ 1188.999902] print_req_error: critical medium error, dev sr0, sector 260608
[ 1189.006399] sr 0:0:0:0: [sr0] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[ 1189.006416] sr 0:0:0:0: [sr0] tag#0 Sense Key : 0x3 [current]
[ 1189.006430] sr 0:0:0:0: [sr0] tag#0 ASC=0x11 ASCQ=0x0
[ 1189.006444] sr 0:0:0:0: [sr0] tag#0 CDB: opcode=0x28 28 00 00 00 fe 80 00 00 02 00
[ 1189.006455] print_req_error: critical medium error, dev sr0, sector 260608
[ 1189.006473] Buffer I/O error on dev sr0, logical block 32576, async page read
[ 1189.012763] sr 0:0:0:0: [sr0] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[ 1189.012779] sr 0:0:0:0: [sr0] tag#0 Sense Key : 0x3 [current]
[ 1189.012792] sr 0:0:0:0: [sr0] tag#0 ASC=0x11 ASCQ=0x0
[ 1189.012806] sr 0:0:0:0: [sr0] tag#0 CDB: opcode=0x28 28 00 00 00 ff fa 00 00 02 00
[ 1189.012817] print_req_error: critical medium error, dev sr0, sector 262120
[ 1189.012891] attempt to access beyond end of device
[ 1189.012906] sr0: rw=0, want=262128, limit=262120
[ 1189.012921] Buffer I/O error on dev sr0, logical block 32765, async page read
pi@jeedom:/etc/usb_modeswitch.d $ lsusb

Donc la clé n’est toujours pas reconnu en ttyUSB.

help

Ce n’est pas ce qui dit de faire le lien que j’ai indiqué.

akenad :slight_smile:

@akenad

2ème test non fructueux.

pi@jeedom:/etc/usb_modeswitch.d $ cat 12d1\:1f01
# Huawei E3531i-2 switch mode vers 12d1:1001 (mode GSM modem, 3 ports)
TargetVendor=0x12d1
Targetproduct=0x1f01
MessageContent="55534243123456780000000000000011062000000100000000000000000000"

lsusb

Bus 001 Device 022: ID 12d1:157d Huawei Technologies Co., Ltd.

et même erreur avec « dmesg »

supprimer /etc/usb_modeswitch.d/12d1:157d

créer /etc/usb_modeswitch.d/12d1:1f01

débrancher et rebrancher la clé

akenad :slight_smile:

c’est ce que j’ai fait :unamused: mais rien

pi@jeedom:/etc/usb_modeswitch.d $ ls
12d1:1f01
pi@jeedom:/etc/usb_modeswitch.d $ cat 12d1\:1f01
# Huawei E3531i-2 switch mode vers 12d1:1001 (mode GSM modem, 3 ports)
TargetVendor=0x12d1
Targetproduct=0x1f01
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
pi@jeedom:/etc/usb_modeswitch.d $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
Bus 001 Device 022: ID 12d1:157d Huawei Technologies Co., Ltd.
Bus 001 Device 004: ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@jeedom:/etc/usb_modeswitch.d $

que donne
cat /etc/usb_modeswitch.d/12d1:1f01

akenad :slight_smile:

Je l’ai mis plus haut.

qu’est ce que c’est que ce \ en plus ?

akenad :slight_smile:

c’est rien, c’est rajouté par putty en automatique.

pi@jeedom:~ $ cat /etc/usb_modeswitch.d/12d1:1f01
# Huawei E3531i-2 switch mode vers 12d1:1001 (mode GSM modem, 3 ports)
TargetVendor=0x12d1
Targetproduct=0x1f01
MessageContent="55534243123456780000000000000011062000000100000000000000000000"

que donne
dmesg | grep USB

akenad :slight_smile:

Je viens de redemarrer le raspberry au cas où.
voici le résultat du dmesg | grep USB

pi@jeedom:~ $ dmesg | grep USB
[    0.390104] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[    0.393508] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    0.393541] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.394131] hub 1-0:1.0: USB hub found
[    0.394767] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    0.394805] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    0.395181] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.19
[    0.395215] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.395778] hub 2-0:1.0: USB hub found
[    0.406600] usbhid: USB HID core driver
[    0.758207] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    0.940836] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
[    0.940875] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    0.940902] usb 1-1: Product: USB2.0 Hub
[    0.942590] hub 1-1:1.0: USB hub found
[    1.278222] usb 1-1.4: new high-speed USB device number 3 using xhci_hcd
[    1.410705] usb 1-1.4: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice=92.24
[    1.410749] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.410780] usb 1-1.4: Product: USB2.0 Hub
[    1.412995] hub 1-1.4:1.0: USB hub found
[    1.728226] usb 1-1.4.1: new full-speed USB device number 4 using xhci_hcd
[    1.895210] usb 1-1.4.1: New USB device found, idVendor=0658, idProduct=0200, bcdDevice= 0.00
[    1.895252] usb 1-1.4.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.008236] usb 1-1.4.4: new high-speed USB device number 5 using xhci_hcd
[    2.152228] usb 1-1.4.4: New USB device found, idVendor=0bda, idProduct=8153, bcdDevice=30.00
[    2.152272] usb 1-1.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[    2.152304] usb 1-1.4.4: Product: USB 10/100/1000 LAN
[    2.288719] usb 1-1.4.4: reset high-speed USB device number 5 using xhci_hcd
[    4.494470] cdc_acm 1-1.4.1:1.0: ttyACM0: USB ACM device
[    4.499123] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    5.768247] usb 1-1.4.2: new high-speed USB device number 6 using xhci_hcd
[    5.900638] usb 1-1.4.2: New USB device found, idVendor=12d1, idProduct=157d, bcdDevice= 1.02
[    5.900657] usb 1-1.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    5.913320] usb-storage 1-1.4.2:1.0: USB Mass Storage device detected
[    7.183810] usb-storage 1-1.4.2:2.2: USB Mass Storage device detected
[    7.262772] usb 1-1.4.2: USB disconnect, device number 6
[   12.678197] usb 1-1.4.2: new high-speed USB device number 7 using xhci_hcd
[   12.810118] usb 1-1.4.2: New USB device found, idVendor=12d1, idProduct=157d, bcdDevice= 1.02
[   12.810128] usb 1-1.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   12.824848] usb-storage 1-1.4.2:1.0: USB Mass Storage device detected

tu as modifié le firmware de la clé ?

akenad :slight_smile:

Non. La clé est toute neuve reçu aujourd’hui

/etc/usb_modeswitch.d/12d1:157d

# Huawei E3531
TargetVendor=0x12d1
TargetProduct=0x157d
MessageContent="55534243123456780000000000000011062000000100000000000000000000"

akenad :slight_smile:

Le bon mot-clé, c’est GSM
La commande suivante doit faire apparaître le mode modem GSM.
dmesg | grep GSM
Comme ceci, on doit y voir les 3 ports USB et c’est gagné

[   12.593854] usbserial: USB Serial support registered for GSM modem (1-port)
[   12.596550] option 1-1.3.3:1.0: GSM modem (1-port) converter detected
[   12.597037] usb 1-1.3.3: GSM modem (1-port) converter now attached to ttyUSB2
[   12.597720] option 1-1.3.3:1.1: GSM modem (1-port) converter detected
[   12.598046] usb 1-1.3.3: GSM modem (1-port) converter now attached to ttyUSB3
[   12.598766] option 1-1.3.3:1.2: GSM modem (1-port) converter detected
[   12.599079] usb 1-1.3.3: GSM modem (1-port) converter now attached to ttyUSB4

Le lsusb montre un autre ID différent de ce qu’on met dans le fichier texte, il n’y a rien à comprendre, mais ça marche !
Bus 001 Device 011: ID 12d1:1001 Huawei Technologies Co., Ltd. E161/E169/E620/E800 HSDPA Modem

Pour exemple, le lsusb me donnait avant toute modif lorsque j’avais reçu ma clé
Bus 001 Device 017: ID 12d1:14dc Huawei Technologies Co., Ltd.

Ok j’essaierai demain si ça marche et te tiens au courant.
Merci pour tes efforts.
Bonne soirée

Oui si ça marche, mais avant
dmesg | grep USB
permet de faire apparaitre idVendor idProduct avant le switch

[   12.810118] usb 1-1.4.2: New USB device found, idVendor=12d1, idProduct=157d, bcdDevice= 1.02
[   12.810128] usb 1-1.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   12.824848] usb-storage 1-1.4.2:1.0: USB Mass Storage device detected

akenad :slight_smile:

Je n’avais jamais regardé en détails car trop de lignes (j’ai 5 clés usb plus le hub) et je ne comprenais rien à ce que je faisais à l’époque !

[   10.771979] usb 1-1.3.3: new high-speed USB device number 10 using dwc_otg
[   10.903490] usb 1-1.3.3: New USB device found, idVendor=12d1, idProduct=1f01, bcdDevice= 1.02
[   10.903507] usb 1-1.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   10.903517] usb 1-1.3.3: Product: HUAWEI Mobile
[   10.903526] usb 1-1.3.3: Manufacturer: HUAWEI
[   10.903535] usb 1-1.3.3: SerialNumber: FFFFFFFFFFFFFFFF
[   10.918135] usb-storage 1-1.3.3:1.0: USB Mass Storage device detected
[   10.918681] scsi host0: usb-storage 1-1.3.3:1.0
[   11.097582] usbcore: registered new interface driver uas
[   12.005431] usb 1-1.3.3: USB disconnect, device number 10
[   12.301934] usb 1-1.3.3: new high-speed USB device number 11 using dwc_otg
[   12.433394] usb 1-1.3.3: New USB device found, idVendor=12d1, idProduct=1001, bcdDevice= 1.02
[   12.433409] usb 1-1.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   12.433419] usb 1-1.3.3: Product: HUAWEI Mobile
[   12.433428] usb 1-1.3.3: Manufacturer: HUAWEI
[   12.593577] usbcore: registered new interface driver option
[   12.593854] usbserial: USB Serial support registered for GSM modem (1-port)
[   12.597037] usb 1-1.3.3: GSM modem (1-port) converter now attached to ttyUSB2
[   12.598046] usb 1-1.3.3: GSM modem (1-port) converter now attached to ttyUSB3
[   12.599079] usb 1-1.3.3: GSM modem (1-port) converter now attached to ttyUSB4

Ah je viens de comprendre le lien entre 12d1:1f01 et 12d1:1001
Merci beaucoup