Re: Data from a serial port
On 10/05/2014 10:36 PM, Marty wrote: On 10/05/2014 03:50 PM, Ethan Rosenberg wrote: root@meow:/home/ethan# chown ethan /dev/ttyS0 root@meow:/home/ethan# ls -l /dev/ttyS0 crw-rw 1 ethan dialout 4, 64 Oct 4 23:00 /dev/ttyS0 root@meow:/home/ethan# $cat /dev/ttyS0|tee -a scale.txt bash: /dev/ttyS0: Permission denied # adduser ethan dialout then log out and log back in It works. Thanks -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54333950.2060...@hygeiabiomedical.com
Re: Data from a serial port
On 10/05/2014 10:36 PM, Marty wrote: cat /dev/ttyS0|tee -a scale.txt Excellent. Works!! Now, how do I read the contents of scale.txt? TIA Ethan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54321069.8040...@hygeiabiomedical.com
Re: Data from a serial port
On 10/05/2014 03:50 PM, Ethan Rosenberg wrote: root@meow:/home/ethan# chown ethan /dev/ttyS0 root@meow:/home/ethan# ls -l /dev/ttyS0 crw-rw 1 ethan dialout 4, 64 Oct 4 23:00 /dev/ttyS0 root@meow:/home/ethan# $cat /dev/ttyS0|tee -a scale.txt bash: /dev/ttyS0: Permission denied # adduser ethan dialout then log out and log back in -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54320022.2040...@ix.netcom.com
Re: Data from a serial port
On 10/04/2014 12:56 AM, Joel Rees wrote: On Sat, Oct 4, 2014 at 11:05 AM, Jerry Stuckle wrote: On 10/3/2014 9:52 PM, Joel Rees wrote: On Sat, Oct 4, 2014 at 9:54 AM, Jerry Stuckle wrote: On 10/3/2014 8:19 PM, Joel Rees wrote: On Sat, Oct 4, 2014 at 5:52 AM, Jerry Stuckle wrote: On 10/2/2014 8:24 PM, Ethan Rosenberg wrote: [...] In addition to Dan's comments - is your cable OK? Do you need a straight-through cable or a cross-over cable? Does the terminal require/honor DSR/TSR and RTS/CTS? If so, are these lines active? You may need a breakout box on the cable to see what's happening on the lines. If, for some reason, you can't get a breakout box, you may be able to do basic tests on the cable with a multimeter (ohm-meter or connectivity function), the pin diagrams, some patience, and maybe an extra pair of hands (if you can't find small-mouth alligator clips or pin clips). Just don't tell whoever handles requisitions/budget unless they understand that patience costs time and money when doing things like this. You have to be really careful to keep the leads from slipping, and not noticing a slipped lead can cost hours of unnecessary work.And there are tests you really don't want to try without a breakout box or the equivalent. Why couldn't he? They're cheap, i.e. http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_14285_-1. Note if he's using DB9 connectors he would need a pair of DB9-DB25 connectors. But they are also cheap. Uhm, maybe he has a multimeter now, and doesn't want to wait for overnight shipping or take the time to run down to a supply house downtown or even wait for said supply house to do a same-day delivery. Or maybe finances at the company are really, really tight right at the moment. Now, of course, if the supply house is next door, and his company is okay with people bringing in tools paid for out-of-pocket, going and getting it would be a good excuse to take a half-hour break anyway (assuming no lines at the supply house). My point was simply that connectivity checks don't need a breakout box. Breakout boxes do make them more convenient, and quicker, and give more reliable results. Not to mention enabling more in-depth testing, especially if you have an oscilloscope with data capture. I'm not arguing with you on this one, Jerry, I was just offering an alternative. Not a great alternative, but maybe a useful one. If his company cannot afford $9.95 + shipping for a breakout box, then that company is in deep crap anyway. That's not the only possibility I mentioned, but I have worked for such companies in the past. (Twice.) Whether my reasons for not bailing immediately were valid or not is not something I care to dredge up. Come to think of it, I have also worked for companies where requisitions seemed to be on greased rails, and found out the hard way the problems you can buy yourself when you get lots of tools you don't know how to use. And if he's a consultant and can't afford the basic tools to do his job, he shouldn't be in the business. And he's already worked on this much more than overnight (or even second-day) delivery would have caused a delay. And maybe he would rather order a breakout box now, but still spend fifteen minutes doing things the hard way, so that when the breakout box comes he can be pretty confident about which end of the cable he wants to hang it on to start with, and what extra test data he wants to try to push down the pipe. An oscilloscope (with or without data capture) is much more expensive, and still can't monitor all of the lines concurrently - at least unless you have an 8 channel scope (*very expensive*). And a multimeter will work for one wire at a time - if you have access to the lines. And having a breakout box (or two, even) can help make the signals available if he decides he wants to look at waveforms. Even a single channel with trigger will allow you to get a llook at a byte of data going one direction, or watch a handshake line that you might suspect of being intermittent or having impedance problems. Or check that when you tell the system to use handshake, it really does. But, yeah, four or eight channels is really convenient, saves a lot of time and crossed eyeballs and scratching your head when you have to do this kind of stuff regularly. Not to mention much time it saves to be able to store a sample. But if he has molded plugs and no access to the interior connections of the terminal or the computer, neither a multimeter nor an oscilloscope will be any good. But then again, maybe he has a connector that he has popped out of the shell for just this purpose. (Although that is essentially making a poor-man's breakout box, and, considering the cost of a simple breakout box and the speed of shipping, is probably a waste of time. Unless he decides he needs something to keep his hands busy while he takes a break, or unless he just wants to play with the tools.) Or maybe he is not abov
Re: Data from a serial port
On Sat, Oct 4, 2014 at 11:05 AM, Jerry Stuckle wrote: > On 10/3/2014 9:52 PM, Joel Rees wrote: >> On Sat, Oct 4, 2014 at 9:54 AM, Jerry Stuckle wrote: >>> On 10/3/2014 8:19 PM, Joel Rees wrote: On Sat, Oct 4, 2014 at 5:52 AM, Jerry Stuckle wrote: > On 10/2/2014 8:24 PM, Ethan Rosenberg wrote: >> [...] > > In addition to Dan's comments - is your cable OK? Do you need a > straight-through cable or a cross-over cable? Does the terminal > require/honor DSR/TSR and RTS/CTS? If so, are these lines active? > > You may need a breakout box on the cable to see what's happening on the > lines. If, for some reason, you can't get a breakout box, you may be able to do basic tests on the cable with a multimeter (ohm-meter or connectivity function), the pin diagrams, some patience, and maybe an extra pair of hands (if you can't find small-mouth alligator clips or pin clips). Just don't tell whoever handles requisitions/budget unless they understand that patience costs time and money when doing things like this. You have to be really careful to keep the leads from slipping, and not noticing a slipped lead can cost hours of unnecessary work.And there are tests you really don't want to try without a breakout box or the equivalent. >>> >>> Why couldn't he? They're cheap, i.e. >>> http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_14285_-1. >>> >>> Note if he's using DB9 connectors he would need a pair of DB9-DB25 >>> connectors. But they are also cheap. >> >> Uhm, maybe he has a multimeter now, and doesn't want to wait for >> overnight shipping or take the time to run down to a supply house >> downtown or even wait for said supply house to do a same-day delivery. >> >> Or maybe finances at the company are really, really tight right at the >> moment. >> >> Now, of course, if the supply house is next door, and his company is >> okay with people bringing in tools paid for out-of-pocket, going and >> getting it would be a good excuse to take a half-hour break anyway >> (assuming no lines at the supply house). >> >> My point was simply that connectivity checks don't need a breakout box. >> >> Breakout boxes do make them more convenient, and quicker, and give >> more reliable results. Not to mention enabling more in-depth testing, >> especially if you have an oscilloscope with data capture. >> >> I'm not arguing with you on this one, Jerry, I was just offering an >> alternative. Not a great alternative, but maybe a useful one. >> > > If his company cannot afford $9.95 + shipping for a breakout box, then > that company is in deep crap anyway. That's not the only possibility I mentioned, but I have worked for such companies in the past. (Twice.) Whether my reasons for not bailing immediately were valid or not is not something I care to dredge up. Come to think of it, I have also worked for companies where requisitions seemed to be on greased rails, and found out the hard way the problems you can buy yourself when you get lots of tools you don't know how to use. > And if he's a consultant and can't > afford the basic tools to do his job, he shouldn't be in the business. > And he's already worked on this much more than overnight (or even > second-day) delivery would have caused a delay. And maybe he would rather order a breakout box now, but still spend fifteen minutes doing things the hard way, so that when the breakout box comes he can be pretty confident about which end of the cable he wants to hang it on to start with, and what extra test data he wants to try to push down the pipe. > An oscilloscope (with or without data capture) is much more expensive, > and still can't monitor all of the lines concurrently - at least unless > you have an 8 channel scope (*very expensive*). And a multimeter will > work for one wire at a time - if you have access to the lines. And having a breakout box (or two, even) can help make the signals available if he decides he wants to look at waveforms. Even a single channel with trigger will allow you to get a llook at a byte of data going one direction, or watch a handshake line that you might suspect of being intermittent or having impedance problems. Or check that when you tell the system to use handshake, it really does. But, yeah, four or eight channels is really convenient, saves a lot of time and crossed eyeballs and scratching your head when you have to do this kind of stuff regularly. Not to mention much time it saves to be able to store a sample. > But if > he has molded plugs and no access to the interior connections of the > terminal or the computer, neither a multimeter nor an oscilloscope will > be any good. But then again, maybe he has a connector that he has popped out of the shell for just this purpose. (Although that is essentially making a poor-man's breakout box, and, considering the cost of a simple breakout box and the speed of shipping, is p
Re: Data from a serial port
On 10/3/2014 9:52 PM, Joel Rees wrote: > On Sat, Oct 4, 2014 at 9:54 AM, Jerry Stuckle wrote: >> On 10/3/2014 8:19 PM, Joel Rees wrote: >>> On Sat, Oct 4, 2014 at 5:52 AM, Jerry Stuckle >>> wrote: On 10/2/2014 8:24 PM, Ethan Rosenberg wrote: > [...] In addition to Dan's comments - is your cable OK? Do you need a straight-through cable or a cross-over cable? Does the terminal require/honor DSR/TSR and RTS/CTS? If so, are these lines active? You may need a breakout box on the cable to see what's happening on the lines. >>> >>> If, for some reason, you can't get a breakout box, you may be able to >>> do basic tests on the cable with a multimeter (ohm-meter or >>> connectivity function), the pin diagrams, some patience, and maybe an >>> extra pair of hands (if you can't find small-mouth alligator clips or >>> pin clips). Just don't tell whoever handles requisitions/budget unless >>> they understand that patience costs time and money when doing things >>> like this. You have to be really careful to keep the leads from >>> slipping, and not noticing a slipped lead can cost hours of >>> unnecessary work.And there are tests you really don't want to try >>> without a breakout box or the equivalent. >>> >> >> Why couldn't he? They're cheap, i.e. >> http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_14285_-1. >> >> Note if he's using DB9 connectors he would need a pair of DB9-DB25 >> connectors. But they are also cheap. > > Uhm, maybe he has a multimeter now, and doesn't want to wait for > overnight shipping or take the time to run down to a supply house > downtown or even wait for said supply house to do a same-day delivery. > > Or maybe finances at the company are really, really tight right at the moment. > > Now, of course, if the supply house is next door, and his company is > okay with people bringing in tools paid for out-of-pocket, going and > getting it would be a good excuse to take a half-hour break anyway > (assuming no lines at the supply house). > > My point was simply that connectivity checks don't need a breakout box. > > Breakout boxes do make them more convenient, and quicker, and give > more reliable results. Not to mention enabling more in-depth testing, > especially if you have an oscilloscope with data capture. > > I'm not arguing with you on this one, Jerry, I was just offering an > alternative. Not a great alternative, but maybe a useful one. > If his company cannot afford $9.95 + shipping for a breakout box, then that company is in deep crap anyway. And if he's a consultant and can't afford the basic tools to do his job, he shouldn't be in the business. And he's already worked on this much more than overnight (or even second-day) delivery would have caused a delay. An oscilloscope (with or without data capture) is much more expensive, and still can't monitor all of the lines concurrently - at least unless you have an 8 channel scope (*very expensive*). And a multimeter will work for one wire at a time - if you have access to the lines. But if he has molded plugs and no access to the interior connections of the terminal or the computer, neither a multimeter nor an oscilloscope will be any good. It's all about having the *right tools* to do the job. In this case the right tool is inexpensive and easily obtainable. P.S. As I've told you before - there is no need to copy me. I am subscribed to the mailing list. Jerry Jerry -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/542f55cd.8090...@attglobal.net
Re: Data from a serial port
On Sat, Oct 4, 2014 at 9:54 AM, Jerry Stuckle wrote: > On 10/3/2014 8:19 PM, Joel Rees wrote: >> On Sat, Oct 4, 2014 at 5:52 AM, Jerry Stuckle wrote: >>> On 10/2/2014 8:24 PM, Ethan Rosenberg wrote: [...] >>> >>> In addition to Dan's comments - is your cable OK? Do you need a >>> straight-through cable or a cross-over cable? Does the terminal >>> require/honor DSR/TSR and RTS/CTS? If so, are these lines active? >>> >>> You may need a breakout box on the cable to see what's happening on the >>> lines. >> >> If, for some reason, you can't get a breakout box, you may be able to >> do basic tests on the cable with a multimeter (ohm-meter or >> connectivity function), the pin diagrams, some patience, and maybe an >> extra pair of hands (if you can't find small-mouth alligator clips or >> pin clips). Just don't tell whoever handles requisitions/budget unless >> they understand that patience costs time and money when doing things >> like this. You have to be really careful to keep the leads from >> slipping, and not noticing a slipped lead can cost hours of >> unnecessary work.And there are tests you really don't want to try >> without a breakout box or the equivalent. >> > > Why couldn't he? They're cheap, i.e. > http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_14285_-1. > > Note if he's using DB9 connectors he would need a pair of DB9-DB25 > connectors. But they are also cheap. Uhm, maybe he has a multimeter now, and doesn't want to wait for overnight shipping or take the time to run down to a supply house downtown or even wait for said supply house to do a same-day delivery. Or maybe finances at the company are really, really tight right at the moment. Now, of course, if the supply house is next door, and his company is okay with people bringing in tools paid for out-of-pocket, going and getting it would be a good excuse to take a half-hour break anyway (assuming no lines at the supply house). My point was simply that connectivity checks don't need a breakout box. Breakout boxes do make them more convenient, and quicker, and give more reliable results. Not to mention enabling more in-depth testing, especially if you have an oscilloscope with data capture. I'm not arguing with you on this one, Jerry, I was just offering an alternative. Not a great alternative, but maybe a useful one. -- Joel Rees Be careful where you see conspiracy. Look first in your own heart, and ask yourself if you are not your own worst enemy. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/caar43iplxkijivltwizuhnrb+errmehz_6r56wmliwgz7oa...@mail.gmail.com
Re: Data from a serial port
On 10/3/2014 8:19 PM, Joel Rees wrote: > On Sat, Oct 4, 2014 at 5:52 AM, Jerry Stuckle wrote: >> On 10/2/2014 8:24 PM, Ethan Rosenberg wrote: >>> [...] >> >> In addition to Dan's comments - is your cable OK? Do you need a >> straight-through cable or a cross-over cable? Does the terminal >> require/honor DSR/TSR and RTS/CTS? If so, are these lines active? >> >> You may need a breakout box on the cable to see what's happening on the >> lines. > > If, for some reason, you can't get a breakout box, you may be able to > do basic tests on the cable with a multimeter (ohm-meter or > connectivity function), the pin diagrams, some patience, and maybe an > extra pair of hands (if you can't find small-mouth alligator clips or > pin clips). Just don't tell whoever handles requisitions/budget unless > they understand that patience costs time and money when doing things > like this. You have to be really careful to keep the leads from > slipping, and not noticing a slipped lead can cost hours of > unnecessary work.And there are tests you really don't want to try > without a breakout box or the equivalent. > Why couldn't he? They're cheap, i.e. http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_14285_-1. Note if he's using DB9 connectors he would need a pair of DB9-DB25 connectors. But they are also cheap. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/542f4545.5020...@attglobal.net
Re: Data from a serial port
On Sat, Oct 4, 2014 at 5:52 AM, Jerry Stuckle wrote: > On 10/2/2014 8:24 PM, Ethan Rosenberg wrote: >> [...] > > In addition to Dan's comments - is your cable OK? Do you need a > straight-through cable or a cross-over cable? Does the terminal > require/honor DSR/TSR and RTS/CTS? If so, are these lines active? > > You may need a breakout box on the cable to see what's happening on the > lines. If, for some reason, you can't get a breakout box, you may be able to do basic tests on the cable with a multimeter (ohm-meter or connectivity function), the pin diagrams, some patience, and maybe an extra pair of hands (if you can't find small-mouth alligator clips or pin clips). Just don't tell whoever handles requisitions/budget unless they understand that patience costs time and money when doing things like this. You have to be really careful to keep the leads from slipping, and not noticing a slipped lead can cost hours of unnecessary work.And there are tests you really don't want to try without a breakout box or the equivalent. -- Joel Rees Be careful where you see conspiracy. Look first in your own heart, and ask yourself if you are not your own worst enemy. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/caar43iohya7gjhudkv+me16soneuhpnbzptlbwtcbv_bzjq...@mail.gmail.com
Re: Data from a serial port
On 10/2/2014 8:24 PM, Ethan Rosenberg wrote: > On 10/01/2014 03:20 PM, Dan Ritter wrote: >> On Sat, Sep 27, 2014 at 11:26:48PM -0400, Ethan Rosenberg, PhD wrote: >>> Dear List - >>> >>> I have an Avery Berkel POS [Point Of Sale] scale which I wish to >>> integrate into a POS system. The output is sent to a RS232 port. I >>> do not know how to extract the data. >>> >>> Here is what I have about the RS232 port: >>> >>> ethan@meow:~$ dmesg | grep tty >>> [0.00] console [tty0] enabled >>> [0.383854] 00:07: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = >>> 115200) is a 16550A >>> [0.404352] :00:03.3: ttyS1 at I/O 0x1c90 (irq = 17, base_baud >>> = 115200) is a 16550A >>> >>> >>> root@meow:/home/ethan# setserial -g /dev/ttyS[0123] >>> /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >>> /dev/ttyS1, UART: 16550A, Port: 0x1c90, IRQ: 17 >>> /dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4 >>> /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3 >>> >>> >>> More info from the manual -- >>> >>> 9600 baud, 7 data bits, even parity, 1 stop bit >>> >>> Transmits weight and scale status whenever ASCII 'W' is sent by >>> the POS terminal. >> >> Well, one option would be to install minicom (apt-get will find >> it for you), set your default serial port to /dev/ttyS0, set it >> at 9600,7,e,1. Then plug it in and see if tapping W gets you >> a response. >> >> /dev/ttyS0 will look just like a file, if you're writing a >> program, and you can read from it and write to it just like any >> other file. >> >> -dsr- >> > Dan - > > EXCELLENT!! > > Minicom set up as 9600,7,e,1. > Terminal ANSI > No response from tapping W. > > TIA > > Ethan > > In addition to Dan's comments - is your cable OK? Do you need a straight-through cable or a cross-over cable? Does the terminal require/honor DSR/TSR and RTS/CTS? If so, are these lines active? You may need a breakout box on the cable to see what's happening on the lines. Jerry -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/542f0c80.6080...@attglobal.net
Re: Data from a serial port
On Thu, Oct 02, 2014 at 08:24:21PM -0400, Ethan Rosenberg wrote: > On 10/01/2014 03:20 PM, Dan Ritter wrote: > >On Sat, Sep 27, 2014 at 11:26:48PM -0400, Ethan Rosenberg, PhD wrote: > >>root@meow:/home/ethan# setserial -g /dev/ttyS[0123] > >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > >>/dev/ttyS1, UART: 16550A, Port: 0x1c90, IRQ: 17 > >> > >>More info from the manual -- > >> > >>9600 baud, 7 data bits, even parity, 1 stop bit > >> > >>Transmits weight and scale status whenever ASCII 'W' is sent by the POS > >>terminal. > > Minicom set up as 9600,7,e,1. > Terminal ANSI > No response from tapping W. Check that this is ttyS0, not ttyS1; check that the cable is good; check that the scale is on. Does it need an initialization sequence? -dsr- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141003193722.gm5...@randomstring.org
Re: Data from a serial port
On 10/01/2014 03:20 PM, Dan Ritter wrote: On Sat, Sep 27, 2014 at 11:26:48PM -0400, Ethan Rosenberg, PhD wrote: Dear List - I have an Avery Berkel POS [Point Of Sale] scale which I wish to integrate into a POS system. The output is sent to a RS232 port. I do not know how to extract the data. Here is what I have about the RS232 port: ethan@meow:~$ dmesg | grep tty [0.00] console [tty0] enabled [0.383854] 00:07: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [0.404352] :00:03.3: ttyS1 at I/O 0x1c90 (irq = 17, base_baud = 115200) is a 16550A root@meow:/home/ethan# setserial -g /dev/ttyS[0123] /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 /dev/ttyS1, UART: 16550A, Port: 0x1c90, IRQ: 17 /dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4 /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3 More info from the manual -- 9600 baud, 7 data bits, even parity, 1 stop bit Transmits weight and scale status whenever ASCII 'W' is sent by the POS terminal. Well, one option would be to install minicom (apt-get will find it for you), set your default serial port to /dev/ttyS0, set it at 9600,7,e,1. Then plug it in and see if tapping W gets you a response. /dev/ttyS0 will look just like a file, if you're writing a program, and you can read from it and write to it just like any other file. -dsr- Dan - EXCELLENT!! Minicom set up as 9600,7,e,1. Terminal ANSI No response from tapping W. TIA Ethan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/542decb5.7010...@hygeiabiomedical.com
Re: Data from a serial port
On Wed, Oct 01, 2014 at 03:20:06PM -0400, Dan Ritter wrote: > > Well, one option would be to install minicom (apt-get will find > it for you), set your default serial port to /dev/ttyS0, set it > at 9600,7,e,1. Then plug it in and see if tapping W gets you > a response. > > /dev/ttyS0 will look just like a file, if you're writing a > program, and you can read from it and write to it just like any > other file. I did mention the Coffee HOWTO, (it wasn't a Joke.) That has an introduction to programming the serial port. I have no idea if it's still relevant today. -- "If you're not careful, the newspapers will have you hating the people who are being oppressed, and loving the people who are doing the oppressing." --- Malcolm X -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141002005310.GJ27930@tal
Re: Data from a serial port
On Sat, Sep 27, 2014 at 11:26:48PM -0400, Ethan Rosenberg, PhD wrote: > Dear List - > > I have an Avery Berkel POS [Point Of Sale] scale which I wish to > integrate into a POS system. The output is sent to a RS232 port. I > do not know how to extract the data. > > Here is what I have about the RS232 port: > > ethan@meow:~$ dmesg | grep tty > [0.00] console [tty0] enabled > [0.383854] 00:07: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a > 16550A > [0.404352] :00:03.3: ttyS1 at I/O 0x1c90 (irq = 17, base_baud = > 115200) is a 16550A > > > root@meow:/home/ethan# setserial -g /dev/ttyS[0123] > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > /dev/ttyS1, UART: 16550A, Port: 0x1c90, IRQ: 17 > /dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4 > /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3 > > > More info from the manual -- > > 9600 baud, 7 data bits, even parity, 1 stop bit > > Transmits weight and scale status whenever ASCII 'W' is sent by the POS > terminal. Well, one option would be to install minicom (apt-get will find it for you), set your default serial port to /dev/ttyS0, set it at 9600,7,e,1. Then plug it in and see if tapping W gets you a response. /dev/ttyS0 will look just like a file, if you're writing a program, and you can read from it and write to it just like any other file. -dsr- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141001192005.gf5...@randomstring.org
Re: Data from a serial port
David Christensen wrote: > Ethan Rosenberg wrote: > >Wrote it myself. > > Then you need to learn how to program the serial port using whatever > language you picked. Your program will basically need to sit in a loop reading data from the point of sale serial port continuously. As data is read your program will need to parse it and respond appropriately. This is quite easy in a Unix like system such as Debian GNU/Linux. In the Unix world everything is a file. (In the Linux world everything is a file system. ) Since everything is a file your program will need to open the serial port device (/dev/ttyS0 or whatever) for read-write and then interact with it. Open the device. Set the tty parameters. Start the loop. Run forever. Bob signature.asc Description: Digital signature
Re: Data from a serial port
On 09/28/2014 01:09 PM, Ethan Rosenberg wrote: Wrote it myself. Please reply to the list. Then you need to learn how to program the serial port using whatever language you picked. I initially learned serial port programming in C from a book: http://www.amazon.com/C-Programmers-Guide-Serial-Communications/dp/0672302861 I later learned various libraries for whatever language I was using -- Microsoft C/C++/VB, Perl, etc.. David -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54286d8b.70...@holgerdanske.com
Re: Data from a serial port
On Sat, Sep 27, 2014 at 11:13:28PM -0400, Ethan Rosenberg wrote: > Dear List - > > I have an Avery Berkel POS [Point Of Sale] scale which I wish to integrate > into a POS system. The output is sent to a RS232 port. I do not know how to > extract the data. Although this is not a Debian support question, I suggest reading the coffee HOWTO. -- "If you're not careful, the newspapers will have you hating the people who are being oppressed, and loving the people who are doing the oppressing." --- Malcolm X -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140928112337.GC29808@tal
Re: Data from a serial port
On 09/28/2014 05:30 AM, Ethan Rosenberg, PhD wrote: Dear List - I have an Avery Berkel POS [Point Of Sale] scale which I wish to integrate into a POS system. The output is sent to a RS232 port. I do not know how to extract the data. Here is what I have about the RS232 port: ethan@meow:~$ dmesg | grep tty [0.00] console [tty0] enabled [0.383854] 00:07: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [0.404352] :00:03.3: ttyS1 at I/O 0x1c90 (irq = 17, base_baud = 115200) is a 16550A root@meow:/home/ethan# setserial -g /dev/ttyS[0123] /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 /dev/ttyS1, UART: 16550A, Port: 0x1c90, IRQ: 17 /dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4 /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3 TIA Ethan -- More info from the manual -- 9600 baud, 7 data bits, even parity, 1 stop bit Transmits weight and scale status whenever ASCII 'W' is sent by the POS terminal. Hope this helps. TIA Ethan use stty to configure the port. man stty stty 9600 cs7 -parodd -cstopb (but there's more... handshake, newlines...) -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/5427e77b.2050...@a1.net
Re: Data from a serial port
On 09/27/2014 08:26 PM, Ethan Rosenberg, PhD wrote: I have an Avery Berkel POS [Point Of Sale] scale which I wish to integrate into a POS system. The output is sent to a RS232 port. I do not know how to extract the data. Here is what I have about the RS232 port: ethan@meow:~$ dmesg | grep tty [0.00] console [tty0] enabled [0.383854] 00:07: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [0.404352] :00:03.3: ttyS1 at I/O 0x1c90 (irq = 17, base_baud = 115200) is a 16550A root@meow:/home/ethan# setserial -g /dev/ttyS[0123] /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 /dev/ttyS1, UART: 16550A, Port: 0x1c90, IRQ: 17 /dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4 /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3 More info from the manual -- 9600 baud, 7 data bits, even parity, 1 stop bit Transmits weight and scale status whenever ASCII 'W' is sent by the POS terminal. What is your point of sale software? David -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54278f76.1080...@holgerdanske.com