From: Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> Subject: Re: Programming for Serial vs. USB Date: 4 Feb 2004 18:04:12 GMT Message-ID: <bvrc6s$lpo$1@nets3.rz.RWTH-Aachen.DE> References: <bvr9ma$cmj$1@news.tdl.com> [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.
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar