The lsusb output is:
Code: Select all
Bus 001 Device 011: ID 045e:07fd Microsoft Corp.
Bus 001 Device 019: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen
Bus 001 Device 010: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 009: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Code: Select all
import evdev
from evdev import InputDevice
devices = [evdev.InputDevice(fn) for fn in evdev.list_devices()]
for device in devices:
print(device.fn, device.name, device.phys)
dev = InputDevice('/dev/input/event3')
for event in dev.read_loop():
print(event)
Code: Select all
/dev/input/event3 eGalax Inc. USB TouchController usb-3f980000.usb-1.2/input0
/dev/input/event2 Microsoft Microsoft Nano Transceiver 1.1 usb-3f980000.usb-1.4/input2
/dev/input/event1 Microsoft Microsoft Nano Transceiver 1.1 usb-3f980000.usb-1.4/input1
/dev/input/event0 Microsoft Microsoft Nano Transceiver 1.1 usb-3f980000.usb-1.4/input0
event at 1493313778.350586, code 330, type 01, val 01
event at 1493313778.350586, code 00, type 03, val 126
event at 1493313778.350586, code 01, type 03, val 70
event at 1493313778.350586, code 00, type 00, val 00
event at 1493313778.394576, code 00, type 03, val 125
event at 1493313778.394576, code 00, type 00, val 00
event at 1493313778.406592, code 00, type 03, val 124
event at 1493313778.406592, code 00, type 00, val 00
event at 1493313778.648907, code 330, type 01, val 00
event at 1493313778.648920, code 00, type 00, val 01
Traceback (most recent call last):
File "Touchscreen.py", line 10, in <module>
for event in dev.read_loop():
File "/usr/local/lib/python3.4/dist-packages/evdev/eventio.py", line 42, in read_loop
for event in self.read():
File "/usr/local/lib/python3.4/dist-packages/evdev/eventio.py", line 67, in read
events = _input.device_read_many(self.fd)
OSError: [Errno 19] No such device