Re: Programming for Serial vs. USB
From: Hans-Bernhard Broeker (broeker_at_physik.rwth-aachen.de)
Date: 02/04/04
- Next message: Justin Robbs: "Re: Programming for Serial vs. USB"
- Previous message: Justin Robbs: "Programming for Serial vs. USB"
- In reply to: Justin Robbs: "Programming for Serial vs. USB"
- Next in thread: Justin Robbs: "Re: Programming for Serial vs. USB"
- Reply: Justin Robbs: "Re: Programming for Serial vs. USB"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 4 Feb 2004 18:04:12 GMT
[Note: Missing cut-down of F'up2 done...]
In comp.unix.programmer Justin Robbs <justin_robbsNO@spamhotmail.com> wrote:
> We have a point of sale system that communicates to a number of
> serial devices (upc scanner, cash drawer, customer display, credit
> card/check reader, etc.). Currently, we are using a digiboard 8
> port serial board to communicate to those devices. We access them
> as /dev/tty2a...h. Assuming we could get the devices with usb
> interfaces, how difficult would it be to start using a usb
> interface?
Not exceedingly difficult, but you will have to make substantial
modifications to the code. USB is quite a bit more than just a RS232
serial line on steroids. There's a whole stack of protocols that
comes with the raw hardware.
For starters, USB devices may not even necessarily have a device node
assigned to each of them. For that, there has to be a specialized
host-side driver to speak to interpret the data going over the USB
link. For USB-to-whatever port adapters, those will be part of your
Unix kernel with minimal luck, but not for more generic devices.
> weren't available with a usb interface, would it be possible
> (acceptable) to use a usb to serial adapter in the situation?
If you want to keep it simple, that may actually be the best bet you
have. Beware, though: not all USB-to-serial adapters support all the
little details of serial ports. Any requirement that goes beyond Rxd,
Txd, and the basic hardware handshake lines depends on sheer luck, it
seems.
> For the purposes of this discussion, I am assuming that the usb
> devices send/recv the data in the same format as the standard
> serial versions.
I wouldn't bet on that. Not without having accessed at least some
applicable devices' datasheets.
-- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.
- Next message: Justin Robbs: "Re: Programming for Serial vs. USB"
- Previous message: Justin Robbs: "Programming for Serial vs. USB"
- In reply to: Justin Robbs: "Programming for Serial vs. USB"
- Next in thread: Justin Robbs: "Re: Programming for Serial vs. USB"
- Reply: Justin Robbs: "Re: Programming for Serial vs. USB"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|