You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(3) |
Nov
(4) |
Dec
|
2008 |
Jan
(1) |
Feb
(5) |
Mar
(2) |
Apr
|
May
(8) |
Jun
(4) |
Jul
|
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
(20) |
2009 |
Jan
(16) |
Feb
(7) |
Mar
(9) |
Apr
(4) |
May
(6) |
Jun
(17) |
Jul
(3) |
Aug
(4) |
Sep
(5) |
Oct
(10) |
Nov
(16) |
Dec
|
2010 |
Jan
(22) |
Feb
(18) |
Mar
(9) |
Apr
(102) |
May
(29) |
Jun
(40) |
Jul
(80) |
Aug
(21) |
Sep
(47) |
Oct
(13) |
Nov
(19) |
Dec
(45) |
2011 |
Jan
(82) |
Feb
(20) |
Mar
(47) |
Apr
(25) |
May
(18) |
Jun
(24) |
Jul
(24) |
Aug
(47) |
Sep
(23) |
Oct
(22) |
Nov
(69) |
Dec
(20) |
2012 |
Jan
(56) |
Feb
(42) |
Mar
(43) |
Apr
(27) |
May
(18) |
Jun
(11) |
Jul
(61) |
Aug
(19) |
Sep
(13) |
Oct
(49) |
Nov
(32) |
Dec
(37) |
2013 |
Jan
(46) |
Feb
(14) |
Mar
(13) |
Apr
(20) |
May
(20) |
Jun
(3) |
Jul
(19) |
Aug
(7) |
Sep
(4) |
Oct
(33) |
Nov
(7) |
Dec
(15) |
2014 |
Jan
(5) |
Feb
(21) |
Mar
(3) |
Apr
(3) |
May
(30) |
Jun
(1) |
Jul
(30) |
Aug
(2) |
Sep
(22) |
Oct
(14) |
Nov
(22) |
Dec
(6) |
2015 |
Jan
(7) |
Feb
(4) |
Mar
(16) |
Apr
(9) |
May
(17) |
Jun
(28) |
Jul
(3) |
Aug
(18) |
Sep
(3) |
Oct
|
Nov
(6) |
Dec
(3) |
2016 |
Jan
(15) |
Feb
(18) |
Mar
(12) |
Apr
(14) |
May
(15) |
Jun
(3) |
Jul
(3) |
Aug
(42) |
Sep
(24) |
Oct
(6) |
Nov
(5) |
Dec
(6) |
2017 |
Jan
(6) |
Feb
(2) |
Mar
(12) |
Apr
|
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(6) |
Sep
|
Oct
(1) |
Nov
(5) |
Dec
(7) |
2018 |
Jan
|
Feb
(9) |
Mar
(7) |
Apr
|
May
(10) |
Jun
(20) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(20) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(9) |
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(8) |
Dec
(2) |
2021 |
Jan
(16) |
Feb
(1) |
Mar
|
Apr
(9) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2022 |
Jan
|
Feb
(7) |
Mar
|
Apr
(4) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Gabriel <gb...@gm...> - 2009-09-24 13:09:14
|
Thanks a lot!!!! 2009/9/24 Phil Hannent <ph...@ha...> > Wander Lairson wrote: > > I have uploaded to the website the first draft of the upcoming PyUSB > > 1.0 programming tutorial (wow, will PyUSB have a tutorial?, you must > > be wondering). > > If you are interested in PyUSB 1.0, you can checkout the revision 34 > > from svn, which is reasonable stable under Linux. The link to the > > tutorial is: > > http://pyusb.sourceforge.net/docs/1.0/tutorial.html. > > Bear in mind that the API is subject to change and revision 34 doesn't > > work with OpenUSB yet. > > > Great. Your hard work is appreciated. > > Regards > Phil Hannent > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > -- Gabriel |
From: Phil H. <ph...@ha...> - 2009-09-24 09:17:12
|
Wander Lairson wrote: > I have uploaded to the website the first draft of the upcoming PyUSB > 1.0 programming tutorial (wow, will PyUSB have a tutorial?, you must > be wondering). > If you are interested in PyUSB 1.0, you can checkout the revision 34 > from svn, which is reasonable stable under Linux. The link to the > tutorial is: > http://pyusb.sourceforge.net/docs/1.0/tutorial.html. > Bear in mind that the API is subject to change and revision 34 doesn't > work with OpenUSB yet. > Great. Your hard work is appreciated. Regards Phil Hannent |
From: Wander L. <wan...@gm...> - 2009-09-23 18:52:01
|
Hi there, I have uploaded to the website the first draft of the upcoming PyUSB 1.0 programming tutorial (wow, will PyUSB have a tutorial?, you must be wondering). If you are interested in PyUSB 1.0, you can checkout the revision 34 from svn, which is reasonable stable under Linux. The link to the tutorial is: http://pyusb.sourceforge.net/docs/1.0/tutorial.html. Bear in mind that the API is subject to change and revision 34 doesn't work with OpenUSB yet. That's all folks, Wander |
From: Wander L. <wan...@gm...> - 2009-09-22 17:23:45
|
Hi Gabriel, Give a look at PyUSB sources repository. At branch/0.x/tests/pytest.py you have a little test script and at trunk/tests/pic18f4550/ you find the firmware source code for my test device. Wander 2009/9/22 Gabriel <gb...@gm...>: > Does someone has experience with pic microcontrolers and pyusb? > How do you programed de pic? How do you programed the interfase with pyusb? > Thanks a lot > -- > Gabriel > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > |
From: Gabriel <gb...@gm...> - 2009-09-22 16:15:51
|
Does someone has experience with pic microcontrolers and pyusb? How do you programed de pic? How do you programed the interfase with pyusb? Thanks a lot -- Gabriel |
From: Wander L. <wan...@gm...> - 2009-08-14 15:17:02
|
Hi Thomas, Thank you for the patches, I will review and included them asap. Wander 2009/8/14 Thomas Reitmayr <tre...@de...>: > Hi, > I just wanted to let interested people know that I created a few (mostly > small) patches against trunk of PyUSB which now allowed me to use PyUSB > with the libusb01 and libusb10 backend. > > My test application is rather small, it talks to the vendor-specific HID > interface of a Freecom USB handset. By using the thread-safe libusb10 > backend I was able to spawn two threads for the interrupt IN endpoint > for alternately capturing key presses while at the same time toggling > the devices LED through the control endpoint. > > The patches are not commited yet, but you might want to review them at > https://sourceforge.net/tracker/?group_id=145185&atid=761065 > > Regards, > -Thomas > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > |
From: Thomas R. <tre...@de...> - 2009-08-14 14:48:24
|
Hi, I just wanted to let interested people know that I created a few (mostly small) patches against trunk of PyUSB which now allowed me to use PyUSB with the libusb01 and libusb10 backend. My test application is rather small, it talks to the vendor-specific HID interface of a Freecom USB handset. By using the thread-safe libusb10 backend I was able to spawn two threads for the interrupt IN endpoint for alternately capturing key presses while at the same time toggling the devices LED through the control endpoint. The patches are not commited yet, but you might want to review them at https://sourceforge.net/tracker/?group_id=145185&atid=761065 Regards, -Thomas |
From: Wander L. <wan...@gm...> - 2009-08-14 13:21:21
|
Next release it will be included, thanks. Wander 2009/8/14 <ros...@la...>: > > if you're using macports ( rather than fink ) then you need to modify > the include paths ( defaults and fink are included but not macports ) . > ( macports > darwin ports > the ports collection ) > > can we include this in the next version please ? > > whale:pyusb-0.4.2 rossetti$ diff setup.py.0 setup.py > 37a38 > > '-L/opt/local/lib', > 39c40 > < extra_compile_args = ['-I/sw/include','-I/usr/local/lib'] > --- > > extra_compile_args = ['-I/sw/include','-I/usr/local/lib','-I/ > opt/local/lib'] > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > |
From: <ros...@la...> - 2009-08-14 12:04:24
|
if you're using macports ( rather than fink ) then you need to modify the include paths ( defaults and fink are included but not macports ) . ( macports > darwin ports > the ports collection ) can we include this in the next version please ? whale:pyusb-0.4.2 rossetti$ diff setup.py.0 setup.py 37a38 > '-L/opt/local/lib', 39c40 < extra_compile_args = ['-I/sw/include','-I/usr/local/lib'] --- > extra_compile_args = ['-I/sw/include','-I/usr/local/lib','-I/ opt/local/lib'] |
From: Scott S. <sis...@gm...> - 2009-07-07 17:58:50
|
#include <errno.h> #include <pthread.h> #include <signal.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <libusb-1.0/libusb.h> #include "font_6x8.h" #define VENDOR_ID 0x04d8 #define PRODUCT_ID 0xc002 #define OUT_REPORT_LED_STATE 0x81 #define OUT_REPORT_LCD_BACKLIGHT 0x91 #define OUT_REPORT_LCD_CONTRAST 0x92 #define OUT_REPORT_CMD 0x94 #define OUT_REPORT_DATA 0x95 #define OUT_REPORT_CMD_DATA 0x96 #define SCREEN_H 64 #define SCREEN_W 256 typedef struct Command { void (*cb) (unsigned char *data, int size); unsigned char data[64]; int size; } Command; struct Command queue[1024]; int queueEnd = 0; int queueStart = 0; unsigned char locked = 0; static unsigned char pLG_framebuffer[256*64]; /* used to display white text on black background or inverse */ unsigned char inverted = 0; static struct libusb_device_handle *devh = NULL; static struct libusb_transfer *lcd_transfer = NULL; static int do_exit = 0; static pthread_t poll_thread; static pthread_t command_thread; static pthread_cond_t exit_cond = PTHREAD_COND_INITIALIZER; static pthread_mutex_t exit_cond_lock = PTHREAD_MUTEX_INITIALIZER; static void queue_push(void (*cb), unsigned char *data, int size) { int i; if (queueEnd >= 1024) return; queue[queueEnd].cb = cb; queue[queueEnd].size = size; for(i = 0; i < size; i++) { queue[queueEnd].data[i] = data[i]; } printf("Data0: %x, %x, %x\n", queue[queueEnd].data[0], queue[queueEnd].data[1], queue[queueEnd].data[2]); queueEnd++; } struct Command * queue_pop(void) { if( queueStart >= queueEnd ) return NULL; return &queue[queueStart++]; } static void request_exit(int code) { do_exit = code; pthread_cond_signal(&exit_cond); } static void *command_thread_main(void *arg) { struct Command *cmd; while (!do_exit) { if(locked) continue; locked = 1; cmd = queue_pop(); if(cmd != NULL) { cmd->cb(cmd->data, cmd->size); printf("Data1: %x, %x, %x, %d\n", cmd->data[0], cmd->data[1], cmd->data[2], cmd->size); } } return NULL; } static void *poll_thread_main(void *arg) { int r = 0; while ( !do_exit) { struct timeval tv = { 1, 0}; r = libusb_handle_events_timeout(NULL, &tv); if( r < 0 ) { request_exit(2); break; } } return NULL; } void cb_lcd(struct libusb_transfer *transfer) { if(transfer->status != LIBUSB_TRANSFER_COMPLETED) { fprintf(stderr, "transfer not completed!\n"); } printf("cb_lcd: length=%d, actual_length=%d\n", transfer->length, transfer->actual_length); locked = 0; } void drv_pLG_real_send(unsigned char *data, int size) { libusb_fill_interrupt_transfer(lcd_transfer, devh, LIBUSB_ENDPOINT_OUT + 1, data, size, cb_lcd, NULL, 0); libusb_submit_transfer(lcd_transfer); } void drv_pLG_send(unsigned char *data, int size) { queue_push(drv_pLG_real_send, data, size); } static void drv_pLG_update_img() { unsigned char cmd3[64] = { OUT_REPORT_CMD_DATA }; /* send command + data */ unsigned char cmd4[64] = { OUT_REPORT_DATA }; /* send data only */ int index, bit, x, y; unsigned char cs, line; unsigned char pixel; for (cs = 0; cs < 4; cs++) { unsigned char chipsel = (cs << 2); //chipselect for (line = 0; line < 8; line++) { cmd3[0] = OUT_REPORT_CMD_DATA; cmd3[1] = chipsel; cmd3[2] = 0x02; cmd3[3] = 0x00; cmd3[4] = 0x00; cmd3[5] = 0xb8 | line; cmd3[6] = 0x00; cmd3[7] = 0x00; cmd3[8] = 0x40; cmd3[9] = 0x00; cmd3[10] = 0x00; cmd3[11] = 32; cmd4[0] = OUT_REPORT_DATA; cmd4[1] = chipsel | 0x01; cmd4[2] = 0x00; cmd4[3] = 0x00; cmd4[4] = 32; for (index = 0; index < 32; index++) { pixel = 0x00; for (bit = 0; bit < 8; bit++) { x = cs * 64 + index; y = (line * 8 + bit + 0) % SCREEN_H; if (pLG_framebuffer[y * 256 + x] ^ inverted) pixel |= (1 << bit); } cmd3[12 + index] = pixel; } for (index = 32; index < 64; index++) { pixel = 0x00; for (bit = 0; bit < 8; bit++) { x = cs * 64 + index; y = (line * 8 + bit + 0) % SCREEN_H; if (pLG_framebuffer[y * 256 + x] ^ inverted) pixel |= (1 << bit); } cmd4[5 + (index - 32)] = pixel; } drv_pLG_send(cmd3, 44); drv_pLG_send(cmd4, 38); } } } void drv_pLG_clear(void) { unsigned char cmd[3] = { 0x93, 0x01, 0x00 }; /* init display */ unsigned char cmd2[9] = { OUT_REPORT_CMD }; /* init display */ unsigned char cmd3[64] = { OUT_REPORT_CMD_DATA }; /* clear screen */ unsigned char cmd4[64] = { OUT_REPORT_CMD_DATA }; /* clear screen */ int init, index; unsigned char cs, line; drv_pLG_send(cmd, 3); for (init = 0; init < 4; init++) { unsigned char cs = ((init << 2) & 0xFF); cmd2[0] = OUT_REPORT_CMD; cmd2[1] = cs; cmd2[2] = 0x02; cmd2[3] = 0x00; cmd2[4] = 0x64; cmd2[5] = 0x3F; cmd2[6] = 0x00; cmd2[7] = 0x64; cmd2[8] = 0xC0; drv_pLG_send(cmd2, 9); } for (cs = 0; cs < 4; cs++) { unsigned char chipsel = (cs << 2); //chipselect for (line = 0; line < 8; line++) { cmd3[0] = OUT_REPORT_CMD_DATA; cmd3[1] = chipsel; cmd3[2] = 0x02; cmd3[3] = 0x00; cmd3[4] = 0x00; cmd3[5] = 0xb8 | line; cmd3[6] = 0x00; cmd3[7] = 0x00; cmd3[8] = 0x40; cmd3[9] = 0x00; cmd3[10] = 0x00; cmd3[11] = 32; unsigned char temp = 0; for (index = 0; index < 32; index++) { cmd3[12 + index] = temp; } drv_pLG_send(cmd3, 64); cmd4[0] = OUT_REPORT_DATA; cmd4[1] = chipsel | 0x01; cmd4[2] = 0x00; cmd4[3] = 0x00; cmd4[4] = 32; for (index = 32; index < 64; index++) { temp = 0x00; cmd4[5 + (index - 32)] = temp; } drv_pLG_send(cmd4, 64); } } } static int find_device(void) { devh = libusb_open_device_with_vid_pid(NULL, VENDOR_ID, PRODUCT_ID); return devh ? 0 : -EIO; } static void sighandler(int signum) { request_exit(1); } static void fill_pixels(void) { int i, r, c, row, col; char *text = "picoLCDGraphics "; char ch; memset(pLG_framebuffer, 0, sizeof(pLG_framebuffer)); for( i = 0; i < 256/6*8; i++) { r = i / 42 * 8; c = i % 42 * 6; ch = text[i % strlen(text)]; for( row = 0; row < 8; row++ ) { for( col = 0; col < 6; col++ ) { if (Font_6x8[(int)ch][row] & (1 << (5-col)) ) pLG_framebuffer[(r + row) * 256 + c + col] = 1; } } } } int main(void) { struct sigaction sigact; int r = 1; r = libusb_init(NULL); if( r < 0) { fprintf(stderr, "failed to initialize libusb\n"); exit(1); } r = find_device(); if(r < 0) { fprintf(stderr, "Could not find device\n"); goto out; } r = libusb_claim_interface(devh, 0); if (r < 0) { fprintf(stderr, "usb_claim_interface error %d\n", r); goto out; } printf("claimed interface\n"); lcd_transfer = libusb_alloc_transfer(0); if(!lcd_transfer) { fprintf(stderr, "Unable to allocate transfer\n"); goto out; } drv_pLG_clear(); fill_pixels(); drv_pLG_update_img(); sigact.sa_handler = sighandler; sigemptyset(&sigact.sa_mask); sigact.sa_flags = 0; sigaction(SIGINT, &sigact, NULL); sigaction(SIGTERM, &sigact, NULL); sigaction(SIGQUIT, &sigact, NULL); r = pthread_create(&poll_thread, NULL, poll_thread_main, NULL); if (r) goto out_deinit; r = pthread_create(&command_thread, NULL, command_thread_main, NULL); if (r) goto out_deinit; while (!do_exit) { pthread_mutex_lock(&exit_cond_lock); pthread_cond_wait(&exit_cond, &exit_cond_lock); pthread_mutex_unlock(&exit_cond_lock); } pthread_join(poll_thread, NULL); pthread_join(command_thread, NULL); if (lcd_transfer) { r = libusb_cancel_transfer(lcd_transfer); if (r < 0) goto out_deinit; } while (lcd_transfer) if (libusb_handle_events(NULL) < 0) break; out_deinit: libusb_free_transfer(lcd_transfer); out_release: libusb_release_interface(devh, 0); out: libusb_close(devh); libusb_exit(NULL); return r >= 0 ? r : -r; } |
From: <iku...@ya...> - 2009-07-07 15:36:24
|
Check your monitor's documentation and the USB 2.0 spec for asynchronous transfers. Differences in how the monitor responds for supposedly-identical command sets are generally issues with the monitor or communication, not the command sets. If you look at the pyusb source code, it's pretty much a simple wrapper for libusb. That is, there's no real difference (except convenience in language choice) between programming a driver using pyusb and programming one using libusb. That being said, I'm not entirely sure that pyusb includes support for the asynchronous commands... and it was a fairly recent addition to libusb as well. There's an outside chance that there's a bug in the asynch code, but it's more likely there's a difference between the way the monitor handles asynchronous vs. synchronous input Also try isolating the particular sections of the code where the difference happens. The file you sent is long, has no comments, and has very few print statements. If you're debugging, add in lots more prints, preferably showing the hex code for the transfers sent to & from the monitor at each write / read command. Then compare those hex codes to each other for the sync and async versions - and compare both to the USB spec and the programmer's manual for the monitor. -Sarah --- On Mon, 7/6/09, Scott Sibley <sis...@gm...> wrote: From: Scott Sibley <sis...@gm...> Subject: [Pyusb-users] Hoping for suggestions - libusb-1.0 related To: pyu...@li... Date: Monday, July 6, 2009, 8:04 PM This isn't entirely pyusb related, but it could possibly affect the future of pyusb. I've been working on an LCD controller, with the goal of being able to control multiple, concurrent devices. I needed USB support for my newest LCD, so I began work on that using pyusb-0.1. However, it became clear pretty quickly that I needed an asynchronous solution, so I set out to work on this wielding ctypes and a fresh copy of libusb-1.0. I've run into some snags, overcoming most (Python's GIL was getting in the way for instance), but there's this one issue that just won't go away. See, the operations work fine synchronously following the steps below in sequence. We can view asynchronous I/O as a 5 step process: Allocation: allocate a libusb_transfer (This is self.transfer)Filling: populate the libusb_transfer instance with information about the transfer you wish to perform (libusb_fill_bulk_transfer)Submission: ask libusb to submit the transfer (libusb_submit_transfer)Completion handling: examine transfer results in the libusb_transfer structure (libusb_handle_events and libusb_handle_events_timeout)Deallocation: clean up resources (Not shown below)However, when performing these steps asynchronously only a portion of the LCD is filled with pixels. I've been through libusb's debug messages and usbmon's output, and between async and sync there are no differences, except when I look at the LCD for the results. I'm starting to believe that this is just not possible with Python+ctypes, which is why I said this could possibly affect pyusb. I am of course hoping for an answer to this, and having some experience in both Python and libusb I'm hoping maybe you would have one. I've attached some code if you feel up to looking into this. Also, I have a question opened at Stackoverflow here: http://stackoverflow.com/questions/1060305/usb-sync-vs-async-vs-semi-async-partially-answered-now -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/blackberry -----Inline Attachment Follows----- _______________________________________________ Pyusb-users mailing list Pyu...@li... https://lists.sourceforge.net/lists/listinfo/pyusb-users |
From: Santiago P. Sanchez-M. <sp...@gm...> - 2009-06-25 19:35:25
|
Hola Marcelo, Puedes usar pyusb con esa finalidad, aunque quizá ya exista algún driver para ese dispositivo. Lo primero que necesitas es una descripción del hardware que quieres manejar, con sus endpoints y la descripción de las tramas de su protocolo. Pyusb te permite enumerar el dispositivo, seleccionar una interfaz del mismo, configurar el dispositivo (endpoints de configuración), y enviar / recibir datos de sus endpoints. Mi consejo es que utilices algún programa de ejemplo primero. Por ejemplo, la librería usb porus utiliza pyusb para sus drivers. Un saludo On Thu, Jun 25, 2009 at 7:32 PM, Marcelo Fernandez <mcf...@gm...>wrote: > hi all. NEWCOMER WITH PYTHON AND PYUSB. WELL DON`T WRITE IN ENGLISH. A > QUESTION, YOU CAN DRIVE TO A USB UART CP210X LIKE? IF HAVE A POSITIVE TRACK > OF HOW TO DO? > THANKS > > ------------------------------------------------------------------------------ > > _______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > |
From: Marcelo F. <mcf...@gm...> - 2009-06-25 17:35:07
|
hi all. NEWCOMER WITH PYTHON AND PYUSB. WELL DON`T WRITE IN ENGLISH. A QUESTION, YOU CAN DRIVE TO A USB UART CP210X LIKE? IF HAVE A POSITIVE TRACK OF HOW TO DO? THANKS |
From: Wander L. <wan...@gm...> - 2009-06-23 10:27:53
|
Hello Brendan, PyUSB 1.0 is still under development. The code can be found in the sourceforge svn, but it is far from being usable. Unfortunatey, I have no prediction to when I'll have a version of it. Wander 2009/6/23 Brendan Simon (eTRIX) <Bre...@et...>: > I've discovered that libusb-1.0.2 has support for OS X LocationIDs :) > > So I want to use PyUSB that supportsw libusb-1.0.x. > The PyUSB page on sourceforge mentions that there is a 1.0 branch that > supports libusb-1.0.x (and libusb-0.1.x and OpenUSB). > > Where can I get PyUSB 1.0 ??? > > I could not find it anywhere. > > I presume it is still being developed. > > If not, then I guess some kind of backport or hack of libusb-0.1.x would > be in order :( > > Thanks, Brendan. > > > ------------------------------------------------------------------------------ > Are you an open source citizen? Join us for the Open Source Bridge conference! > Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. > Need another reason to go? 24-hour hacker lounge. Register today! > http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org > _______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > |
From: Brendan S. (eTRIX) <Bre...@eT...> - 2009-06-23 03:59:38
|
I've discovered that libusb-1.0.2 has support for OS X LocationIDs :) So I want to use PyUSB that supportsw libusb-1.0.x. The PyUSB page on sourceforge mentions that there is a 1.0 branch that supports libusb-1.0.x (and libusb-0.1.x and OpenUSB). Where can I get PyUSB 1.0 ??? I could not find it anywhere. I presume it is still being developed. If not, then I guess some kind of backport or hack of libusb-0.1.x would be in order :( Thanks, Brendan. |
From: Brendan S. (eTRIX) <Bre...@eT...> - 2009-06-22 07:32:00
|
I'm using PyUSB to obtain USB info, but the Location ID I get for my device is different to what "System Profiler" and "ioreg" shows me. eg. SP and ioreg show Location ID 0x1a200000 pyusb: dev.location returns 0x1a000000 There seems to be some kind of offset, so I presume I need to "calculate" the offset but I'm not entirely sure how or what needs to be added. Any one used PyUSB to find the Location ID of a device on OS X (or any other OS) ??? Thanks, Brendan. |
From: Brendan S. (eTRIX) <Bre...@eT...> - 2009-06-22 05:56:18
|
I want to display the Location ID for a device. If I print dev.location I get a different location to that displayed in OS X System Profiler (SP) and the ioreg command. print hex(dev.location) gives me 0x1a000000, but ioreg and SP gives me 0x1a200000. How do I calculate the correct Location ID for each device ?? I must have to add some offset or perform some calculation. Thanks, Brendan. |
From: Brendan S. (eTRIX) <Bre...@eT...> - 2009-06-22 03:43:15
|
FIXED. I got it working by only doing a getString for the DeviceID that I wanted. I assume this means that getString() cannot be called on any device. There must be some gating factor that determines when it can be called. Does anyone know what that is ??? i.e. what must I check before called getString() to ensure getString() works ?? or should I just be using a try/exception statement ??? Thanks, Brendan. Brendan Simon (eTRIX) wrote: > I can't seem to read the Manufacturer and Serial Number string from USB > devices. > > I have tried : > dev.open().getString( dev.iManufacturer, 30) > > but i just get an error as follows. > > usb.USBError: usb_control_msg(DeviceRequestTO): unknown error > > What is my mistake ?? > > Is there some other sample pyusb code to read the Manufacturer and > Serial strings ?? > > Thanks, Brendan. > > |
From: Brendan S. (eTRIX) <Bre...@eT...> - 2009-06-21 13:06:11
|
I need find out the association from USB serial device to the serial device name (eg. /dev/cu.usbmodem0001) on OS X. Is there any python code to read the OS X I/O Registry ??? I can parse this to find the information I need. Thanks, Brendan. |
From: Brendan S. (eTRIX) <Bre...@eT...> - 2009-06-21 12:57:04
|
I can't seem to read the Manufacturer and Serial Number string from USB devices. I have tried : dev.open().getString( dev.iManufacturer, 30) but i just get an error as follows. usb.USBError: usb_control_msg(DeviceRequestTO): unknown error What is my mistake ?? Is there some other sample pyusb code to read the Manufacturer and Serial strings ?? Thanks, Brendan. |
From: Sarah M. <iku...@ya...> - 2009-06-17 16:00:10
|
You can also search the /sys/devices/ tree. On my system (SUSE 11.1, Linux 2.6), all usb devices appear in /sys/devices/pci0000:00/ subdirectories. The particular hardware-to-subdirectory mapping varies by boot, but there's lots of configuration information if you go sufficiently leafward in the tree, including vendorID, productID, /dev/ entry, and available configurations, interfaces, etc. The exact info and placement which shows up depends on the driver / hardware which you're using. I've three different USB/RS232 adapters, and have to identify each one in a different way - but I use the /sys/devices tree for all of them. Here's some code to do the search. Hopefully the comments and doc-strings are enough documentation to get it working. (You'll probably want to change all "runlog" calls to print statements since that references my own logging utility.) def sercheck(dirname,subdirstem,SerNumRE,Interface): '''Check if a given sysfs directory matches regular expression SerNumRE dirname is the full path to the subdirectory of /sys/devices/ containing the description of the device. subdirstem is a partial path to be used in forming the names of further subdirectories. SerNumRE is a regular expression describing the serial number of the target device Interface is a digit indexing the appropriate USB interface which corresponds to thte target scope. This function is designed for the USB-16COM-RM 16-port USB/RS-232 hub, but also works for the SeaLevel SeaLink #2113 USB/RS-232 adapter.''' if os.path.isfile(dirname+'/serial'): serialfile=open(dirname+'/serial',mode='r') sernum=serialfile.readline() serialfile.close() if SerNumRE.match(sernum): intflist=shortdir(dirname, re.escape(subdirstem+':1.'+Interface)) intfdir=intflist[0] foundlist=shortdir(dirname+'/'+intfdir, r'ttyUSB[0-9]+') foundat=foundlist[0] return foundat return False def MoxaCheck(dirname,subdirstem,DesiredName,rl): '''Check if a given sysfs directory matches the target scope number. dirname is the full path to the subdirectory of /sys/devices/ containing the description of the device. subdirstem is a partial path to be used in forming the names of further subdirectories. DesiredName is the name of a directory to seek on the prospective scope. The prospective scope is assumed to be the correct one iff a directory with this name is found on it. This function is designed for the MOXA UPort 1450I 4-port USB/RS-232 hub.''' #first check to see if this is a MOXA hub. if not os.path.isfile(dirname+'/manufacturer'): return False manufile=open(dirname+'/manufacturer',mode='r') manu=manufile.readline() manufile.close() if not manu.startswith('MOXA'): return False #now know we have a MOXA hub - look in its interface dir for subdirectories corresponding to the /dev entries intflist=shortdir(dirname, re.escape(subdirstem+':1.0')) intfdir=intflist[0] portlist=shortdir(dirname+'/'+intfdir, r'ttyMXUSB[0-9]+') #reorder portlist as a guess at the best order to search for the scope num=int(DesiredName[-1]) #assumes scopes 1-8 are attached to the MOXA hubs in order, 1-4 on one, 5-8 on the other num=(num-1)%4 #get the remainder modulo 4 while num!=int((portlist[0])[-1])%4: port=portlist.pop(-1) portlist.insert(0,port) for port in portlist: DevToCheck=port #contact this scope - assuming it's connected try: tempScope=SerScope((0,'TEMP','/dev/'+DevToCheck),rl,set([])) fileset=tempScope.ask('FILES:DIR?') if '"'+DesiredName+'"' in fileset: #check if this scope has the desired directory tempScope.close() return DevToCheck rl.log(2,'%s is a scope, but not the target one.'%DevToCheck) except IOError,msg: rl.log(2,'%s is not a scope, gave message %s'%(DevToCheck,msg)) return False def HubSearch1Tier(Target,IDmode,path,prefix,tier,Interface,runlog): '''Recursively searches for an RS-232 port attached via a USB-RS-232 hub. declaration: HubSearch1Tier(Target,IDmode,path,tier,runlog) Target - the identification string (Serial number or directory name) for the target scope IDmode - 1 or 3, depending on the hardware used to connect to the scope path - the base path where the search should begin prefix - portion of valid subdirectories which reflects higher-level search path tier - integer between 1 and 7, inclusive. Tier 1 is the root USB hub. Tier 7 is the leafmost possible device. Interface - 0 to 7 if the device interface specifies which scope to contact; -1 otherwise runlog - runlog.runlog instance for message logging This function is only intended to be called by USBRS232HubSearch() and by itself. This routine does a depth-first search.''' runlog.log(2,'Searching for %s in %s'%(Target,path)) #USB specifies max of 7 tiers. if tier==1: #This is the root hub, Tier 1. Is USB always in 0000:00:1d.x ?; get USB directories pattern=r'0000:00:1d\.[0-7]' #pattern is passed to shortdir to find directories for the next tier elif tier==2: #e.g. path='/sys/devices/pci0000:00/0000:00:1d.0' [Tier 2] pattern=r'usb[1-7]' #0 is hub controller itself? elif tier==3: #e.g. path='/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-2' [Tier 3] pattern=prefix+r'-[1-7]' elif tier in [4,5,6,7]: #Tier 4 e.g. path='/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2.1' #Tier 5 e.g. path='/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2.1/1-2.1.7' #Tier 6 e.g. '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2.1/1-2.1.7/1-2.1.7.4' #Tier 7 e.g. '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2.1/1-2.1.7/1-2.1.7.4.5' pattern=prefix+r'\.[1-7]' else: raise ValueError,'Tier must be an integer between 1 and 7, inclusive, not %f'%tier dirlist=shortdir(path,pattern) for subdir in dirlist: newpath=path+'/'+subdir if tier==2: newprefix=subdir[3] #1 char (usually?) for bus number else: newprefix=subdir if tier>=3: #can't attach serial scopes at tiers 1-3 if IDmode==1: foundat=sercheck(newpath,newprefix,Target,Interface) else: #IDmode==3 foundat=MoxaCheck(newpath,newprefix,Target,runlog) if foundat: runlog.log(2,'%s on %s.'%(Target, foundat)) return foundat if tier<7: foundat=HubSearch1Tier(Target,IDmode,newpath,newprefix,tier+1,Interface,runlog) if foundat: return foundat return False def USBRS232HubSearch(TargetSerNum,runlog): '''Searches for an RS-232 port attached via a USB-RS-232 hub. declaration: USBRS232HubSearch(TargetSerNum,runlog) TargetSerNum - serial number of the hardware USB/RS-232 converter for the target scope. The serial number of the leafmost USB device should be xxx, where the input TargetSerNum is SERxxxD. D should be the USB interface for the RS-232 port and must be between 0 and 7. runlog - runlog.runlog instance for message logging''' if TargetSerNum=='TEMP': #temporary serial number generated by MoxaCheck() to search for a scope raise IOError, "No scope at target location." runlog.log(0,'Searching for %s'%TargetSerNum) basepath='/sys/devices/pci0000:00' if TargetSerNum.startswith('SER'): #16-port USB/RS-232 hub or 1-port SeaLevel SeaLink adapter; ID by adapter's serial # & interface TSNre=re.compile(r'\ASER\S+?[0-7]\Z') if not TSNre.match(TargetSerNum): raise ValueError, 'Invalid serial number %s'%TargetSerNum #serial number devstr=TargetSerNum[3:len(TargetSerNum)-1] SerNumRE=re.compile(devstr+r'\s*') Interface=TargetSerNum[len(TargetSerNum)-1] #single-character interface num return HubSearch1Tier(SerNumRE,1,basepath,'',1,Interface,runlog) elif TargetSerNum.startswith('COM'): #RS-232 port directly on the computer return '/dev/ttyS0' #This might even be general - anything's possible elif TargetSerNum.startswith('moxa'): #MOXA UPort 1450I 4-port USB/RS-232 hub DesiredName=TargetSerNum[4:] return HubSearch1Tier(DesiredName,3,basepath,'',1,-1,runlog) else: raise ValueError, 'Invalid serial number %s'%TargetSerNum Your milage may vary. -Sarah --- On Wed, 6/17/09, Santiago Palomino Sanchez-Manjavacas <sp...@gm...> wrote: From: Santiago Palomino Sanchez-Manjavacas <sp...@gm...> Subject: Re: [Pyusb-users] Mapping usb serial devices to device filenames To: Bre...@et..., pyu...@li... Date: Wednesday, June 17, 2009, 3:08 AM Hi, This is based on a script that I downloaded with Porus. I think it was called porustest.py: http://prdownload.berlios.de/porus/porus-0.1.1.tgz I recommend you to test it. It has a command interface that is useful for debugging. Self is the command interpreter object, def getdevs(): """Returns a flat array of configs on all busses -- ie an array of tuples of (bus,dev,conf). Array is guaranteed to be sorted by bus and dev. Used for giving numbers to configs""" rtn=[] for b in usb.busses(): for d in b.devices: for c in d.configurations: rtn.append((b,d,c)) return rtn I don't know much about the serial part, but I would look into how serial.Serial(port) is implemented. May be you need to change it a bit if you want to open a device by PID and VID. I guess that it opens the device and claims an interface, but I haven't used that library. I hope this helps. Ah, I forgot On Wed, Jun 17, 2009 at 9:27 AM, Brendan Simon (eTRIX) <Bre...@et...> wrote: Thanks Santiago :) Unfortunately I'm new to usb so it's not making too much sense at the moment. What is the class object that self is referring to here ? Is getdevs() your own function or a standard os function ? Presumably getdevs calls something like usb.busses() somewhere ? I don't see how this gives me the name of the serial device (eg. /dev/cu.usbmodem0001) that I can then reference with pyserial Serial() function. example: port = '/dev/cu.usbmodem0001' # need to auto detect/determine this ser = serial.Serial( port ) Thanks Brendan. Santiago Palomino Sanchez-Manjavacas wrote: > Well, you can use the device VID and PID to select which device to open. > I use something like: > > def do_d(self, args): > if self.devh is not None: > self.do_close('') > #ls > if self.devh is None: > self.devs=getdevs() > shortlist(self.devs) > dn = -1; > index = 0; > for d in self.devs: > if (d[1].idVendor == 0xFFFF and d[1].idProduct == 0x0000): > dn = index; > index = index + 1; > if(dn == -1): > return 1 > self.curdev=self.devs[dn] > self.devh=self.curdev[1].open() > self.devn=dn > self.devh.setConfiguration(self.curdev[2]) > > self.devh.claimInterface(self.curdev[2].interfaces[0][0]) > self.devh.setAltInterface(0) > > > > On Wed, Jun 17, 2009 at 7:14 AM, Brendan Simon (eTRIX) > <Bre...@et... <mailto:Bre...@et...>> wrote: > > I have a device with a usb connection that presents itself as a serial > device to operating system (OS X). > It appears as /dev/cu.usbmodem0001 and /dev/tty.usbmodem0001 on the > filesystem when the device is plugged in. > > I can successfully detect the device USB Vendor ID and Product ID using > pyusb :) > > Now I have to use pyserial to talk to the device -- which I have > successfully done by opening the serial port with a hard coded device > filename (/dev/cu.usbmodem0001). > > There must be some way for me to use the pyusb information to be able to > determine the appropriate device filename to open with pyusb. > > Does anyone know how to do this or have any suggestions ??? > > Thanks, Brendan. -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects -----Inline Attachment Follows----- _______________________________________________ Pyusb-users mailing list Pyu...@li... https://lists.sourceforge.net/lists/listinfo/pyusb-users |
From: Santiago P. Sanchez-M. <sp...@gm...> - 2009-06-17 08:08:20
|
Hi, This is based on a script that I downloaded with Porus. I think it was called porustest.py: http://prdownload.berlios.de/porus/porus-0.1.1.tgz I recommend you to test it. It has a command interface that is useful for debugging. Self is the command interpreter object, def getdevs(): """Returns a flat array of configs on all busses -- ie an array of tuples of (bus,dev,conf). Array is guaranteed to be sorted by bus and dev. Used for giving numbers to configs""" rtn=[] for b in usb.busses(): for d in b.devices: for c in d.configurations: rtn.append((b,d,c)) return rtn I don't know much about the serial part, but I would look into how serial.Serial(port) is implemented. May be you need to change it a bit if you want to open a device by PID and VID. I guess that it opens the device and claims an interface, but I haven't used that library. I hope this helps. Ah, I forgot On Wed, Jun 17, 2009 at 9:27 AM, Brendan Simon (eTRIX) < Bre...@et...> wrote: > Thanks Santiago :) > Unfortunately I'm new to usb so it's not making too much sense at the > moment. > > What is the class object that self is referring to here ? > > Is getdevs() your own function or a standard os function ? > Presumably getdevs calls something like usb.busses() somewhere ? > > I don't see how this gives me the name of the serial device (eg. > /dev/cu.usbmodem0001) that I can then reference with pyserial Serial() > function. > example: > port = '/dev/cu.usbmodem0001' # need to auto detect/determine this > ser = serial.Serial( port ) > > Thanks Brendan. > > > Santiago Palomino Sanchez-Manjavacas wrote: > > Well, you can use the device VID and PID to select which device to open. > > I use something like: > > > > def do_d(self, args): > > if self.devh is not None: > > self.do_close('') > > #ls > > if self.devh is None: > > self.devs=getdevs() > > shortlist(self.devs) > > dn = -1; > > index = 0; > > for d in self.devs: > > if (d[1].idVendor == 0xFFFF and d[1].idProduct == > 0x0000): > > dn = index; > > index = index + 1; > > if(dn == -1): > > return 1 > > self.curdev=self.devs[dn] > > self.devh=self.curdev[1].open() > > self.devn=dn > > self.devh.setConfiguration(self.curdev[2]) > > > > self.devh.claimInterface(self.curdev[2].interfaces[0][0]) > > self.devh.setAltInterface(0) > > > > > > > > On Wed, Jun 17, 2009 at 7:14 AM, Brendan Simon (eTRIX) > > <Bre...@et... <mailto:Bre...@et...>> wrote: > > > > I have a device with a usb connection that presents itself as a > serial > > device to operating system (OS X). > > It appears as /dev/cu.usbmodem0001 and /dev/tty.usbmodem0001 on the > > filesystem when the device is plugged in. > > > > I can successfully detect the device USB Vendor ID and Product ID > using > > pyusb :) > > > > Now I have to use pyserial to talk to the device -- which I have > > successfully done by opening the serial port with a hard coded device > > filename (/dev/cu.usbmodem0001). > > > > There must be some way for me to use the pyusb information to be able > to > > determine the appropriate device filename to open with pyusb. > > > > Does anyone know how to do this or have any suggestions ??? > > > > Thanks, Brendan. > > |
From: Brendan S. (eTRIX) <Bre...@eT...> - 2009-06-17 07:27:30
|
Thanks Santiago :) Unfortunately I'm new to usb so it's not making too much sense at the moment. What is the class object that self is referring to here ? Is getdevs() your own function or a standard os function ? Presumably getdevs calls something like usb.busses() somewhere ? I don't see how this gives me the name of the serial device (eg. /dev/cu.usbmodem0001) that I can then reference with pyserial Serial() function. example: port = '/dev/cu.usbmodem0001' # need to auto detect/determine this ser = serial.Serial( port ) Thanks Brendan. Santiago Palomino Sanchez-Manjavacas wrote: > Well, you can use the device VID and PID to select which device to open. > I use something like: > > def do_d(self, args): > if self.devh is not None: > self.do_close('') > #ls > if self.devh is None: > self.devs=getdevs() > shortlist(self.devs) > dn = -1; > index = 0; > for d in self.devs: > if (d[1].idVendor == 0xFFFF and d[1].idProduct == 0x0000): > dn = index; > index = index + 1; > if(dn == -1): > return 1 > self.curdev=self.devs[dn] > self.devh=self.curdev[1].open() > self.devn=dn > self.devh.setConfiguration(self.curdev[2]) > > self.devh.claimInterface(self.curdev[2].interfaces[0][0]) > self.devh.setAltInterface(0) > > > > On Wed, Jun 17, 2009 at 7:14 AM, Brendan Simon (eTRIX) > <Bre...@et... <mailto:Bre...@et...>> wrote: > > I have a device with a usb connection that presents itself as a serial > device to operating system (OS X). > It appears as /dev/cu.usbmodem0001 and /dev/tty.usbmodem0001 on the > filesystem when the device is plugged in. > > I can successfully detect the device USB Vendor ID and Product ID using > pyusb :) > > Now I have to use pyserial to talk to the device -- which I have > successfully done by opening the serial port with a hard coded device > filename (/dev/cu.usbmodem0001). > > There must be some way for me to use the pyusb information to be able to > determine the appropriate device filename to open with pyusb. > > Does anyone know how to do this or have any suggestions ??? > > Thanks, Brendan. |
From: Santiago P. Sanchez-M. <sp...@gm...> - 2009-06-17 06:56:30
|
Well, you can use the device VID and PID to select which device to open. I use something like: def do_d(self, args): if self.devh is not None: self.do_close('') #ls if self.devh is None: self.devs=getdevs() shortlist(self.devs) dn = -1; index = 0; for d in self.devs: if (d[1].idVendor == 0xFFFF and d[1].idProduct == 0x0000): dn = index; index = index + 1; if(dn == -1): return 1 self.curdev=self.devs[dn] self.devh=self.curdev[1].open() self.devn=dn self.devh.setConfiguration(self.curdev[2]) self.devh.claimInterface(self.curdev[2].interfaces[0][0]) self.devh.setAltInterface(0) On Wed, Jun 17, 2009 at 7:14 AM, Brendan Simon (eTRIX) < Bre...@et...> wrote: > I have a device with a usb connection that presents itself as a serial > device to operating system (OS X). > It appears as /dev/cu.usbmodem0001 and /dev/tty.usbmodem0001 on the > filesystem when the device is plugged in. > > I can successfully detect the device USB Vendor ID and Product ID using > pyusb :) > > Now I have to use pyserial to talk to the device -- which I have > successfully done by opening the serial port with a hard coded device > filename (/dev/cu.usbmodem0001). > > There must be some way for me to use the pyusb information to be able to > determine the appropriate device filename to open with pyusb. > > Does anyone know how to do this or have any suggestions ??? > > Thanks, Brendan. > > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > |
From: Brendan S. (eTRIX) <Bre...@eT...> - 2009-06-17 05:14:39
|
I have a device with a usb connection that presents itself as a serial device to operating system (OS X). It appears as /dev/cu.usbmodem0001 and /dev/tty.usbmodem0001 on the filesystem when the device is plugged in. I can successfully detect the device USB Vendor ID and Product ID using pyusb :) Now I have to use pyserial to talk to the device -- which I have successfully done by opening the serial port with a hard coded device filename (/dev/cu.usbmodem0001). There must be some way for me to use the pyusb information to be able to determine the appropriate device filename to open with pyusb. Does anyone know how to do this or have any suggestions ??? Thanks, Brendan. |