Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-20-2013, 11:00 AM
|
#1
|
Senior Member
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,177
Rep:
|
USB-GSM: no /dev/ttyUSB can be seen. Why?
Hello,
I am connecting a HUAWEI E220 USB GSM Modem to a board with
insmod ehci-hcd.ko
insmod ohci-hcd.ko
insmod usbserial.ko vendor=0x12d1 product=0x1003
insmod usb_wwan.ko
insmod option.ko
In a first look, the messages seems ok
Code:
[ 61.210249] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 68.054491] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 68.062858] ppc-of-ohci f0001000.usb: OF OHCI
[ 68.068179] ppc-of-ohci f0001000.usb: new USB bus registered, assigned bus number 1
[ 68.077028] ppc-of-ohci f0001000.usb: irq 134, io mem 0xf0001000
[ 68.138746] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
[ 68.145908] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 68.153478] usb usb1: Product: OF OHCI
[ 68.157478] usb usb1: Manufacturer: Linux 3.8.13-rt8--- localversion-rt +++ /dev/null @@ -1 +0,0 @@ --rt9 ohci_hcd
[ 68.168280] usb usb1: SerialNumber: PPC-OF USB
[ 68.176954] hub 1-0:1.0: USB hub found
[ 68.181193] hub 1-0:1.0: 2 ports detected
[ 68.498565] usb 1-1: new full-speed USB device number 2 using ppc-of-ohci
[ 68.645730] usb 1-1: New USB device found, idVendor=12d1, idProduct=1003
[ 68.652861] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 68.660375] usb 1-1: Product: HUAWEI Mobile
[ 68.664822] usb 1-1: Manufacturer: HUAWEI Technologies
[ 96.101489] usbcore: registered new interface driver usbserial
[ 96.109508] usbcore: registered new interface driver usbserial_generic
[ 96.117948] usbserial: USB Serial support registered for generic
[ 96.125189] usbserial_generic 1-1:1.0: The "generic" usb-serial driver is only for testing and one-off prototypes.
[ 96.136050] usbserial_generic 1-1:1.0: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
[ 96.146376] usbserial_generic 1-1:1.0: generic converter detected
[ 96.155209] usb 1-1: generic converter now attached to ttyUSB0
[ 96.161834] usbserial_generic 1-1:1.1: The "generic" usb-serial driver is only for testing and one-off prototypes.
[ 96.172631] usbserial_generic 1-1:1.1: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
[ 96.182881] usbserial_generic 1-1:1.1: generic converter detected
[ 96.194607] usb 1-1: generic converter now attached to ttyUSB1
[ 96.201864] usbserial_generic 1-1:1.2: The "generic" usb-serial driver is only for testing and one-off prototypes.
[ 96.212726] usbserial_generic 1-1:1.2: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
[ 96.222989] usbserial_generic 1-1:1.2: generic converter detected
[ 96.231842] usb 1-1: generic converter now attached to ttyUSB2
[ 112.350968] usbcore: registered new interface driver option
[ 112.358730] usbserial: USB Serial support registered for GSM modem (1-port)
But no /dev/ttyUSBx are present.
Quote:
ls -l /dev/
total 1
crw------- 1 root tty 5, 1 Jun 12 2013 console
crw-rw---- 1 root root 10, 60 Aug 14 1982 cpu_dma_latency
crw-rw---- 1 root root 10, 61 Aug 14 1982 cuse
crw-rw-rw- 1 root root 1, 7 Aug 14 1982 full
crw-rw---- 1 root root 10, 229 Aug 14 1982 fuse
crw-rw---- 1 root root 89, 0 Aug 14 1982 i2c-0
crw-rw---- 1 root root 89, 1 Aug 14 1982 i2c-1
crw-rw---- 1 root root 1, 11 Aug 14 1982 kmsg
lrwxrwxrwx 1 root root 10 May 31 2013 log -> ../tmp/log=
crw-r----- 1 root root 1, 1 Aug 14 1982 mem
brw-rw---- 1 root root 31, 0 Aug 14 1982 mtdblock0
brw-rw---- 1 root root 31, 1 Aug 14 1982 mtdblock1
brw-rw---- 1 root root 31, 2 Aug 14 1982 mtdblock2
brw-rw---- 1 root root 31, 3 Aug 14 1982 mtdblock3
brw-rw---- 1 root root 31, 4 Aug 14 1982 mtdblock4
crw-rw---- 1 root root 10, 59 Aug 14 1982 network_latency
crw-rw---- 1 root root 10, 58 Aug 14 1982 network_throughput
crw-rw-rw- 1 root root 1, 3 Jun 12 2013 null
crw-r----- 1 root root 1, 4 Aug 14 1982 port
crw-rw---- 1 root root 108, 0 Aug 14 1982 ppp
crw-rw-rw- 1 root tty 5, 2 Jun 12 2013 ptmx
drwxr-xr-x 2 root root 0 Jan 1 00:00 pts/
cr--r--r-- 1 root root 1, 8 Jun 12 2013 random
crw-rw---- 1 root root 10, 62 Aug 14 1982 rfkill
lrwxrwxrwx 1 root root 9 Aug 14 1982 root -> mtdblock0
crw-rw---- 1 root root 254, 0 Aug 14 1982 rtc0
crw-rw---- 1 root root 21, 0 Jul 4 1982 sg0
drwxrwxrwx 2 root root 40 Jan 1 00:00 shm/
brw-rw---- 1 root root 11, 0 Jul 4 1982 sr0
crw-rw---- 1 root root 10, 60 Aug 3 1982 tgt
crw-rw-rw- 1 root tty 5, 0 Jun 12 2013 tty
crw--w---- 1 root root 204, 148 Aug 28 2022 ttyPSC0
-rw------- 1 root root 0 Aug 5 1982 ttyS0
cr--r--r-- 1 root root 1, 9 Jun 12 2013 urandom
crw-rw---- 1 root root 10, 63 Aug 14 1982 vga_arbiter
crw-rw-rw- 1 root root 1, 5 Jun 12 2013 zero
|
A start of pppd with
Code:
pppd call huaweiparam
give the expected message
Quote:
pppd: In file /etc/ppp/peers/huaweiparam: unrecognized option '/dev/ttyUSB0'
|
Has somebody an idea what I should do?
Last edited by floppy_stuttgart; 08-22-2013 at 06:59 AM.
|
|
|
08-22-2013, 12:11 PM
|
#2
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,938
|
As root you can do the following:
Code:
/bin/mknod --mode=660 /dev/ttyUSB0 c 166 0
chgrp dialout /dev/ttyUSB0
As to why it didn't show up automatically, check your /etc/device_table file to see if a line like the following is present:
Code:
/dev/ttyUSB c 660 0 5 188 0 0 1 99
|
|
1 members found this post helpful.
|
08-26-2013, 12:29 PM
|
#3
|
Senior Member
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,177
Original Poster
Rep:
|
Quote:
Originally Posted by rtmistler
As to why it didn't show up automatically, check your /etc/device_table file to see if a line like the following is present:
|
which file in /etc/?
All files in my /etc/ directory are
Code:
ls -l /etc/
total 375
drwxrwxr-x 2 root root 0 Jun 7 2013 bash_completion.d/
-rw-rw-r-- 1 root root 514 Jul 30 1982 fstab
-rw-rw-r-- 1 root root 250 May 31 2013 group
-rw-rw-r-- 1 root root 8 Jun 14 2013 hostname
-rw-rw-r-- 1 root root 38 Jun 14 2013 hosts
drwxrwxr-x 2 root root 0 Jul 14 1982 init.d/
-rw-rw-r-- 1 root root 1089 Jun 14 2013 inittab
-rw-rw-r-- 1 root root 1180 May 31 2013 inputrc
drwxr-xr-x 2 root root 0 Jun 7 2013 iproute2/
-rw-rw-r-- 1 root root 23 May 31 2013 issue
-rw-r--r-- 1 root root 64 Jun 14 2013 ld.so.cache
-rw-rw-r-- 1 root root 0 Jun 14 2013 ld.so.conf
drwxrwxr-x 2 root root 0 May 31 2013 ld.so.conf.d/
-rw-r--r-- 1 root root 14867 Jun 7 2013 ltrace.conf
-rw-r--r-- 1 root root 876 Jun 7 2013 mdev.conf
-rw-r--r-- 1 root root 164 Jun 7 2013 memstat.conf
-rw-r--r-- 1 root root 956 Jun 7 2013 mke2fs.conf
-rw-r--r-- 1 root root 242153 Jun 7 2013 moduli
lrwxrwxrwx 1 root root 12 May 31 2013 mtab -> /proc/mounts
drwxrwxr-x 8 root root 0 Jun 14 2013 network/
-rw-rw-r-- 1 root root 439 May 31 2013 nsswitch.conf
-rw-rw-r-- 1 root root 95 Jun 14 2013 os-release
-rw-r--r-- 1 root root 596 Aug 14 1982 passwd
-rw-r--r-- 1 root root 596 May 31 2013 passwd-
-rwxr-xr-x 1 root root 69627 Jun 7 2013 php.ini*
drwxr-xr-x 3 root root 0 Jun 14 2013 ppp/
-rw-rw-r-- 1 root root 1836 May 31 2013 profile
-rw-rw-r-- 1 root root 1191 May 31 2013 protocols
-rw------- 1 root root 512 Jan 1 00:00 random-seed
lrwxrwxrwx 1 root root 18 May 31 2013 resolv.conf -> ../tmp/resolv.conf*
-rw-rw-r-- 1 root root 366 May 31 2013 securetty
drwxrwxr-x 2 root root 0 Jun 7 2013 sensors.d/
-rw-r--r-- 1 root root 10191 Jun 7 2013 sensors3.conf
-rw-rw-r-- 1 root root 10873 May 31 2013 services
-rw------- 1 root root 358 Aug 14 1982 shadow
-rw------- 1 root root 346 Jun 14 2013 shadow-
-rw-r--r-- 1 root root 1555 Jun 7 2013 ssh_config
-rw------- 1 root root 668 Aug 14 1982 ssh_host_dsa_key
-rw-r--r-- 1 root root 590 Aug 14 1982 ssh_host_dsa_key.pub
-rw------- 1 root root 227 Aug 14 1982 ssh_host_ecdsa_key
-rw-r--r-- 1 root root 162 Aug 14 1982 ssh_host_ecdsa_key.pub
-rw------- 1 root root 965 Aug 14 1982 ssh_host_key
-rw-r--r-- 1 root root 630 Aug 14 1982 ssh_host_key.pub
-rw------- 1 root root 1679 Aug 14 1982 ssh_host_rsa_key
-rw-r--r-- 1 root root 382 Aug 14 1982 ssh_host_rsa_key.pub
-rw-r--r-- 1 root root 3516 Jun 7 2013 sshd_config
drwxrwxr-x 5 root root 0 Jun 7 2013 ssl/
-rw------- 1 root root 355 Jul 14 1982 switchicon.conf
-rw-r--r-- 1 root root 169 Jun 14 2013 syslog.conf
-rw-r--r-- 1 root root 142 Jun 14 2013 uniconf.conf
-rw-r--r-- 1 root root 889 Jun 7 2013 usb_modeswitch.conf
-rw------- 1 root root 410 Jul 14 1982 wvdial.conf
I made
Quote:
mknod -m 777 /dev/ttyUSB0 c 188 0
|
and the ttyUSB is there.
I will make
Quote:
chgrp whatevergroup /dev/ttyUSB0
|
another time if necessary.
|
|
|
08-26-2013, 12:55 PM
|
#4
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,938
|
I think newer Linux versions use something different than the device_table, I'm referring to 2.6.31 which is pretty old.
As far as the group, I'd recommend you make the new device node the same owner, group, and permissions as other devices in your /dev tree. For instance /dev/ttyS0, perform an "ls -l" on that and see what it looks like, for instance this is mine; hence why I recommended the dialout group.
Code:
ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Aug 26 09:32 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Aug 26 09:34 /dev/ttyUSB1
crw-rw---- 1 root dialout 188, 2 Aug 26 09:34 /dev/ttyUSB2
And this is mine from my development system, versus my target Linux system:
Code:
ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 2013-08-21 16:17 /dev/ttyUSB0
So they're both owned by root, and both in the dialout group.
I think this is main case because they expect you to be able to talk to a modem. As a result, you're user which uses this resource needs to be included in the dialout group.
I don't try to fight the grain on some of these issues. Perhaps someone with some more knowledge can share why this is still done this way and also relate what's up with newer versions of the kernel and what happened to the device_table in newer kernels.
|
|
|
09-12-2013, 03:55 PM
|
#5
|
Senior Member
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,177
Original Poster
Rep:
|
after creating the /dev/ttyUSB0, 1 and 2, connecting th USB Modem, loading the modules,
dmesg is
Code:
[270524.900953] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[270533.238737] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[270533.246953] ppc-of-ohci f0001000.usb: OF OHCI
[270533.252454] ppc-of-ohci f0001000.usb: new USB bus registered, assigned bus number 1
[270533.261404] ppc-of-ohci f0001000.usb: irq 134, io mem 0xf0001000
[270533.323129] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
[270533.330381] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[270533.338041] usb usb1: Product: OF OHCI
[270533.342131] usb usb1: Manufacturer: Linux 3.8.13-rt8--- localversion-rt +++ /dev/null @@ -1 +0,0 @@ --rt9 ohci_hcd
[270533.353005] usb usb1: SerialNumber: PPC-OF USB
[270533.360926] hub 1-0:1.0: USB hub found
[270533.365255] hub 1-0:1.0: 2 ports detected
[270533.682967] usb 1-1: new full-speed USB device number 2 using ppc-of-ohci
[270533.830114] usb 1-1: New USB device found, idVendor=12d1, idProduct=1003
[270533.837321] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[270533.844895] usb 1-1: Product: HUAWEI Mobile
[270533.849431] usb 1-1: Manufacturer: HUAWEI Technologies
[270543.081697] usbcore: registered new interface driver usbserial
[270543.089715] usbcore: registered new interface driver usbserial_generic
[270543.098337] usbserial: USB Serial support registered for generic
[270543.105638] usbserial_generic 1-1:1.0: The "generic" usb-serial driver is only for testing and one-off prototypes.
[270543.116589] usbserial_generic 1-1:1.0: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
[270543.126940] usbserial_generic 1-1:1.0: generic converter detected
[270543.135644] usb 1-1: generic converter now attached to ttyUSB0
[270567.884301] usbcore: registered new interface driver option
[270567.892161] usbserial: USB Serial support registered for GSM modem (1-port)
adding to syslog.conf daemon.*;local2.* /var/log/pppd.log
touch /var/log/ppplog
killall -HUP syslogd
with following files
Code:
#file etc/ppp/peers/huaweiparam
#lock
defaultroute
noipdefault
debug
usepeerdns
maxfail 5
#idle 0
persist
modem
#for an huaweiE1750 modem /dev/ttyUSB0
#for the icon modem it is /dev/ttyHS5
/dev/ttyHS5
460800
noauth
usehostname
crtscts
user foo
-detach
connect "/etc/ppp/peers/scriptfonic.sh"
Code:
#!/bin/sh
#file etc/ppp/peers/scriptfonic.sh
#make it executable
/usr/local/sbin/chat -v -f /etc/ppp/peers/chatfonicprep
sleep 30
/usr/local/sbin/chat -v -f /etc/ppp/peers/chatfonicconn
#endfile
Code:
#file etc/ppp/peers/chatfonicprep see http://en.wikipedia.org/wiki/Hayes_command_set
SAY "\nInitiating the modem with the PIN..\n"
TIMEOUT 100
ABORT ERROR
#restore factory setups
"" "AT&F"
OK "ATZ"
#OK "AT+CPIN=4088"
OK "AT+CPIN=\0424088\042"
#enable echo = default ATE1
#OK "ATE1"
OK "ATE1V1&D2&C1S0=0"
SAY "\nWaiting 30s to switch between UMTS/GPRS..\n"
Code:
#file etc/ppp/peers/chatfonicconn see http://en.wikipedia.org/wiki/Hayes_command_set
SAY "\nConnecting to the IPN\n"
TIMEOUT 100
ABORT ERROR
ABORT BUSY
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
REPORT CONNECT
#restore factory configuration
"" "AT&F"
OK "ATZ"
#enable echo of command = default
OK "ATE1"
#which networks
"" "AT+COPS?"
#what strength
OK "AT+CSQ"
#OK AT+CGDCONT=1,"IP","pinternet.interkom.de"
OK AT+CGDCONT=1,\042IP\042,\042pinternet.interkom.de\042
OK "ATDT*99#"
CONNECT \c
Errors are there. Why? Any Help is welcome
Code:
Sep 2 16:59:53 rtux-v4 daemon.notice pppd[461]: pppd 2.4.5 started by root, uid 0
Sep 2 16:59:54 rtux-v4 local2.info chat[465]: timeout set to 100 seconds
Sep 2 16:59:54 rtux-v4 local2.info chat[465]: abort on (ERROR)
Sep 2 16:59:54 rtux-v4 local2.info chat[465]: send (AT&F^M)
Sep 2 16:59:54 rtux-v4 local2.info chat[465]: expect (OK)
Sep 2 17:01:34 rtux-v4 local2.info chat[465]: alarm
Sep 2 17:01:34 rtux-v4 local2.info chat[465]: Failed
Sep 2 17:02:04 rtux-v4 local2.info chat[467]: timeout set to 100 seconds
Sep 2 17:02:04 rtux-v4 local2.info chat[467]: abort on (ERROR)
Sep 2 17:02:04 rtux-v4 local2.info chat[467]: abort on (BUSY)
Sep 2 17:02:04 rtux-v4 local2.info chat[467]: abort on (NO CARRIER)
Sep 2 17:02:04 rtux-v4 local2.info chat[467]: abort on (NO DIALTONE)
Sep 2 17:02:04 rtux-v4 local2.info chat[467]: report (CONNECT)
Sep 2 17:02:04 rtux-v4 local2.info chat[467]: send (AT&F^M)
Sep 2 17:02:04 rtux-v4 local2.info chat[467]: expect (OK)
Sep 2 17:03:44 rtux-v4 local2.info chat[467]: alarm
Sep 2 17:03:44 rtux-v4 local2.info chat[467]: Failed
Sep 2 17:03:44 rtux-v4 daemon.debug pppd[461]: Script /etc/ppp/peers/scriptfonic.sh finished (pid 464), status = 0x3
Sep 2 17:03:44 rtux-v4 daemon.err pppd[461]: Connect script failed
Last edited by floppy_stuttgart; 09-12-2013 at 04:00 PM.
|
|
|
09-13-2013, 05:39 AM
|
#6
|
Senior Member
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,177
Original Poster
Rep:
|
I closed that thread because the original subject is closed. I created a new thread with a new question (see previous post).
|
|
|
All times are GMT -5. The time now is 03:11 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|