Commit graph

10 commits

Author SHA1 Message Date
Peter Wu
d26f0717a9 Add support for VS985 and others
The udev rules and Wireshark dissector still have idProduct hardcoded
for the time being, but lglaf.py detection logic is converted to use
heuristics instead.

Thanks to @invisiblek for testing and providing lsusb output.
2015-12-29 11:40:21 +01:00
Peter Wu
1eaebefe87 lglaf.py: Avoid reading from stdin
stdin points to /dev/graphics/fb0, might not be the greatest source of
input...
2015-12-27 12:54:44 +01:00
Peter Wu
88fa55bbd5 lglaf.py: Python 2 compatibility 2015-12-26 22:03:49 +01:00
Peter Wu
a8145a4a75 lglaf.py: allow skipping HELO
Just in case it causes interference, or to speed up things when you know
that the device is correct and in sync.
2015-12-26 14:51:28 +01:00
Peter Wu
e4544e50e5 lglaf.py: make device detection externally available
Useful for other scripts.
2015-12-26 01:09:07 +01:00
Peter Wu
13d0579db0 Try to make reset more robust
Implements message draining for serial devices and adds a HELO request
to ensure that the device is synchronized and speaks the protocol.
2015-12-25 15:55:15 +01:00
Peter Wu
0b38a8af0e lglaf.py: more helpful assertions 2015-12-25 15:48:30 +01:00
Peter Wu
0871e23c06 Auto-detect serial port on Windows 2015-12-24 23:58:34 +01:00
Peter Wu
ad8977611f Add '-c' option, workaround Windows crash
Fixes "AttributeError: 'NoneType' object has no attribute 'isatty'" for

    echo ls | lglaf.py --serial com4

Adding "python" avoids the crash.
2015-12-24 22:19:47 +01:00
Peter Wu
d5b3ae382f lglaf.py: Initial commit
Tested on Linux only.
2015-12-24 20:03:07 +01:00