LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-20-2013, 10:00 AM   #1
floppy_stuttgart
Member
 
Registered: Nov 2010
Location: Stuttgart, Germany
Distribution: Tiny Core Linux 4.5.6, knoppix 6.7, antixM8.11, partedmagic, slitaz 3.0,PuppyLinux,Ubuntu 10.04
Posts: 524
Blog Entries: 1

Rep: Reputation: 37
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 05:59 AM.
 
Old 08-22-2013, 11:11 AM   #2
rtmistler
Senior Member
 
Registered: Mar 2011
Location: Milford, MA. USA
Distribution: MontaVista, Ubuntu, MINT
Posts: 1,013
Blog Entries: 7

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
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.
Old 08-26-2013, 11:29 AM   #3
floppy_stuttgart
Member
 
Registered: Nov 2010
Location: Stuttgart, Germany
Distribution: Tiny Core Linux 4.5.6, knoppix 6.7, antixM8.11, partedmagic, slitaz 3.0,PuppyLinux,Ubuntu 10.04
Posts: 524
Blog Entries: 1

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by rtmistler View Post
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.
 
Old 08-26-2013, 11:55 AM   #4
rtmistler
Senior Member
 
Registered: Mar 2011
Location: Milford, MA. USA
Distribution: MontaVista, Ubuntu, MINT
Posts: 1,013
Blog Entries: 7

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
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.
 
Old 09-12-2013, 02:55 PM   #5
floppy_stuttgart
Member
 
Registered: Nov 2010
Location: Stuttgart, Germany
Distribution: Tiny Core Linux 4.5.6, knoppix 6.7, antixM8.11, partedmagic, slitaz 3.0,PuppyLinux,Ubuntu 10.04
Posts: 524
Blog Entries: 1

Original Poster
Rep: Reputation: 37
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

Quote:
pppd call huaweiparam
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 03:00 PM.
 
Old 09-13-2013, 04:39 AM   #6
floppy_stuttgart
Member
 
Registered: Nov 2010
Location: Stuttgart, Germany
Distribution: Tiny Core Linux 4.5.6, knoppix 6.7, antixM8.11, partedmagic, slitaz 3.0,PuppyLinux,Ubuntu 10.04
Posts: 524
Blog Entries: 1

Original Poster
Rep: Reputation: 37
I closed that thread because the original subject is closed. I created a new thread with a new question (see previous post).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find out which /dev/ttyUSB* can be used for 3G modem connection? elazarik Linux - Networking 12 02-04-2013 05:02 AM
No /dev/ttyUSB<*> in CentOS 5.4 baig Linux - Newbie 1 03-05-2010 03:02 PM
/dev/ttyUSB* is getting locked shariefbe Linux - Software 1 02-09-2010 10:55 PM
CentOS: No /dev/ttyUSB chris24300 Fedora 4 08-05-2009 12:29 PM
no /dev/ttyUSB* with FC3 please help derddera Fedora 3 12-30-2004 07:43 AM


All times are GMT -5. The time now is 04:16 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration