PDA

View Full Version : Serial Port + Bar code reader


arrakis73
Feb 21, 2005, 05:43 AM
Hallo, I am planning to buy a new PowerBook, but in the near future I will have to connect to a barcode reader using serial port.

1) I know the PB is USB only provided. Is there any adapater for such specific purpose?

2) And, if there is way to interface with such device, has anyone tried to read the serial port input from the bard code reader using Java?

Please, help me.

jrober
Feb 21, 2005, 06:44 AM
has anyone tried to read the serial port input from the bard code reader using Java?

Please, help me.

I like the idea of a Bard code reader, presumably it reads text and then proclaims who it was written by e.g. Shakespeare, Burns etc.

Honestly though I do not know much about barcode readers but Apple Stores have them connected to iMacs so try asking them.

MisterMe
Feb 21, 2005, 08:17 AM
Hallo, I am planning to buy a new PowerBook, but in the near future I will have to connect to a barcode reader using serial port.

1) I know the PB is USB only provided. Is there any adapater for such specific purpose?

2) And, if there is way to interface with such device, has anyone tried to read the serial port input from the bard code reader using Java?

Please, help me.Why don't you get a USB barcode reader and save yourself a lot of grief?

csubear
Feb 21, 2005, 09:08 AM
Yes there is a serial->usb converter. Got mine at best buy. I used python to read from the serial port.

http://pyserial.sourceforge.net/

Very easy to use python interface, All you need to do is read from /dev/ttyS0 or something like that.

arrakis73
Feb 22, 2005, 04:39 AM
Why don't you get a USB barcode reader and save yourself a lot of grief?

USB bar code readers, at least all models I've seen, work always as keyboard emulation. I don't want this. I don't want the user to stay always focused to a given field before reading a bar code. This operation must be performed in an indipendent thread. And the only way I found is to create an thread reading the serial port, which raises an event when a new barcode is read.

arrakis73
Feb 22, 2005, 04:43 AM
Yes there is a serial->usb converter. Got mine at best buy. I used python to read from the serial port.

http://pyserial.sourceforge.net/

Very easy to use python interface, All you need to do is read from /dev/ttyS0 or something like that.

I would like to use a pure Java solution. Your link gives some really interesting resources. Veri helpful. Thanks a lot.

superbovine
Feb 22, 2005, 12:29 PM
I would like to use a pure Java solution. Your link gives some really interesting resources. Veri helpful. Thanks a lot.

http://sourceforge.net/projects/jusb/

csubear
Feb 22, 2005, 01:41 PM
I would like to use a pure Java solution. Your link gives some really interesting resources. Veri helpful. Thanks a lot.

Ya there something there talking about jython, never used it my self. Though i did need it to use his python library. Perhaps that is some sort of framework callable from java?

arrakis73
Feb 23, 2005, 02:09 AM
Ya there something there talking about jython, never used it my self. Though i did need it to use his python library. Perhaps that is some sort of framework callable from java?

Maybe it is. After getting the bar code reader I will test all options, using a PC or a Mac, under Java. Now Java gives its own package for serial device. First I'll try that one, then, if it does not work, I will look for another way of reading the port.

arrakis73
Feb 23, 2005, 02:37 AM
I have just discovered that there are barcode readers feeding directly to TCP port. That is, no drivers or adapters are required, just a network cable and socket.

Thanks to everyone.



Andrea
-------------------------
iMac Mini 1,42 Ghz, 512 Mb, 80 Gb
PowerBook (next week!)