查看SMS Gateway的源代码
←
SMS Gateway
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
== 模式切换 == 默认情形下,内核将 ZTE MF668 识别为 SCSI CD-ROM 设备(因为其内部有一个 MicroSD 控制器,可插MicroSD卡): <pre> $ dmesg|grep scsi [ 3.769916] scsi0 : usb-storage 1-1.3:1.0 [ 4.773973] scsi 0:0:0:0: CD-ROM ZTE USB SCSI CD-ROM 2.31 PQ: 0 ANSI: 2 [ 6.514819] sr0: scsi-1 drive [ 6.530712] sr 0:0:0:0: Attached scsi CD-ROM sr0 </pre> 因此需要 usb-modeswitch 将其切换为 modem 模式: <pre> root@raspberrypi:/# apt-get install usb-modeswitch root@raspberrypi:/# lsusb Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. Bus 001 Device 004: ID 19d2:2000 ZTE WCDMA Technologies MSM MF627/MF628/MF628+/MF636+ HSDPA/HSUPA root@raspberrypi:/# cat /etc/usb_modeswitch.d/19d2\:2000 # ZTE devices DefaultVendor=0x19d2 DefaultProduct=0x2000 TargetVendor=0x19d2 TargetProduct=0x0017 MessageContent="5553424312345678000000000000061e000000000000000000000000000000" MessageContent2="5553424312345679000000000000061b000000020000000000000000000000" MessageContent3="55534243123456702000000080000c85010101180101010101000000000000" NeedResponse=1 root@raspberrypi:/# usb_modeswitch -I -c /etc/usb_modeswitch.d/19d2\:2000 Looking for target devices ... No devices in target mode or class found Looking for default devices ... found matching product ID adding device Found device in default mode, class or configuration (1) Accessing device 004 on bus 001 ... Getting the current device configuration ... OK, got current device configuration (1) Using first interface: 0x00 Using endpoints 0x01 (out) and 0x81 (in) USB description data (for identification) ------------------------- Manufacturer: ZTE,Incorporated Product: ZTE WCDMA Technologies MSM Serial No.: P680A1ZTED010000 ------------------------- Looking for active driver ... No driver found. Either detached before or never attached Setting up communication with interface 0 Using endpoint 0x01 for message sending ... Trying to send message 1 to endpoint 0x01 ... OK, message successfully sent Reading the response to message 1 (CSW) ... OK, response successfully read (13 bytes). Trying to send message 2 to endpoint 0x01 ... OK, message successfully sent Reading the response to message 2 (CSW) ... OK, response successfully read (13 bytes). Trying to send message 3 to endpoint 0x01 ... OK, message successfully sent Reading the response to message 3 (CSW) ... OK, response successfully read (0 bytes). Resetting response endpoint 0x81 Resetting message endpoint 0x01 -> Run lsusb to note any changes. Bye. </pre> <br><br>
返回到
SMS Gateway
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面