页次: 1
新手刚安装好Acrh
可联通的3G卡一直用不了
已经安装好了 usb_modeswitch modemmanager 软件包
# lsusb
Bus 002 Device 003: ID 064e:f207 Suyin Corp.
Bus 002 Device 005: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0489:e00d Foxconn / Hon Hai Broadcom Bluetooth 2.1 Device
Bus 001 Device 003: ID 046d:c051 Logitech, Inc. G3 (MX518) Optical Mouse
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
#dmesg
[ 66.427295] snd_hda_intel 0000:01:00.1: Disabling via VGA-switcheroo
[ 66.643968] ACPI Warning: \_SB_.PCI0.P0P2.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[ 66.644124] ACPI Warning: \_SB_.PCI0.P0P2.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[ 179.938078] usb 2-1.2: new full-speed USB device number 4 using ehci-pci
[ 180.793412] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[ 180.793621] scsi host6: usb-storage 2-1.2:1.0
[ 180.793736] usbcore: registered new interface driver usb-storage
[ 180.813532] usbcore: registered new interface driver uas
[ 181.530082] usb 2-1.2: USB disconnect, device number 4
[ 182.506586] usb 2-1.2: new full-speed USB device number 5 using ehci-pci
[ 182.592191] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[ 182.592807] usb-storage 2-1.2:1.1: USB Mass Storage device detected
[ 182.593284] usb-storage 2-1.2:1.2: USB Mass Storage device detected
[ 182.594406] usb-storage 2-1.2:1.3: USB Mass Storage device detected
[ 182.594655] scsi host10: usb-storage 2-1.2:1.3
[ 182.676764] usbcore: registered new interface driver usbserial
[ 182.676776] usbcore: registered new interface driver usbserial_generic
[ 182.676784] usbserial: USB Serial support registered for generic
[ 182.708523] usbcore: registered new interface driver option
[ 182.708541] usbserial: USB Serial support registered for GSM modem (1-port)
[ 182.708657] option 2-1.2:1.0: GSM modem (1-port) converter detected
[ 182.708778] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB0
[ 182.708809] option 2-1.2:1.1: GSM modem (1-port) converter detected
[ 182.708890] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[ 182.708913] option 2-1.2:1.2: GSM modem (1-port) converter detected
[ 182.708988] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB2
[ 183.597649] scsi 10:0:0:0: Direct-Access WCDMA MMC Storage 2.31 PQ: 0 ANSI: 2
[ 183.603638] sd 10:0:0:0: [sdc] Attached SCSI removable disk
plasme 里的NetworkManager 没能识别3G网卡 也添加不了
查资料弄了一天 还是没有头绪 有其他大侠知道怎么解决么
最近编辑记录 benk2 (2015-03-29 23:38:48)
离线
我是用 wvdial 的,没试过NM。
离线
仙子 我这种情况可以用wvdial拨号上网么 要怎么配置
离线
这是联通的配置:
>>> cat /etc/wvdial.conf
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","3gnet"
Modem Type = Analog Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyUSB0
Phone = *99#
Password = 3gnet
Username = 3gnet
Stupid Mode = 1
ISDN = 0
Auto DNS = no
然后运行 wvdial。
离线
谢谢仙子 可以上网了 只不过运行wvdial要占一个shell而且普通用户使用有权限问题 正在摸索Arch 谢谢仙子指导
最近编辑记录 benk2 (2015-03-25 12:32:48)
离线
谢谢仙子 可以上网了 只不过运行wvdial要占一个shell而且普通用户使用有权限问题 正在摸索Arch 谢谢仙子指导
写个 systemd 服务配置吧。
离线
benk2 说:谢谢仙子 可以上网了 只不过运行wvdial要占一个shell而且普通用户使用有权限问题 正在摸索Arch 谢谢仙子指导
写个 systemd 服务配置吧。
做了个wvdial.service
$cat wvdial.service
[Unit]
Description=Wvdial PPP
Before=network.target
Wants=network.target
[Service]
ExecStart=/usr/bin/wvdial
RemainAfterExit=yes
Type=forking
[Install]
WantedBy=multi-user.target
systemctl enable wvdial
Created symlink from /etc/systemd/system/multi-user.target.wants/wvdial.service to /usr/lib/systemd/system/wvdial.service.
重启系统后还是不能上网
systemctl status wvdial
● wvdial.service - Wvdial PPP
Loaded: loaded (/usr/lib/systemd/system/wvdial.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 三 2015-03-25 20:31:46 CST; 1min 15s ago
Process: 356 ExecStart=/usr/bin/wvdial (code=exited, status=1/FAILURE)
3月 25 20:31:46 ben-PC wvdial[356]: --> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.
3月 25 20:31:46 ben-PC wvdial[356]: --> Auto Reconnect will be attempted in 5 seconds
3月 25 20:31:46 ben-PC wvdial[356]: --> Cannot open /dev/ttyUSB0: No such file or directory
3月 25 20:31:46 ben-PC wvdial[356]: --> Cannot open /dev/ttyUSB0: No such file or directory
3月 25 20:31:46 ben-PC wvdial[356]: --> Cannot open /dev/ttyUSB0: No such file or directory
3月 25 20:31:46 ben-PC wvdial[356]: --> Disconnecting at Wed Mar 25 20:31:46 2015
3月 25 20:31:46 ben-PC systemd[1]: wvdial.service: control process exited, code=exited status=1
3月 25 20:31:46 ben-PC systemd[1]: Failed to start Wvdial PPP.
3月 25 20:31:46 ben-PC systemd[1]: Unit wvdial.service entered failed state.
3月 25 20:31:46 ben-PC systemd[1]: wvdial.service failed.
开机前上网卡是插在电脑上的,这里提示没发现ttyUSB0,可ls /dev 有ttyUSB0
我的配置文件是照netctl写的 是不是有错
离线
启动得太早了吧。你不如写个 .path 文件来激活。详见 man systemd.path。
另外这个 service 的 Type 应该是 simple 吧。
离线
我记得systemd可以等dev初始化好再启动, 写到after后面
离线
用 PathExists 的话应该是插上网卡就会自动连上了喵~
离线
比如我这个systemctl 显示
...
sys-devices-platform-serial8250-tty-ttyS3.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS3
sys-module-configfs.device loaded active plugged /sys/module/configfs
sys-module-fuse.device loaded active plugged /sys/module/fuse
sys-subsystem-net-devices-eth0.device loaded active plugged RTL8111/8168/8411 PCI Express Gigabit Ethernet Control
sys-subsystem-net-devices-wlan0.device loaded active plugged Wireless 7260 (Dual Band Wireless-AC 7260)
sys-subsystem-rfkill-devices-rfkill0.device loaded active plugged /sys/subsystem/rfkill/devices/rfkill0
...
...
[Unit]
Description=WPA supplicant daemon (interface- and nl80211 driver-specific version)
Requires=sys-subsystem-net-devices-wlan0.device
After=sys-subsystem-net-devices-wlan0.device
...
那么你就可以 udevadm info -a /dev/ttyUSB0 找到是在哪个设备下,比如 /device/platform ..... 在前面加个/sys 就是对应devpath路径了
或者systemctl 应该也可以看到, 然后添加到service文件里面的 requires,after 后面应该就可以了
最近编辑记录 atmouse (2015-03-26 10:24:41)
离线
按atmouse 的方法重做了wvdial.service
cat wvdial.service
[Unit]
Description=Wvdial PPP
Requires=sys-devices-pci0000:00-0000:00:1d.0-usb2-2\x2d1-2\x2d1.2-2\x2d1.2:1.0-ttyUSB0-tty-ttyUSB0.device
After=sys-devices-pci0000:00-0000:00:1d.0-usb2-2\x2d1-2\x2d1.2-2\x2d1.2:1.0-ttyUSB0-tty-ttyUSB0.device
Before=network.target
Wants=network.target
[Service]
ExecStart=/usr/bin/wvdial
RemainAfterExit=yes
Type=simple
[Install]
WantedBy=multi-user.target
开机可以就可以连上,也可以用systemctl restart重起 不过重新再插上网卡就不行了,因为ttyUSB0 ~ ttyUSB2 会变成ttyUSB1 ~ttyUSB3
这样也可以了 谢谢大神指教 要是能有中文版的systemd详细说明就好 systemd 是Arch基本工具 官方wiki信息量太少
由于Win7和Arch 同时挂了 重装两个系统 晚了回复
离线
你可以用 udev 规则来匹配然后启动相应的 systemd serivce 的(用 wvdial@ttyUSB0.service 这种形式)。
关于 systemd,建议看以下地方的文档:man 手册、freedesktop 的文档、openSUSE 和 Arch 的 wiki。剩下就交给 Google 吧。中文信息不多。如果有什么可以分享的就写成博客文章分享给世界吧=w=
离线
正在学习 有好方法一定分享
离线
页次: 1