2019年05月05日 10:00 阅读量:2935
tar jxvf libusb-1.0.20.tar.bz2
./configure --disable-udev
make install
root@kali:/home/usb-modeswitch-2.3.0# make uninstall
/bin/rm -f /usr/sbin/usb_modeswitch
/bin/rm -f /usr/sbin/usb_modeswitch_dispatcher
/bin/rm -f /lib/udev/usb_modeswitch
/bin/rm -f /etc/usb_modeswitch.conf
/bin/rm -f /usr/share/man/man1/usb_modeswitch.1
/bin/rm -f -R /var/lib/usb_modeswitch
/bin/rm -f /etc/systemd/system/usb_modeswitch@.service
home/usb-modeswitch-2.3.0# make uninstall
udevadm info -a -q path -n /dev/disk/by-id/usb-W*
systemctl enable ModemManager
systemctl start ModemManager
tar zvxf libusb-0.1.12.tar.gz
pppd connect 'chat -v "" "AT" "" "ATDT*99# CONNECT"' user uninet password 1234 /dev/ttyUSB0 115200 nodetach crtscts debug usepeerdns defaultroute
001 Device 013: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
Bus 001 Device 024: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552/E1800/E173 (HSPA modem)
//日志
tail -f /var/log/syslog
Jan 22 01:22:46 kali ModemManager[692]: Error while checking ^SYSCFGEX format: Unknown error
Jan 22 01:22:46 kali ModemManager[692]: Error while checking ^SYSCFG format: Unknown error
root@kali:~# mmcli -L
Found 1 modems:
/org/freedesktop/ModemManager1/Modem/0 [QUALCOMM INCORPORATED] E1750
root@kali:~# mmcli -m 0
/org/freedesktop/ModemManager1/Modem/0 (device id '70eb8c18c73be6dd4d7da39112203cc7f19e0001')
-------------------------
Hardware | manufacturer: 'QUALCOMM INCORPORATED'
| model: 'E1750'
| revision: '14.06.02 1 [Jul 14 2014 14:48:14]'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '000000000000000'
-------------------------
System | device: '/sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb1/1-2/1-2.1'
| drivers: 'option1'
| plugin: 'Huawei'
| primary port: 'ttyUSB2'
| ports: 'ttyUSB0 (at), ttyUSB1 (qcdm), ttyUSB2 (at)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'sim-pin (1), sim-pin2 (1), sim-puk (3), sim-puk2 (10)'
| state: 'searching'
| power state: 'on'
| access tech: 'unknown'
| signal quality: '0' (cached)
-------------------------
Modes | supported: 'allowed: any; preferred: none'
| current: 'allowed: any; preferred: none'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6'
-------------------------
3GPP | imei: '000000000000000'
| enabled locks: 'none'
| operator id: 'unknown'
| operator name: 'unknown'
| subscription: 'unknown'
| registration: 'searching'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/0'
-------------------------
Bearers | paths: 'none'
77-mm-huawei-net-port-types.rules
root@kali:~# systemctl status ModemManager
● ModemManager.service - Modem Manager
Loaded: loaded (/lib/systemd/system/ModemManager.service; enabled)
Active: active (running) since Fri 2016-01-22 03:42:54 EST; 3min 25s ago
Main PID: 2600 (ModemManager)
CGroup: /system.slice/ModemManager.service
└─2600 /usr/sbin/ModemManager
Jan 22 03:46:05 kali ModemManager[2600]: <info> Modem for device at '/sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb1/1-2/1-2.1' successfully created
Jan 22 03:46:05 kali ModemManager[2600]: Error while checking ^SYSCFGEX format: Unknown error
Jan 22 03:46:05 kali ModemManager[2600]: Error while checking ^SYSCFG format: Unknown error
Jan 22 03:46:05 kali ModemManager[2600]: <warn> couldn't load Supported Modes: 'Unknown error'
Jan 22 03:46:13 kali ModemManager[2600]: <warn> couldn't load list of Own Numbers: 'Failed to parse NV MDN command result: -17'
Jan 22 03:46:13 kali ModemManager[2600]: <warn> couldn't load current Bands: 'Unknown error'
Jan 22 03:46:14 kali ModemManager[2600]: <info> Modem: state changed (unknown -> disabled)
Jan 22 03:46:14 kali ModemManager[2600]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (disabled -> enabling)
Jan 22 03:46:14 kali ModemManager[2600]: <warn> (ttyUSB2): port attributes not fully set
Jan 22 03:46:15 kali ModemManager[2600]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (unknown -> searching)
Hint: Some lines were ellipsized, use -l to show in full.
root@kali:~# dpkg -l | grep -e modemmanager -e network-manager -e uuid
ii libuuid-perl 0.05-1+b1 i386 Perl extension for using UUID interfaces as defined in e2fsprogs
ii libuuid1:i386 2.25.2-6 i386 Universally Unique ID library
ii modemmanager 1.4.0-1 i386 D-Bus service for managing modems
ii network-manager 0.9.10.0-7 i386 network management framework (daemon and userspace tools)
ii network-manager-gnome 0.9.10.0-2 i386 network management framework (GNOME frontend)
ii network-manager-pptp 0.9.10.0-1 i386 network management framework (PPTP plugin core)
ii network-manager-pptp-gnome 0.9.10.0-1 i386 network management framework (PPTP plugin GNOME GUI)
ii uuid-runtime 2.25.2-6 i386 runtime components for the Universally Unique ID library
root@kali:~#
ii modemmanager 0.5.2.0-2 i386 D-Bus service for managing modems
root@kali:~# mmcli -i 0 --pin 1234
error: couldn't send PIN code to the SIM: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Serial.SendFailed: Sending command failed: 'Resource temporarily unavailable''
root@kali:~# mmcli -m 0 --simple-connect="pin=1234,apn=3gnet"
error: couldn't connect the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.NetworkTimeout: Network timeout'
SerialNumber=
root@kali:~# usb-devices
T: Bus=01 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 10 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=12d1 ProdID=1001 Rev=00.00
S: Manufacturer=Qualcomm, Incorporated
S: Product=Qualcomm CDMA Technologies MSM
C: #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I: If#= 3 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
systemctl disable dbus-org.freedesktop.ModemManager1.service
systemctl stop dbus-org.freedesktop.ModemManager1.service
/home/ModemManager-1.4.12# ./configure --without-mbim --without-qmi
$> sudo /usr/sbin/ModemManager --debug
$> sudo /usr/sbin/NetworkManager --debug --log-level=DEBUG
ModemManager --log-level=DEBUG --log-file=/var/log/modman.log
mmcli --set-logging=DEBUG
sudo mv /usr/share/dbus-1/system-services/org.freedesktop.ModemManager1.service /usr/share/dbus-1/services/
参考