Serial Port + Bar code reader

Discussion in 'Macintosh Computers' started by arrakis73, Feb 21, 2005.

  1. macrumors newbie

    Feb 16, 2005
    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.
  2. macrumors regular


    Jan 22, 2003
    Heathfield, UK
    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.
  3. macrumors G4

    Jul 17, 2002
    Why don't you get a USB barcode reader and save yourself a lot of grief?
  4. macrumors 6502a


    Aug 22, 2003
    Yes there is a serial->usb converter. Got mine at best buy. I used python to read from the serial port.

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

    Feb 16, 2005
    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.
  6. thread starter macrumors newbie

    Feb 16, 2005
    I would like to use a pure Java solution. Your link gives some really interesting resources. Veri helpful. Thanks a lot.
  7. macrumors 68030


    Nov 7, 2003
  8. macrumors 6502a


    Aug 22, 2003
    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?
  9. thread starter macrumors newbie

    Feb 16, 2005
    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.
  10. thread starter macrumors newbie

    Feb 16, 2005
    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.

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

Share This Page