Страница 1 из 1
Linux + GPRS + BeeLine
Добавлено: 21 дек 2021, 22:01
ya
Re: Linux + GPRS + BeeLine
Добавлено: 21 дек 2021, 22:15
ya
root@gt914:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 12d1:1f01 Huawei Technologies Co., Ltd. E353/E3131 (Mass storage mode)
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@gt914:~#
Re: Linux + GPRS + BeeLine
Добавлено: 21 дек 2021, 22:27
ya
pppconfig - Text menu based utility for configuring ppp
Re: Linux + GPRS + BeeLine
Добавлено: 21 дек 2021, 22:37
ya
сделаем автоматическую установку режима в режим модема. В терминале выполните следующую команду:
Код: Выделить всё
sudo nano /lib/udev/rules.d/40-usb_modeswitch.rules
В самом низу открытого файла вставьте именно эту строку:
Код: Выделить всё
# Huawei E353/E3131
ATTR{idVendor}=="12d1", ATTR{idProduct}=="1f01", RUN +="usb_modeswitch '%b/%k'"
Отключите модем и перезагрузите систему. После перезагрузки подключите модем. Система должна автоматически определить его как модем и подключить вас к Интернету. Вам не нужно ничего запускать автоматически, и у вас не будет раздела на вашем компьютере.
Re: Linux + GPRS + BeeLine
Добавлено: 21 дек 2021, 23:08
ya
Драйвера к этому модему качать тут.
https://huaweimodems.com/huawei-e3131-driver/
Для других тоже там есть
Re: Linux + GPRS + BeeLine
Добавлено: 21 дек 2021, 23:26
ya
Вот драйвер, но там надо логиниться чтобы скачать
https://ubuntuforums.org/showthread.php?t=1799524
Re: Linux + GPRS + BeeLine
Добавлено: 21 дек 2021, 23:32
ya
switchconf - switch between system configuration sets
Re: Linux + GPRS + BeeLine
Добавлено: 21 дек 2021, 23:40
ya
usb-modeswitch - инструмент переключения режима для управления USB-устройствами "flip flop"
Re: Linux + GPRS + BeeLine
Добавлено: 21 дек 2021, 23:52
ya
[ 1696.255267] usb 1-2: new high-speed USB device number 4 using xhci_hcd
[ 1696.556445] usb 1-2: New USB device found, idVendor=12d1, idProduct=1f01
[ 1696.556447] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1696.556448] usb 1-2: Product: HUAWEI_MOBILE
[ 1696.556449] usb 1-2: Manufacturer: HUAWEI_MOBILE
[ 1696.556450] usb 1-2: SerialNumber: 0123456789ABCDEF
[ 1696.590570] usb-storage 1-2:1.0: USB Mass Storage device detected
[ 1696.591043] scsi host3: usb-storage 1-2:1.0
[ 1697.616496] scsi 3:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[ 1697.617484] scsi 3:0:0:1: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
[ 1697.622567] sr 3:0:0:0: [sr1] scsi-1 drive
[ 1697.622692] sr 3:0:0:0: Attached scsi CD-ROM sr1
[ 1697.622802] sr 3:0:0:0: Attached scsi generic sg2 type 5
[ 1697.623008] sd 3:0:0:1: Attached scsi generic sg3 type 0
[ 1697.643596] sd 3:0:0:1: [sdb] Attached SCSI removable disk
[ 1697.682569] sr 3:0:0:0: [sr1] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 1697.682572] sr 3:0:0:0: [sr1] tag#0 Sense Key : Medium Error [current]
[ 1697.682574] sr 3:0:0:0: [sr1] tag#0 Add. Sense: Unrecovered read error
[ 1697.682576] sr 3:0:0:0: [sr1] tag#0 CDB: Read(10) 28 00 00 00 0f fc 00 00 02 00
Re: Linux + GPRS + BeeLine
Добавлено: 21 дек 2021, 23:55
ya
Re: Linux + GPRS + BeeLine
Добавлено: 22 дек 2021, 07:25
ya
Re: Linux + GPRS + BeeLine
Добавлено: 22 дек 2021, 07:38
ya
root@gt914:~# usb_modeswitch -v 12d1 -p 1f01 -V 12d1 -P 1f01
Look for target devices ...
product ID matched
Found devices in target mode or class (1)
Look for default devices ...
product ID matched
Found devices in default mode (1)
Access device 004 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
with class 8
USB description data (for identification)
-------------------------
Manufacturer: HUAWEI_MOBILE
Product: HUAWEI_MOBILE
Serial No.: 0123456789ABCDEF
-------------------------
Warning: no switching method given. See documentation
-> Run lsusb to note any changes. Bye!
root@gt914:~#
Re: Linux + GPRS + BeeLine
Добавлено: 22 дек 2021, 07:45
ya
dmesg
[ 5.536457] PPP generic driver version 2.4.2
[ 5.542640] NET: Registered protocol family 24
[ 5.570094] l2tp_core: L2TP core driver, V2.0
[ 5.575820] l2tp_netlink: L2TP netlink interface
[ 5.580977] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[ 7.043446] random: crng init done
[ 7.043448] random: 7 urandom warning(s) missed due to ratelimiting
[ 1685.554338] usb 1-2: USB disconnect, device number 3
[ 1696.255267] usb 1-2: new high-speed USB device number 4 using xhci_hcd
[ 1696.556445] usb 1-2: New USB device found, idVendor=12d1, idProduct=1f01
[ 1696.556447] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1696.556448] usb 1-2: Product: HUAWEI_MOBILE
[ 1696.556449] usb 1-2: Manufacturer: HUAWEI_MOBILE
[ 1696.556450] usb 1-2: SerialNumber: 0123456789ABCDEF
[ 1696.590570] usb-storage 1-2:1.0: USB Mass Storage device detected
[ 1696.591043] scsi host3: usb-storage 1-2:1.0
[ 1697.616496] scsi 3:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[ 1697.617484] scsi 3:0:0:1: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
[ 1697.622567] sr 3:0:0:0: [sr1] scsi-1 drive
[ 1697.622692] sr 3:0:0:0: Attached scsi CD-ROM sr1
[ 1697.622802] sr 3:0:0:0: Attached scsi generic sg2 type 5
[ 1697.623008] sd 3:0:0:1: Attached scsi generic sg3 type 0
[ 1697.643596] sd 3:0:0:1: [sdb] Attached SCSI removable disk
[ 1697.682569] sr 3:0:0:0: [sr1] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 1697.682572] sr 3:0:0:0: [sr1] tag#0 Sense Key : Medium Error [current]
[ 1697.682574] sr 3:0:0:0: [sr1] tag#0 Add. Sense: Unrecovered read error
[ 1697.682576] sr 3:0:0:0: [sr1] tag#0 CDB: Read(10) 28 00 00 00 0f fc 00 00 02 00
[ 1697.682578] blk_update_request: critical medium error, dev sr1, sector 16368
[ 1697.690993] sr 3:0:0:0: [sr1] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 1697.690995] sr 3:0:0:0: [sr1] tag#0 Sense Key : Medium Error [current]
[ 1697.690996] sr 3:0:0:0: [sr1] tag#0 Add. Sense: Unrecovered read error
[ 1697.690998] sr 3:0:0:0: [sr1] tag#0 CDB: Read(10) 28 00 00 00 0f fc 00 00 02 00
[ 1697.690999] blk_update_request: critical medium error, dev sr1, sector 16368
Re: Linux + GPRS + BeeLine
Добавлено: 22 дек 2021, 07:52
ya
dmesg
Re: Linux + GPRS + BeeLine
Добавлено: 22 дек 2021, 08:01
ya
root@gt914:~# ifconfig -a
enp0s17: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.228 netmask 255.255.255.0 broadcast 192.168.100.255
ether 08:00:27:6a:97:e2 txqueuelen 1000 (Ethernet)
RX packets 25151 bytes 4999082 (4.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12608 bytes 1718526 (1.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enx0c5b8f279a64: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 0c:5b:8f:27:9a:64 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1 (Local Loopback)
RX packets 167 bytes 13289 (12.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 167 bytes 13289 (12.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Re: Linux + GPRS + BeeLine
Добавлено: 22 дек 2021, 10:02
ya
Re: Linux + GPRS + BeeLine
Добавлено: 22 дек 2021, 13:44
ya
apt-get install gsm-utils
Re: Linux + GPRS + BeeLine
Добавлено: 22 дек 2021, 13:50
ya
dmesg просмотр последних системных событий
Re: Linux + GPRS + BeeLine
Добавлено: 22 дек 2021, 14:07
ya
root@gt914:/etc/ppp/peers# picocom -b 115200 --echo /dev/modem
picocom v1.7
port is : /dev/modem
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
escape is : C-a
local echo is : yes
noinit is : no
noreset is : no
nolock is : no
send_cmd is : sz -vv
receive_cmd is : rz -vv
imap is :
omap is :
emap is : crcrlf,delbs,
FATAL: cannot open /dev/modem: No such file or directory
root@gt914:/etc/ppp/peers# minicom -D /dev/ttyUSB0
minicom: невозможно открыть /dev/ttyUSB0: Нет такого файла или каталога
root@gt914:/etc/ppp/peers#
Re: Linux + GPRS + BeeLine
Добавлено: 22 дек 2021, 14:16
ya
apt-get update --fix-missing
apt-get install libserialport0
Re: Linux + GPRS + BeeLine
Добавлено: 22 дек 2021, 14:19
ya
при включенном модеме появляются файлы: sdb, sg2, sg3, sr1
Re: Linux + GPRS + BeeLine
Добавлено: 22 дек 2021, 14:31
ya