LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-11-2006, 10:42 PM   #1
OralDeckard
Member
 
Registered: Mar 2006
Posts: 140

Rep: Reputation: 15
Unhappy How do I define ttyUSB0 ?


I entered:
# mknod /dev/ttyUSB0 c 188 0
# mknod /dev/ttyUSB1 c 188 1

and got ttyUSB0 and ttyUSB1 in my /dev folder.

But when I try using them I get:
Failed to open /dev/ttyUSB0: No such device

What am I doing wrong, and how might I do it better ?
 
Old 03-12-2006, 02:11 AM   #2
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Presumably you are using a USB-to-RS232 converter, correct? In that case you need to load the appropriate driver module for that adaptor. What brand is it?
 
Old 03-12-2006, 03:33 AM   #3
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
What exactly are you trying to accomplish by creating those device files. Maybe there is a more direct/easier way to go about it.
 
Old 03-12-2006, 07:58 AM   #4
OralDeckard
Member
 
Registered: Mar 2006
Posts: 140

Original Poster
Rep: Reputation: 15
Thank you very much.

What I am trying to do is set up Linux to work with a Verizon Wireless card (PC5740). I have chased my tail searching the web for a solution, and the closest I could come was a HOWTO, the URL of which I posted and had everything I just entered wiped out to explain to me that I can't post URLs until I have made 5 posts :O

The relevant portion is this:
If you are running devfs, the device file system, the character special devices /dev/usb/tts/0 and /dev/usb/tts/1 should now exist. Otherwise you should make the appropriate nodes if they don't already exist:

# mknod /dev/ttyUSB0 c 188 0
# mknod /dev/ttyUSB1 c 188 1

Configuring PPPD
The next step is to set up the Linux PPP daemon pppd. Create the file /etc/ppp/peers/1xevdo with these contents:

-detach
ttyUSB0
115200
debug
noauth
defaultroute
usepeerdns
user your_telephone_number@vzw3g.com
show-password
crtscts
lock
connect '/usr/sbin/chat -v -t3 -f /etc/ppp/peers/1xevdo_chat'

Replace your_telephone_number with your 10-digit Verizon-assigned telephone number that you received with your 5220 card.

Create /etc/ppp/peers/1xevdo_chat with these contents:

'' 'AT'
'OK' 'ATE0V1&F&D2&C1&C2S0=0'
'OK' 'ATE0V1'
'OK' 'ATS7=60'
'OK' 'ATDT#777'

Finally, append this line to /etc/ppp/pap-secrets:

your_telephone_number@vzw3g.com * vzw

again replacing your_telephone_number with the 10-digit telephone number of your 5220 card. (Why an Internet device that cannot make voice calls should require a telephone number is beyond me.)

Just in case it wasn't obvious, we created a PPP dialup account that can be reached by dialing #777 (#PPP) over /dev/ttyUSB0. Your PPP login name is your 10-digit phone number followed by @vzw3g.com and your password is simply vzw.
Trying it all out
You should now be ready to bring up the link. Run the following command:

sudo pppd call 1xevdo

If you succeed in setting up the link, you will see something like this:

