Editing in progress: most of what was here; now moved to Post # 2: (Thur . Feb . 24 . 2011)
How to flip USB Modems and modprobe manually + Adding the rules to etc /udev/rules.d And Testing the connection
Note: [7 feb 2011] this post will be replaced by a one off script , : the script will encompass most of what listed
need to copy and save parts : do so now:
REMEMBER ALL THESE ARE EXAMPLES : SUBSTITUTE THE device ID's in the examples WITH the ID's of YOUR device : (as they say you have been warned)
to see which modules are been used or loading at runtime use the "lsmod" command from the terminal
to check if device supported , find the name of driver to the device depends ,
example of devices with option driver
check with the ID's from the lsusb command
Search your system to ensure the "modem-modeswitch" is in the "/lib/udev" directory , you will need this for the last part of this post ,IE :to set the udev/rules.d
if the serial drivers have not loaded or the device has not registered as a modem try the following
Code:
ls -al /dev/serial/by-id/usb*
if it comes up with an error try
Find the Mass Storage of the device
Code:
ls -al /dev/disk/by-id/usb*Mass_Storage*
or
Code:
ls -al /dev/disk/by-id/usb*Storage*
example reply
/dev/disk/by-id/usb-HUAWEI_Mass_Storage-0:0 -> ../../
sr2
Eject the device
wait for the device to settle
example reply:
Bus 001 Device 007: ID
12d1:
1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E270 HSDPA/HSUPA Modem
Note some devices will show the same ID's as when not flipped : as the above listed device: With devices that show the same ID's always double check that the eject command has been sent , if this is not done the drivers may not load:Although the CD TRAY does makes a handy coffee cup Holder
.................................................. ..........................
For GSM :Check to see if the option drivers will load for the device:
Also If you have a problematic devices and the below command "sudo modprobe option" works then make a start-up script for the dialler to include the command
Code:
sudo modprobe option
.................................................. ..........................
check your logfile viewer / messages . you may see something like
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
option 1-9:1.0: GSM modem (1-port) converter detected
usb 1-9: GSM modem (1-port) converter now attached to ttyUSB0
option 1-9:1.1: GSM modem (1-port) converter detected
usb 1-9: GSM modem (1-port) converter now attached to ttyUSB1
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
.................................................. ..........................
For CDMA :Check to see if the ACM drivers will load for the device:
Code:
sudo modprobe cdc-acm
.................................................. ..........................
For other drivers examine files
lib/modules/kernel version/kernel/drivers/usb/serial
lib/modules/kernel version/kernel/drivers/usb/class
lib/modules/kernel version /kernel/drivers/net/usb
.................................................. ..........................
Question:
Sometimes my device is recognized on the system , and sometimes not
Answer :
Sometime it occurs if the device was plugged in at boot and then later inserted after a boot: also notable if switching between windows and Linux
Do The Above procedure . Remember to connect the device after boot
Question:
my device is recognized on the system but the Network Manager can't find it , or will not connect
Answer:
this can occur if the device was plugged in at boot , the result been the device has automatically booted in and connected through the pppd
Kill the pppd daemon
Remember to connect the device after boot
Modem-Modeswitch :
setting the udev rules.d
Please read: now obsolete, Modem-modeswitch for providing similar services only for a limited subset of devices Usb_ModeSwitch does.
May be totally depreciated in Ubuntu 10.10.
depreciated: rules now removed (as of above date)
Can also suggest keep up date with latest news as regards HAL and UDEV , could be someday Hal nomore :
Note: for those looking Toward HAL to find ,Device info, May find ALL info is listing, as to the device Capabilities, can try Sakis3g, to update HAL, look through the MENU options
Sakis3g will still work in the absence of HAL ( says he , I think)
use the lsusb command to find the device details
ZTE devices:Example
Code:
sudo gedit /etc/udev/rules.d/zte_eject.rules
add the following line(edit the SYSFS{idVendor}=="ID", SYSFS{idProduct}=="ID" according to device
Code:
SYSFS{idVendor}=="19d2", SYSFS{idProduct}=="0103", RUN+="/usr/bin/eject %k", OPTIONS+="last_rule"
The first Error I made was to copy an example that did not end with ".rules" .
Notes:
use of the "ls -al /dev/serial/by-id/usb*" lists the orientation of the tty ports
Incorrect switching: Example
The ports have reversed ,although the log file messages shows them in sequence
The results in the network manager etc will be unable to connect
/dev/serial/by-id/usb-HUAWEI_Technology_HUAWEI_Mobile-if00-port0 -> ../../ttyUSB1
/dev/serial/by-id/usb-HUAWEI_Technology_HUAWEI_Mobile-if01-port0 -> ../../ttyUSB0
option 1-10:1.1: GSM modem (1-port) converter detected
usb 1-10: GSM modem (1-port) converter now attached to ttyUSB0
option 1-10:1.0: GSM modem (1-port) converter detected
usb 1-10: GSM modem (1-port) converter now attached to ttyUSB1
Correct switching:
/dev/serial/by-id/usb-HUAWEI_Technology_HUAWEI_Mobile-if00-port0 -> ../../ttyUSB0
/dev/serial/by-id/usb-HUAWEI_Technology_HUAWEI_Mobile-if01-port0 -> ../../ttyUSB1
you can also monitor the device with the lsusb -t command [ note the changes]
If the device is listing incorrectly and Still recognized (try to resolve the issue ) if a resolve can't be found and the Network Manager is failing to connect Fix: Use Alternate Method of dial up where you can choose the ttyport, you will have to test each port ( report bug to Network Manager RE modem manager , {can be checked be testing the CTS,DCD and DSR lines of the serial port} )
~~~~~~~~~~~~~~~~~~~~~
Statserial:
using statserial to check the status line of your modem
Examples:
Code:
statserial /dev/ttyUSB1
response
Device: /dev/ttyUSB1
Signal Pin Pin Direction Status Full
Name (25) (9) (computer) Name
----- --- --- --------- ------ -----
FG 1 - - - Frame Ground
TxD 2 3 out - Transmit Data
RxD 3 2 in - Receive Data
RTS 4 7 out 1 Request To Send
CTS 5 8 in 0 Clear To Send
DSR 6 6 in 0 Data Set Ready
GND 7 5 - - Signal Ground
DCD 8 1 in 0 Data Carrier Detect
DTR 20 4 out 1 Data Terminal Ready
RI 22 9 in 0 Ring Indicator
Code:
statserial /dev/ttyUSB2
response : Note this out put Indicates it could be the modem
Device: /dev/ttyUSB2
Signal Pin Pin Direction Status Full
Name (25) (9) (computer) Name
----- --- --- --------- ------ -----
FG 1 - - - Frame Ground
TxD 2 3 out - Transmit Data
RxD 3 2 in - Receive Data
RTS 4 7 out 1 Request To Send
CTS 5 8 in 1 Clear To Send
DSR 6 6 in 1 Data Set Ready
GND 7 5 - - Signal Ground
DCD 8 1 in 1 Data Carrier Detect
DTR 20 4 out 1 Data Terminal Ready
RI 22 9 in 0 Ring Indicator
Test the modem : Even if the statserial does not show output as above/ testing each ttyport : Can only assume modem has been Pre-Probed and left in a state where these lines have been suspended
:::: rest removed
Bookmarks