RPi 3B+ Strech - confilt USB cle 3G Huawei + module USB Téléinfo

Bonjour,

J’ai mon Jeedom sur RPi 3B+ sous Strech avec une clé 3G Huawei USB utilisé avec le plugin SMS et depuis peu un module Téléinfo USB du type utilisé avec le plugin Téléinfo.

Config du plugin SMS :
Port SMS = HUAWEI HUAWEI_Mobile (/dev/ttyUSB1)
vitesse = 115200
Port Socket interne = 55002

Config du plugin Téléinfo :
Port du modem 1 = Cartelectronic Interface_USB_1_TIC_ (/dev/ttyUSB0)
Compteur 1 vitesse = 1200
Adresse IP socket interne = 127.0.0.1
Port socket interne = 55062

J’ai l’impression qu’il-y-a un conflit entre les 2 devices dont les daemon redemmarent très régulièrement et systématiquement au même moment.

Ci-dessous les logs des plugin et le résultat de la commande sudo dmesg pour les experts qui pourraient m’aider

extrait log plugin SMS :

[2020-03-31 21:21:11][ERROR] : Exception on GSM : None
[2020-03-31 21:21:11][ERROR] : Exception on GSM : Attempting to use a port that is not open
[2020-03-31 21:21:11][ERROR] : Exit 1 because this exeption is fatal

et à la même heure
extrait log plugin Téléinfo :