$ sudo pppd call 1xevdo
Perms of /dev/ttyUSB0 are ok, no 'mesg n' neccesary.
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 ]
sent [LCP ConfReq id=0x1 ]
rcvd [LCP ConfReq id=0x0 ]
sent [LCP ConfAck id=0x0 ]
rcvd [LCP ConfReq id=0x1 ]
sent [LCP ConfAck id=0x1 ]
sent [LCP ConfReq id=0x1 ]
rcvd [LCP ConfAck id=0x1 ]
sent [LCP EchoReq id=0x0 magic=0xc57d039a]
sent [CCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
rcvd [LCP DiscReq id=0x2 magic=0x32250cdb]
rcvd [LCP EchoRep id=0x0 magic=0x32250cdb c5 7d 03 9a]
rcvd [LCP ProtRej id=0x4 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
rcvd [IPCP ConfReq id=0x3 ]
sent [IPCP ConfAck id=0x3 ]
rcvd [IPCP ConfRej id=0x1 ]
sent [IPCP ConfReq id=0x2 ]
rcvd [IPCP ConfNak id=0x2 ]
sent [IPCP ConfReq id=0x3 ]
rcvd [IPCP ConfAck id=0x3 ]
not replacing default route to eth0 [129.46.76.1]
Cannot determine ethernet address for proxy ARP
local IP address 166.154.180.95
remote IP address 66.174.32.27
primary DNS address 66.174.6.7
secondary DNS address 66.174.3.7
Script /etc/ppp/ip-up started (pid 3416)
Script /etc/ppp/ip-up finished (pid 3416), status = 0x0

Because of the -detach flag in /etc/ppp/peers/1xevdo, debug messages will continue to appear in this window.
----------------------------------------------------------------

Obviously I didn't get far enough to give the -detach flag anything to work with. It failed on the first statementin 1xevdo, the ttyUSB0, saying that it did not exist, even though I verified that it was created in /dev.
 
Old 03-12-2006, 09:31 AM   #5
OralDeckard
Member
 
Registered: Mar 2006
Posts: 140

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by adz
Presumably you are using a USB-to-RS232 converter, correct? In that case you need to load the appropriate driver module for that adaptor. What brand is it?
Yes, I guess I should have mentioned my driver. Below is the relevant part pertaining to the driver:
------------------------------------
Installing the Serial Driver
The Qualcomm MSM chip inside the 5220 emulates two serial ports over its USB interface. Unfortunately, the device does not seem to advertise itself as a generic modem or serial port, so we must specify the vendor and product IDs to the Linux USB serial driver so it will recognize it. This can be done with command-line parameters when the module is installed. This command will immediately install it into your running kernel:

# modprobe usbserial vendor=0xf3d product=0x0112

and appending this line to /etc/modules will cause it to be automatically (re)loaded the next time you reboot:

usbserial vendor=0xf3d product=0x0112

Verify that the usbserial driver found the MSM by looking at /var/log/messages or the output of the dmesg command. It should look something like this:

usb.c: registered new driver serial
usbserial.c: USB Serial support registered for Generic
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
usb.c: serial driver claimed interface c55f9a20
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB1 (or usb/tts/1 for devfs)
usb.c: serial driver claimed interface c55f9a38
usbserial.c: USB Serial Driver core v1.4

If you are running devfs, the device file system, the character special devices /dev/usb/tts/0 and /dev/usb/tts/1 should now exist. Otherwise you should make the appropriate nodes if they don't already exist:

# mknod /dev/ttyUSB0 c 188 0
# mknod /dev/ttyUSB1 c 188 1

Configuring PPPD
The next step is to set up the Linux PPP daemon pppd. Create the file /etc/ppp/peers/1xevdo with these contents:

-detach
ttyUSB0
------------------------------------

The modprobe command produced a warning:
WARNING: line 4: ignoring bad line starting with 'modprobe'
linux:~ #

but I have the same statement in /etc/modules, so wheter it got it from the modprobe or from /etc/modules it does show up in the dmesg | grep usb
 
Old 03-13-2006, 09:13 AM   #6
brianabroad
LQ Newbie
 
Registered: Aug 2003
Location: Taiwan, US
Posts: 17

Rep: Reputation: 0
Activate it first...

> The modprobe command produced a warning:
> WARNING: line 4: ignoring bad line starting with 'modprobe'
> linux:~ #

Sorry I can't help you with your driver issues. But I wanted to make sure your card was already activated. I'm not sure if you're able to activate your card from Linux. You might want to make sure you activate it from a Windows computer with the Verizon software that they give with the card. Once it's activated, put it into your Linux box to use it.

Note that the 5740 doesn't have external antenna capability, so your reception won't be quite as good.

I think there are also some directions on the StompBox website that may interest you. However, if you add up all the parts that they use - it can be quite expensive, not including the time that you'll put in.

Companies like Omniwav Mobile (http://www.omniwav.com) make cellular routers with WiFi access points - these are great in your car (with a laptop). I think these boxes may use Linux as well, but it's all done for you!

Good luck with your project; don't forget to activate the card first!
 
Old 03-14-2006, 11:50 AM   #7
OralDeckard
Member
 
Registered: Mar 2006
Posts: 140

Original Poster
Rep: Reputation: 15
Thank you for your reply. It has been running fine in Windows for quite a while, and is therefore activated. I just can't get it to work in Linux. I have gotten Linux to recognize it. It is ttyACM0. Its just that when I try to connect it replys "connection failed." Therefore I believe it is a problem with my chat file.
 
Old 04-06-2006, 02:02 AM   #8
glsen_az
Member
 
Registered: Oct 2003
Location: Tucson, AZ
Distribution: XUbuntu 12.10, IPFire
Posts: 32

Rep: Reputation: 23
USB device sync help -- joy!

I have been unable to synch up a Palm Pilot IIIxe (yes, it's ancient, but works!) with SuSE 10 via a AirLink101 Serial-to-USB convertor. I find that SuSE creates the /dev/ttyUSB0 location and usbserial is inserted automatically when I plug the USB cable end in -- sweet! After much yanking of hair, the KPilot (and Kontact) work when I run them as root, not as my user. Meaning: the /dev/ttyUSB0 is not writable by anyone but root.
So, open up a console, su - and give root's password, do a which kpilot command, type kpilot and after a few moments the application opens. Press the HotSync button on the Palm and Kpilot starts talking to the Palm Pilot.
I write this in the hope that using root will give you access to your device. Good luck!

-*-Bill
 
Old 05-03-2006, 10:37 PM   #9
COB
LQ Newbie
 
Registered: May 2006
Posts: 1

Rep: Reputation: 0
I have a dual boot computer that I set up myself. Windows XP Home and LinSpire on different drives. I am totally new to Linux. My Verizon PC 5740 card works fine in Windows XP. However it is not recognized by LinSpire. I could use some plain and simploe directions if anyone knows a fix. Many Thanks
 
Old 05-03-2006, 10:51 PM   #10
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Quote:
The modprobe command produced a warning:
WARNING: line 4: ignoring bad line starting with 'modprobe'
linux:~ #
You didn't put the word "modprobe" into /etc/modules did you? You're not meant to. If you are trying to load the driver module from the command line, you would type modprobe usbserial vendor=0xf3d product=0x0112 as instructed. But if you're putting it in /etc/modules you would omit the "modprobe" bit.
 
  


Reply



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
ttyUSB0 an pl2303 H2O-linux Slackware 3 12-08-2004 05:30 PM
/dev/ttyUSB0 and permissions mrsolo Linux - Software 1 11-14-2004 03:24 PM
serial to USB, trying to read from /dev/ttyUSB0 in C code newguy21 Programming 1 09-29-2004 01:11 PM
Mandrake 9.2 - Recognition of ttyUSB0 ron_hickson Mandriva 3 05-13-2004 04:00 PM
/dev/ttyUSB0 js72 Linux - Networking 1 01-05-2003 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:40 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration