Sending USB commands with Python

Jorge Mazzonelli jmazzonelli at gmail.com
Tue Aug 28 22:53:30 EDT 2012


Hi,
I recommend the use of the module PyUSB in sourceforge:
http://pyusb.sourceforge.net/

Also take a look to the tutorial :
http://pyusb.sourceforge.net/docs/1.0/tutorial.html

as far as I can remember, you'll need to first find the device based on the
idvendor / idproduct (provided in the pdf). then you'll need to setup the
configuration (usually the default but on your case you'll need to check
which one, since the doc says there are 2 exposed). then the endpoints.
(all of this is on the tutorial)

With that you need to write the command and then read the result from the
endpoints.
The status command you want will be 0x1B 0x41.

Hope this helps.

Jorge

On Tue, Aug 28, 2012 at 9:04 PM, Adam W. <AWasilenko at gmail.com> wrote:

> So I'm trying to get as low level as I can with my Dymo label printer, and
> this method described the PDF
> http://sites.dymo.com/Documents/LW450_Series_Technical_Reference.pdfseems to be it.
>
> I'm unfamiliar with dealing with the USB interface and would greatly
> appreciate it if someone could tell me how to send and receive these
> commands with Python.  Perhaps if you were feeling generous and wanted to
> write a bit of sample code, sending the "Get Printer Status" command and
> receiving the response (page 17 of the PDF) would be perfect to get me on
> my way.
>
> Thanks,
> Adam
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
-- 
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120828/fd1a5f4d/attachment.html>


More information about the Python-list mailing list