Avant de lancer le script, je ne vois pas le modem 4G qui est branché sur un port PCIE. (lspci ne renvoie rien.), après avoir lancé le script, je vois bien le modem apparaitre avec lsusb. Un des port USB devient inutilisable.
me@ordi:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 001 Device 004: ID 046d:c077 Logitech, Inc.
Bus 001 Device 003: ID 26bd:9917
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
me@ordi:~$ sudo ./scripts/switch_usb_to_db.sh
[sudo] password for me:
me@ordi:~$ lsusb
(...)
Bus 001 Device 006: ID 1199:68c0 Sierra Wireless, Inc.
(...)
me@ordi:~$ dmesg | tail -n 30
(...)
[ 196.104466] usb 1-2: new high-speed USB device number 6 using tegra-xhci
[ 196.121756] usb 1-2: config 1 has an invalid interface number: 8 but max is 5
[ 196.121807] usb 1-2: config 1 has an invalid interface number: 10 but max is 5
[ 196.121847] usb 1-2: config 1 has an invalid interface number: 11 but max is 5
[ 196.121885] usb 1-2: config 1 has no interface number 1
[ 196.121918] usb 1-2: config 1 has no interface number 4
[ 196.121948] usb 1-2: config 1 has no interface number 5
[ 196.124414] usb 1-2: New USB device found, idVendor=1199, idProduct=68c0
[ 196.124464] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 196.124502] usb 1-2: Product: MC7304
[ 196.124538] usb 1-2: Manufacturer: Sierra Wireless, Incorporated
[ 196.178754] GobiNet: 2015-12-08/SWI_2.36
[ 196.181355] GobiNet 1-2:1.8 eth0: register 'GobiNet' at usb-tegra-xhci-2, GobiNet Ethernet Device, 92:d5:63:c6:c9:33
[ 196.181374] Ethernet mode
[ 197.297531] TE Enabled
[ 197.585552] creating qcqmi0
[ 197.585749] USB Speed : USB 2.0
[ 197.587425] GobiNet 1-2:1.10 eth1: register 'GobiNet' at usb-tegra-xhci-2, GobiNet Ethernet Device, 92:d5:63:c6:c9:33
[ 197.587437] Ethernet mode
[ 198.705543] TE Enabled
[ 198.993840] creating qcqmi1
[ 198.995097] USB Speed : USB 2.0
[ 198.996797] usbcore: registered new interface driver GobiNet
[ 199.008165] usbcore: registered new interface driver GobiSerial
[ 199.008294] usbserial: USB Serial support registered for GobiSerial
[ 199.010027] GobiSerial 1-2:1.0: GobiSerial converter detected
[ 199.010424] usb 1-2: GobiSerial converter now attached to ttyUSB0
[ 199.012164] GobiSerial 1-2:1.2: GobiSerial converter detected
[ 199.012511] usb 1-2: GobiSerial converter now attached to ttyUSB1
[ 199.014325] GobiSerial 1-2:1.3: GobiSerial converter detected
[ 199.014636] usb 1-2: GobiSerial converter now attached to ttyUSB2
[ 199.014710] GobiSerial: 2015-08-27/SWI_2.25:GobiSerial
[ 199.039776] systemd-udevd[2436]: renamed network interface eth1 to rename9
Je n’ai pas trouvé de documentation sur “/sys/class/gpio/export” et le script ne fonctionne pas pour des modems 3G/4G d’autres marques.
Est-ce que quelqu’un pourrait m’éclairer sur tout ça ?
Merci d’avance
[Edit: J’ai mal cherché avant apparemment…
Le script “crée” l’entrée/sortie n°166. Ensuite il dit que c’est une sortie, il attend 1/2 seconde et il met la sortie à l’état logique “1”.
Ce que je ne comprends pas pourquoi ça ne marche qu’avec un seul modèle de modem LTE. Manquerait-il les drivers pour les autres ? Comment le vérifier ?
Je continue mes investigations et je continue donc de me répondre tout seul, ajoutant des questionnements. Je me demande si le problème ne vient pas d’un module manquant.
me@ordi:~$ lsmod
Module Size Used by
GobiSerial 8954 0
GobiNet 51985 14
joydev 8199 0
dm_crypt 12216 0
dm_mod 67166 1 dm_crypt
rfcomm 33646 0
bnep 9796 2
bluetooth 279586 10 bnep,rfcomm
nvhost_vi 2874 0
me@ordi:~$ cat /etc/modprobe.d/blacklist.conf
# This file lists those modules which we don't want to be loaded by
# alias expansion, usually so some other driver will be loaded for the
# device instead.
# evbug is a debug tool that should be loaded explicitly
blacklist evbug
# these drivers are very simple, the HID drivers are usually preferred
blacklist usbmouse
blacklist usbkbd
# replaced by e100
blacklist eepro100
# replaced by tulip
blacklist de4x5
# causes no end of confusion by creating unexpected network interfaces
blacklist eth1394
# snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much
# hardware on its own (Ubuntu bug #2011, #6810)
blacklist snd_intel8x0m
# Conflicts with dvb driver (which is better for handling this device)
blacklist snd_aw2
# causes failure to suspend on HP compaq nc6000 (Ubuntu: #10306)
blacklist i2c_i801
# replaced by p54pci
blacklist prism54
# replaced by b43 and ssb.
blacklist bcm43xx
# most apps now use garmin usb driver directly (Ubuntu: #114565)
blacklist garmin_gps
# replaced by asus-laptop (Ubuntu: #184721)
blacklist asus_acpi
# low-quality, just noise when being used for sound playback, causes
# hangs at desktop session start (Ubuntu: #246969)
blacklist snd_pcsp
# ugly and loud noise, getting on everyone's nerves; this should be done by a
# nice pulseaudio bing (Ubuntu: #77010)
blacklist pcspkr
# EDAC driver for amd76x clashes with the agp driver preventing the aperture
# from being initialised (Ubuntu: #297750). Blacklist so that the driver
# continues to build and is installable for the few cases where its
# really needed.
blacklist amd76x_edac
me@ordi:~$ sudo ls -al /lib/modules/3.10.40+/
total 28940
drwxrwxr-x 3 1000 1000 4096 Aug 14 2016 .
drwxrwxr-x 3 root root 4096 Aug 11 2016 ..
-rw-rw-r-- 1 1000 1000 29386947 Apr 20 2016 3.10.40_+.tar.gz
lrwxrwxrwx 1 1000 1000 23 Apr 12 2016 build -> /home/mb/perceptoKernel
drwxrwxr-x 7 1000 1000 4096 Aug 4 2016 kernel
-rw-r--r-- 1 root root 47499 Aug 14 2016 modules.alias
-rw-r--r-- 1 root root 46962 Aug 14 2016 modules.alias.bin
-rw-rw-r-- 1 1000 1000 18797 Aug 4 2016 modules.builtin
-rw-r--r-- 1 root root 21556 Aug 14 2016 modules.builtin.bin
-rw-r--r-- 1 root root 5506 Aug 14 2016 modules.dep
-rw-r--r-- 1 root root 8661 Aug 14 2016 modules.dep.bin
-rw-r--r-- 1 root root 105 Aug 14 2016 modules.devname
-rw-rw-r-- 1 1000 1000 2580 Aug 4 2016 modules.order
-rw-r--r-- 1 root root 131 Aug 14 2016 modules.softdep
-rw-r--r-- 1 root root 24285 Aug 14 2016 modules.symbols
-rw-r--r-- 1 root root 30285 Aug 14 2016 modules.symbols.bin
lrwxrwxrwx 1 1000 1000 23 Aug 4 2016 source -> /home/mb/perceptoKernel
me@ordi:~$ sudo ls -l /lib/modules/3.10.40+/kernel/drivers/usb/serial/
total 356
-rw-rw-r-- 1 1000 1000 198906 Aug 4 2016 baseband_usb_chr.ko
-rw-r--r-- 1 root root 162102 Aug 14 2016 GobiSerial.ko
N’ai-je pas besoin du module usb_serial pour faire fonctionner les autres modem 3G/4G ?
premièrement je ne suis pas d’accord avec toi quand tu dit : [quote=“Esprit, post:1, topic:71467”]
Le script “redirige” un port USB 3 vers un port PCIE
[/quote]
un GPIO est un port d’entrée/sortie utilisés dans le monde des microcontrôleurs ou alors le script que tu a poster est incomplet
le script fait ça :
##Creation d’un périph de type gpio dans /sys/class/gpio/gpio166
echo 166 > /sys/class/gpio/export
#Définit le mode de direction en sortie (out)
echo out > /sys/class/gpio/gpio166/direction #attendre 0,5 secondes
sleep 0.5
définit le signal à la valeur “haute” (If the GPIO is configured as an output, this value may be written; any nonzero value is treated as high.)
Est-ce que tu as vu l’édit que j’ai fait ce matin à la fin de mon premier post ?
Le script que j’ai posté est complet et j’ai compris ce qu’il faisait. Ce que je ne comprends pas, premièrement, c’est pourquoi le modem 4G apparaît comme un périphérique USB quand je lance le script. Et, deuxièmement, pourquoi ça ne marche qu’avec ce modem 4G là et pas un autre.
C’est peut-être spécifique à la carte (pourrie) que je dois utiliser…