ubuntu下使用USBSerial(USB转串口)--连接3g模块中遇到的问题
我是ubuntu14.04系统想连接3g模块,网上搜了下http://blog.chinaunix.net/uid-23733005-id-204774.html
它说明的方法是:
Ubuntu本身一般都带了USB转串口的驱动。
1. 首先确认系统支持USBSerial,输入以下命令:
lsmod | grep usbserial
2. 接上USB串口线,看看系统是否可以识别。输入以下命令:
dmesg | grep ttyUSB
或者直接可以到/dev下看看有没有ttyUSB0或者ttyUSB1
3. minicom,相当于windows下的超级终端。
sudo apt-get install minicom
4. 配置minicom。一般要root权限使用mincom
minicom -s
进行minicom配置。
+-----[configuration]------+
| Filenames and paths |
| File transfer protocols |
| Serial port setup |
| Modem and dialing |
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom
选择 Serial port setup,会出现:
A - Serial Device : /dev/ttyUSB1 |
| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E - Bps/Par/Bits : 9600 8N1 |
| F - Hardware Flow Control : No |
| G - Software Flow Control : No |
| |
| Change which setting?
我自己电脑的是ttyUSB1,这里需要注意的是Bps和流控制的配置。Bps一般都是9600,流控制全部选NO。
然后 Save setup as dfl
这样就大功告成了!
接着输入sudo minicom就可以正常连接交换机了!
当然我不是要连接交换机,我是要连接3g模块!!!!!!!!!!!!
我输入命令如下:
xxj@ubuntu:/dev$ lsmod | grep usbserial
usbserial 45014 2 option,usb_wwan
xxj@ubuntu:/dev$ dmesg | grep ttyUSB
[ 355.868073] usb 2-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[ 355.868153] usb 2-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[ 355.868227] usb 2-1.3: GSM modem (1-port) converter now attached to ttyUSB2
[ 1434.701499] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 1434.701723] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[ 1434.701916] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
第一个说明系统是支持USBSerial的,第二个说明系统未识别USB,而且/dev下也没有ttyUSB0或者ttyUSB1,到底肿么回事?请高手帮助?????