Re: [pyusb-users] Barcode Scanner

2016-04-24 Thread Steven Michalske
John,

Not knowing your exact barcode scanner is a real hindrance.
One good piece of information you forgot to provide was what exactly you were 
interfacing to.
USB barcode scanner is too generic,  you need read 
http://catb.org/esr/faqs/smart-questions.html

That being said the VID is from Honeywell, so here is on of their manuals for a 
2d barcode reader.
See page 2-4 of http://www.honeywellaidc.com/CatalogDocuments/Xenon-UG.pdf
Clearly it states that to enable the USB CDC mode you scan that barcode.

To enable USB-CDC mode of the barcode scanner.
Windows needs a driver, but mac and linux will use the generic USB-CDC driver.

Now you will connect with pySerial and communicate with your barcode scanner as 
a serial device.

Happy hacking,
Steve

> On Apr 24, 2016, at 7:22 AM, Dietmar Schwertberger 
>  wrote:
> 
> On 24.04.2016 14:34, John Thornton wrote:
>> I've established communications with it and added a udev rule and added
>> myself to the scanner group so I could talk to the scanner. And the
>> results so far are:
> A long way to go...
> 
>> On 4/24/2016 6:06 AM, Dietmar Schwertberger wrote:
>>> button and they send keystrokes.
>>> You should have info from the manufacturer of your scanner. Maybe he has
>>> implemented CDC (aka Virtual COM Port).
> For Windows, Honeywell offers a USB Serial Driver.
> So you may try CDC as well, either as serial port or via pyusb.
> 
> Regards,
> 
> Dietmar
> 
> --
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Barcode Scanner

2016-04-24 Thread Dietmar Schwertberger
On 24.04.2016 14:34, John Thornton wrote:
> I've established communications with it and added a udev rule and added
> myself to the scanner group so I could talk to the scanner. And the
> results so far are:
A long way to go...

> On 4/24/2016 6:06 AM, Dietmar Schwertberger wrote:
>> button and they send keystrokes.
>> You should have info from the manufacturer of your scanner. Maybe he has
>> implemented CDC (aka Virtual COM Port).
For Windows, Honeywell offers a USB Serial Driver.
So you may try CDC as well, either as serial port or via pyusb.

Regards,

Dietmar

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Barcode Scanner

2016-04-24 Thread John Thornton
In this case it is a hand scanner to test the code with as the second 
project is an operator will scan a bar code and auto load the G code 
file into the CNC software.

I've established communications with it and added a udev rule and added 
myself to the scanner group so I could talk to the scanner. And the 
results so far are:

$ python
Python 2.7.6 (default, Jun 22 2015, 18:00:18)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import usb.core
>>> dev = usb.core.find(idVendor=0x0c2e, idProduct=0x0901)
>>> dev.is_kernel_driver_active(0)
True
>>>

JT

On 4/24/2016 6:06 AM, Dietmar Schwertberger wrote:
> On 24.04.2016 13:00, John Thornton wrote:
>> The basic process is a part with a data sheet comes down the conveyor
>> and when the part is in position the data sheet is scanned. The info
>> from the data sheet is used by the controlling program to select the
>> correct part program and other things.
> But then it's not one of the standard handscanners where you press a
> button and they send keystrokes.
> You should have info from the manufacturer of your scanner. Maybe he has
> implemented CDC (aka Virtual COM Port).
>
> Regards,
>
> Dietmar
>
>
> --
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Barcode Scanner

2016-04-24 Thread John Thornton
The basic process is a part with a data sheet comes down the conveyor 
and when the part is in position the data sheet is scanned. The info 
from the data sheet is used by the controlling program to select the 
correct part program and other things.

JT

On 4/23/2016 10:38 AM, Tom Sanders wrote:
> Most barcode scanners work like keyboards: they simulate keypresses.
> IMO using pyusb is propably overkill. I would go for the standard keyboard 
> input routines.
>
> Cheers
> Tom
>
>
>> I'm trying to scan a barcode into a python program. Are there any
>> tutorials on doing this with pyusb? Or any hints on where to start.
>>
>> So far I've loaded pyusb 1.x and can get a list of the USB busses and
>> I've found out how to use pydoc to get the docs.
>>
>> JT
>>
>> --
>> Find and fix application performance issues faster with Applications Manager
>> Applications Manager provides deep performance insights into multiple tiers 
>> of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> ___
>> pyusb-users mailing list
>> pyusb-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>>
>
>
> --
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Barcode Scanner

2016-04-24 Thread John Thornton
The problem with that is I have to scan a G code file name into LinuxCNC 
without any operator. So it has to be automatic.

JT

On 4/23/2016 10:38 AM, Tom Sanders wrote:
> Most barcode scanners work like keyboards: they simulate keypresses.
> IMO using pyusb is propably overkill. I would go for the standard keyboard 
> input routines.
>
> Cheers
> Tom
>
>
>> I'm trying to scan a barcode into a python program. Are there any
>> tutorials on doing this with pyusb? Or any hints on where to start.
>>
>> So far I've loaded pyusb 1.x and can get a list of the USB busses and
>> I've found out how to use pydoc to get the docs.
>>
>> JT
>>
>> --
>> Find and fix application performance issues faster with Applications Manager
>> Applications Manager provides deep performance insights into multiple tiers 
>> of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> ___
>> pyusb-users mailing list
>> pyusb-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>>
>
>
> --
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Barcode Scanner

2016-04-23 Thread Tom Sanders
Most barcode scanners work like keyboards: they simulate keypresses.
IMO using pyusb is propably overkill. I would go for the standard keyboard 
input routines.

Cheers
Tom


> I'm trying to scan a barcode into a python program. Are there any
> tutorials on doing this with pyusb? Or any hints on where to start.
>
> So far I've loaded pyusb 1.x and can get a list of the USB busses and
> I've found out how to use pydoc to get the docs.
>
> JT
>
> --
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users