LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-03-2006, 11:01 AM   #16
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894

Here are some good guides:

http://tldp.org/HOWTO/Serial-Program...WTO/index.html
http://digilander.libero.it/robang/rubrica/serial.htm

More examples can be found by googling.

BTW many devices will not automatically send data over RS-232 until the computer first sends a request.
 
Old 12-03-2006, 12:59 PM   #17
worldgnat
Member
 
Registered: Oct 2004
Posts: 337

Original Poster
Rep: Reputation: 30
Looks good. Will that help me interpret the hex dump, or should I scrap that and just try what's in the guides?

-Peter
 
Old 12-03-2006, 01:01 PM   #18
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
What is in the guides? Hopefully the guilde will help you interpret the hex dump.

Last edited by michaelk; 12-03-2006 at 02:51 PM.
 
Old 12-03-2006, 01:09 PM   #19
worldgnat
Member
 
Registered: Oct 2004
Posts: 337

Original Poster
Rep: Reputation: 30
Great, Thanks. I'll try to post how it's going later.

-Peter
 
Old 12-03-2006, 02:50 PM   #20
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
I still think you are going about this the wrong way. Using a USB monitor will give you the data coming from the device, as well as communication from the USB<>Serial port adapter. In other words, you're getting more data than you really need.

Ignore the USB bus. Let the kernel handle it, since you are using a converter anyways.

You need to figure out the data tansmission settings for the serial port first, then you can write a program that uses the serial port. If you have a system with a serial port, try using it to communicate with your Windows software. Have the Windows system send data, and tweek the serial port settings until you get ledgible data on the other side. If you don't have two computers to work with, download a serial port sniffer (google returned several free versions).
 
Old 12-03-2006, 02:54 PM   #21
worldgnat
Member
 
Registered: Oct 2004
Posts: 337

Original Poster
Rep: Reputation: 30
The problem is that when I use a serial port sniffer on the device, it returns zip. I see the port open and then no data crosses the wire. This was the only data I could get. I agree with you. I'm just not sure what else to do. I'll try to install a serial port on my other box, but I'm not sure if I can.

-Peter
 
Old 12-03-2006, 03:07 PM   #22
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
If you can see it open the port, then you should be able to get enough info on the data transmission settings. This is the information that the serial port needs to communicate with the device (baud, data bits, parity, stop bits - i.e. 9600,8,n,1). Once you have this info, then it gets easier. But without it, you're stabbing in the dark.

Software sniffers shouldn't interfere with the data transmission. They just monitor the data to<>from the serial port, much the same way that a network packet sniffer works.
 
Old 12-03-2006, 03:09 PM   #23
worldgnat
Member
 
Registered: Oct 2004
Posts: 337

Original Poster
Rep: Reputation: 30
OK, sounds good. I'll see what I can find out.

-Peter
 
Old 12-19-2006, 11:35 AM   #24
worldgnat
Member
 
Registered: Oct 2004
Posts: 337

Original Poster
Rep: Reputation: 30
OK, I know it's been a while, but I've been studying for and taking exams. Now I've got some more time. I connected to the serial port with the sniffer, and I got this:

Max Baud Rate: configurable
Data Bits: 5, 6, 7, 8
Stop Bits: 1, 1.5, 2 stop bits
Parity: None, Odd, Even, Mark, space parity
Current Rx Que: 4096 bytes
Capabilities: DTR/DSR, RTS/CTS, RLSD, Parity Check, XON/XOFF, settable XON/XOFF, Total timeouts, Interval time outs.

I don't know how much of this is relevant, but I thought I'd put it all down anyway. Now this is with the device off, because the software seems to snatch the device (it disappears from the list of monitorable devices on the sniffer). Also, the software never closes the serial port, and no data is recorded on the sniffer except the opening of the port and then just 58 (probably should be 58h). Does that mean anything?

-Peter
 
Old 12-20-2006, 02:20 PM   #25
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Unfortunately those are just serial configuration settings and not real helpful. Typical settings are 9600 BAUD, 8 data bits, no parity, and 1 stop bit and hardware flow control.
 
Old 12-20-2006, 05:05 PM   #26
worldgnat
Member
 
Registered: Oct 2004
Posts: 337

Original Poster
Rep: Reputation: 30
Any ideas why I can't get data from the device when the software's working with it?

-Peter
 
Old 12-26-2006, 08:01 PM   #27
worldgnat
Member
 
Registered: Oct 2004
Posts: 337

Original Poster
Rep: Reputation: 30
OK, does anyone know where I can go from here? I'm a little lost. I found a tutorial here there seems pretty good for USB drivers. I'm thinking about setting up a small Gentoo partition so I can mess with usb-skeleton.c to familiarize myself with the whole kernel... thing. Yes? No?

-Peter
 
  


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
LXer: Writing device drivers in Linux: A brief tutorial LXer Syndicated Linux News 0 04-26-2006 03:21 PM
Writing Linux Device Drivers pr@vn_t Programming 3 08-22-2005 08:52 PM
writing device drivers jessy jane Linux - Newbie 2 11-04-2004 12:25 AM
writing a loopback device ebh1 Linux - Newbie 2 03-12-2004 05:12 PM
writing device dummyagain Programming 2 10-18-2003 04:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:36 PM.

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