2015-03-29 12:42 GMT-03:00 Kyle Dotter <kdot...@ltu.edu>: > Currently I have a program that takes the serial number from an android > phone automatically and saves it to a certain list. However, I don't want > this process to be automated. There's an android app being written to go > with this program and we want there to be a button that the user has to > press in order for it to continue with the program. I'm confused about how > I am actually receiving messages from the phone, however. I've looked at the > tutorial and I'm wondering if it'd be as easy as just having a read command? > Something like > > message = <read device USB> > if message = <whatever I'm expecting, defined by the app> > <continue if good, keep waiting and checking if not> > > Is this doable? I'm not the best with python and this usb communication
Hi, If you are talking about the USB serial number, the device object has a property called 'serial_number' that returns what you want. > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > pyusb-users mailing list > pyusb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pyusb-users > -- Best Regards, Wander Lairson Costa ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users