[2020-03-31 21:21:07][INFO] : GLOBAL------Shutdown
[2020-03-31 21:21:07][INFO] : Removing PID file /tmp/jeedom/teleinfo/teleinfo_conso.pid
[2020-03-31 21:21:07][DEBUG] : LoopNetServer Thread stopped
[2020-03-31 21:21:07][DEBUG] : Exit 0
Error:
[Errno 5] Input/output error
[2020-03-31 21:25:09][INFO] : GLOBAL------Start teleinfod
[2020-03-31 21:25:09][INFO] : GLOBAL------Cycle Sommeil : 0.5
[2020-03-31 21:25:09][INFO] : GLOBAL------Socket port : 55062
[2020-03-31 21:25:09][INFO] : GLOBAL------Socket host : 127.0.0.1
[2020-03-31 21:25:09][INFO] : GLOBAL------Log level : debug
[2020-03-31 21:25:09][INFO] : GLOBAL------Callback : http://127.0.0.1:80/plugins/teleinfo/core/php/jeeTeleinfo.php
[2020-03-31 21:25:09][INFO] : GLOBAL------Vitesse : 1200
[2020-03-31 21:25:09][INFO] : GLOBAL------Apikey : jWM7lHqPpGeJgEDj11wa06aMSdIsaVub
[2020-03-31 21:25:09][INFO] : GLOBAL------Cycle : 0.3
[2020-03-31 21:25:09][INFO] : GLOBAL------Port : /dev/ttyUSB0
[2020-03-31 21:25:09][INFO] : GLOBAL------Type : conso
[2020-03-31 21:25:09][INFO] : GLOBAL------Mode : historique
[2020-03-31 21:25:09][DEBUG] : Writing PID 7633 to /tmp/jeedom/teleinfo/teleinfo_conso.pid
[2020-03-31 21:25:09][DEBUG] : Init request module v2.12.4
[2020-03-31 21:25:09][DEBUG] : Starting new HTTP connection (1): 127.0.0.1
[2020-03-31 21:25:09][DEBUG] : http://127.0.0.1:80 "GET /plugins/teleinfo/core/php/jeeTeleinfo.php?apikey=jWM7lHqPpGeJgEDj11wa06aMSdIsaVub HTTP/1.1" 200 0
[2020-03-31 21:25:09][DEBUG] : Socket interface started
[2020-03-31 21:25:09][DEBUG] : LoopNetServer Thread started
[2020-03-31 21:25:09][INFO] : GLOBAL------Start listening...
[2020-03-31 21:25:09][DEBUG] : Listening on: [127.0.0.1:55062]
[2020-03-31 21:25:09][DEBUG] : TELEINFO------INIT CONNECTION
[2020-03-31 21:25:09][INFO] : GLOBAL------Preparing Teleinfo...
[2020-03-31 21:25:09][DEBUG] : GLOBAL------Read Socket Thread Launched
[2020-03-31 21:25:09][INFO] : TELEINFO------RUN
[2020-03-31 21:25:09][INFO] : TELEINFO------OPEN CONNECTION
[2020-03-31 21:25:09][INFO] : TELEINFO------CONNECTION OPENED
[2020-03-31 21:25:10][DEBUG] : TELEINFO------name : ADCO value : 030722827618 checksum : E
[2020-03-31 21:25:10][DEBUG] : TELEINFO------name : OPTARIF value : HC.. checksum : <
[2020-03-31 21:25:10][DEBUG] : TELEINFO------name : ISOUSC value : 60 checksum : <
[2020-03-31 21:25:11][DEBUG] : TELEINFO------name : HCHC value : 070047804 checksum : $
[2020-03-31 21:25:11][DEBUG] : TELEINFO------name : HCHP value : 054676336 checksum : ;
[2020-03-31 21:25:11][DEBUG] : TELEINFO------name : PTEC value : HP..
[2020-03-31 21:25:11][DEBUG] : TELEINFO------name : IINST value : 003 checksum : Z
[2020-03-31 21:25:11][DEBUG] : TELEINFO------name : IMAX value : 051 checksum : E
[2020-03-31 21:25:12][DEBUG] : TELEINFO------name : PAPP value : 00700 checksum : (
[2020-03-31 21:25:12][DEBUG] : TELEINFO------name : HHPHC value : C checksum : .
[2020-03-31 21:25:12][DEBUG] : TELEINFO------name : MOTDETAT value : 000000 checksum : B
[2020-03-31 21:25:12][DEBUG] : TELEINFO------START SLEEPING 0.5 seconds
[2020-03-31 21:25:12][DEBUG] : Send to jeedom :  {'device': {'030722827618': {'IINST': '003', 'OPTARIF': 'HC', 'ADCO': '030722827618', 'HCHC': '070047804', 'PAPP': '00700', 'IMAX': '051', 'device': '030722827618', 'PTEC': 'HP', 'ISOUSC': '60', 'HHPHC': 'C', 'HCHP': '054676336'}}}
[2020-03-31 21:25:12][DEBUG] : Starting new HTTP connection (1): 127.0.0.1
[2020-03-31 21:25:12][DEBUG] : http://127.0.0.1:80 "POST /plugins/teleinfo/core/php/jeeTeleinfo.php?apikey=jWM7lHqPpGeJgEDj11wa06aMSdIsaVub HTTP/1.1" 200 0
[2020-03-31 21:25:12][DEBUG] : TELEINFO------WAITING : 43 octets dans la file apres sleep 
[2020-03-31 21:25:14][DEBUG] : TELEINFO------name : ADCO value : 030722827618 checksum : E
[2020-03-31 21:25:14][DEBUG] : TELEINFO------name : OPTARIF value : HC.. checksum : <
[2020-03-31 21:25:15][DEBUG] : TELEINFO------name : ISOUSC value : 60 checksum : <
[2020-03-31 21:25:15][DEBUG] : TELEINFO------name : HCHC value : 070047804 checksum : $
[2020-03-31 21:25:15][DEBUG] : TELEINFO------name : HCHP value : 054676337 checksum : <
[2020-03-31 21:25:15][DEBUG] : TELEINFO------name : PTEC value : HP..
[2020-03-31 21:25:15][DEBUG] : TELEINFO------name : IINST value : 003 checksum : Z
[2020-03-31 21:25:15][DEBUG] : TELEINFO------name : IMAX value : 051 checksum : E
[2020-03-31 21:25:16][DEBUG] : TELEINFO------name : PAPP value : 00700 checksum : (
[2020-03-31 21:25:16][DEBUG] : TELEINFO------name : HHPHC value : C checksum : .
[2020-03-31 21:25:16][DEBUG] : TELEINFO------name : MOTDETAT value : 000000 checksum : B

extrait du résultat de la commande sudo dmesg :

[

113775.056812] usb usb1-port1: disabled by hub (EMI?), re-enabling...
[113775.056834] usb 1-1: USB disconnect, device number 9
[113775.056841] usb 1-1.1: USB disconnect, device number 10
[113775.056847] usb 1-1.1.1: USB disconnect, device number 12
[113775.057451] WARN::dwc_otg_hcd_urb_dequeue:639: Timed out waiting for FSM NP transfer to complete on 1
[113775.057476] lan78xx 1-1.1.1:1.0 eth0: Failed to read register index 0x00000120. ret = -19
[113775.057486] lan78xx 1-1.1.1:1.0 eth0: Failed to read register index 0x00000120. ret = -19
[113775.057503] lan78xx 1-1.1.1:1.0 eth0: Failed to read register index 0x00000098. ret = -19
[113775.057509] lan78xx 1-1.1.1:1.0 eth0: Failed to write register index 0x00000098. ret = -19
[113775.057552] lan78xx 1-1.1.1:1.0 eth0: Failed to read register index 0x00000120. ret = -19
[113775.057658] lan78xx 1-1.1.1:1.0 eth0: Failed to read register index 0x00000098. ret = -19
[113775.057664] lan78xx 1-1.1.1:1.0 eth0: Failed to write register index 0x00000098. ret = -19
[113775.057677] lan78xx 1-1.1.1:1.0 eth0: Failed to read register index 0x00000120. ret = -19
[113775.137587] usb 1-1.1.3: USB disconnect, device number 11
[113775.137781] ftdi_sio ttyUSB0: error from flowcontrol urb
[113775.138039] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[113775.138073] ftdi_sio 1-1.1.3:1.0: device disconnected
[113775.139083] usb 1-1.2: USB disconnect, device number 13
[113775.141272] usb 1-1.3: USB disconnect, device number 14
[113775.142520] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[113775.142601] option 1-1.3:1.0: device disconnected
[113775.145853] huawei_cdc_ncm 1-1.3:1.1 wwan0: unregister 'huawei_cdc_ncm' usb-3f980000.usb-1.3, Huawei CDC NCM device
[113775.217543] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[113775.217604] option 1-1.3:1.2: device disconnected
[113775.217986] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[113775.218030] option 1-1.3:1.3: device disconnected
[113775.426976] Indeed it is in host mode hprt0 = 00001501
[113775.646877] usb 1-1: new high-speed USB device number 15 using dwc_otg
[113775.647061] Indeed it is in host mode hprt0 = 00001101
[113775.887088] usb 1-1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3
[113775.887106] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[113775.887926] hub 1-1:1.0: USB hub found
[113775.888031] hub 1-1:1.0: 4 ports detected
[113776.206895] usb 1-1.1: new high-speed USB device number 16 using dwc_otg
[113776.337088] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3
[113776.337107] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[113776.337917] hub 1-1.1:1.0: USB hub found
[113776.338009] hub 1-1.1:1.0: 3 ports detected
[113776.656800] usb 1-1.1.3: new full-speed USB device number 17 using dwc_otg
[113776.818471] usb 1-1.1.3: New USB device found, idVendor=0403, idProduct=6015, bcdDevice=10.00
[113776.818485] usb 1-1.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[113776.818495] usb 1-1.1.3: Product: Interface USB 1 TIC
[113776.818505] usb 1-1.1.3: Manufacturer: Cartelectronic
[113776.818514] usb 1-1.1.3: SerialNumber: DA4W95SJ
[113776.828265] ftdi_sio 1-1.1.3:1.0: FTDI USB Serial Device converter detected
[113776.828449] usb 1-1.1.3: Detected FT-X
[113776.829527] usb 1-1.1.3: FTDI USB Serial Device converter now attached to ttyUSB0
[113777.126816] usb 1-1.1.1: new high-speed USB device number 18 using dwc_otg
[113777.257245] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800, bcdDevice= 3.00
[113777.257261] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[113777.446765] usb 1-1.2: new low-speed USB device number 19 using dwc_otg
[113777.520763] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): No External EEPROM. Setting MAC Speed
[113777.521348] libphy: lan78xx-mdiobus: probed
[113777.528416] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): int urb period 64
[113777.626066] usb 1-1.2: New USB device found, idVendor=051d, idProduct=0002, bcdDevice= 1.06
[113777.626077] usb 1-1.2: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[113777.626081] usb 1-1.2: Product: Back-UPS ES 700G FW:871.O4 .I USB FW:O4 
[113777.626085] usb 1-1.2: Manufacturer: APC
[113777.626090] usb 1-1.2: SerialNumber: 5B1813T44157  
[113777.731935] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[113777.824142] hid-generic 0003:051D:0002.0018: hiddev96,hidraw0: USB HID v1.10 Device [APC Back-UPS ES 700G FW:871.O4 .I USB FW:O4 ] on usb-3f980000.usb-1.2/input0
[113780.807982] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[113785.616850] usb 1-1.3: new high-speed USB device number 20 using dwc_otg
[113785.748066] usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506, bcdDevice= 1.02
[113785.748084] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[113785.748094] usb 1-1.3: Product: HUAWEI Mobile
[113785.748104] usb 1-1.3: Manufacturer: HUAWEI
[113786.005590] option 1-1.3:1.0: GSM modem (1-port) converter detected
[113786.005889] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[113786.056423] huawei_cdc_ncm 1-1.3:1.1: MAC-Address: 6a:70:00:66:56:7e
[113786.071778] huawei_cdc_ncm 1-1.3:1.1: NDP will be placed at end of frame for this device.
[113786.071978] huawei_cdc_ncm 1-1.3:1.1: cdc-wdm0: USB WDM device
[113786.072508] huawei_cdc_ncm 1-1.3:1.1 wwan0: register 'huawei_cdc_ncm' at usb-3f980000.usb-1.3, Huawei CDC NCM device, 6a:70:00:66:56:7e
[113786.072761] option 1-1.3:1.2: GSM modem (1-port) converter detected
[113786.073080] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
[113786.073353] option 1-1.3:1.3: GSM modem (1-port) converter detected
[113786.073510] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3

Salut,
Tu as branché tout ça en direct ou sur un hub ?
Vu ton dmesg on dirait un hub qui déconne (manque d’alim dessus ?).
PS: pour l’expert c’est pas moi :wink:

Bonjour,

J’ai essayé les 2, en direct et hub avec alimentation externe et rien n’y fait.
De plus, il n’y a que la clé Huawei qui fait cela, les autres périphériques USB n"ont pas de soucis

Vu les retours sur le net il est possible que ce soit un bug avec ton kernel actuel.
Tu peux essayer sudo rpi-update , puis reboot.
Si pas mieux tu peux essayer de downgrader en attendant avec
sudo rpi-update #le hash du kernel désiré#
ex pour le dernier kernel en 4.19: sudo rpi-update e1050e94821a70b2e4c72b318d6c6c968552e9a2
Les hashs tu les trouveras là:https://github.com/Hexxeh/rpi-firmware/commits
Si ça marche pas non plus tu peux revenir au dernier kernel avec un sudo rpi-update sans arguments