Using the command listed in on the webpage (http://python.openxcplatform.com/en/master/tools/diag.html) results in:
$ openxc-diag add --message-id 0x7df --mode 0x1 --pid 0xc --frequency 1
usage: openxc-diag [-h]
[--usb | --serial | --bluetooth | --network | --trace TRACE_FILE]
[--usb-vendor USB_VENDOR] [--usb-product USB_PRODUCT]
[--bluetooth-address BLUETOOTH_ADDRESS]
[--serial-port SERIAL_PORT] [--serial-baudrate BAUDRATE]
[--network-host NETWORK_HOST] [--network-port NETWORK_PORT]
[--log-mode {off,stderr,file}] [--format {json,protobuf}]
--message MESSAGE --mode MODE [--bus BUS] [--pid PID]
[--payload PAYLOAD] [--frequency FREQUENCY]
{add,cancel}
openxc-diag: error: argument --message is required
I have assumed that the command has changed between what is on the webpage and what is currently available from the pip install and updated --message-id to --message:
$ openxc-diag add --message 0x7df --mode 0x1 --pid 0xc --frequency 1 --format json
Can't read logs from data source -- stopping: ("USB device couldn't be read", USBError(60, 'Operation timed out'))
Can't read from data source -- stopping: ("USB device couldn't be read", USBError(60, 'Operation timed out'))
Response: []
Response: [{u'success': True, u'bus': 1, u'pid': 12, u'value': 749, u'mode': 1, u'id': 2024}, {u'success': True, u'bus': 1, u'pid': 12, u'value': 749, u'mode': 1, u'id': 2025}]
$ openxc-dump --format json
Can't read from data source -- stopping: ("USB device couldn't be read", USBError(60, 'Operation timed out'))
Can't read logs from data source -- stopping: ("USB device couldn't be read", USBError(60, 'Operation timed out'))
And very occasionally (about 5% of the time) I get a different error:
openxc-dump --format json
Can't read from data source -- stopping: ("USB device couldn't be read", USBError(60, 'Operation timed out'))
Exception in thread Thread-2 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
File "/Library/Python/2.7/site-packages/openxc/sources/base.py", line 149, in run
File "/Library/Python/2.7/site-packages/openxc/sources/usb.py", line 75, in read_logs
File "/Library/Python/2.7/site-packages/openxc/sources/usb.py", line 88, in _read
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'core'
But sometimes (about 25% of the time) some data comes through before the "Operation timed out" occurs:
$ openxc-dump --format json
{"success": true, "bus": 1, "pid": 12, "value": 711.75, "mode": 1, "timestamp": 1468968769.636329, "id": 2025}
{"success": true, "bus": 1, "pid": 12, "value": 711.25, "mode": 1, "timestamp": 1468968769.640446, "id": 2024}
Can't read logs from data source -- stopping: ("USB device couldn't be read", USBError(60, 'Operation timed out'))
Can't read from data source -- stopping: ("USB device couldn't be read", USBError(60, 'Operation timed out'))
Not sure where to go from here to make forward progress.
Thanks,
Caleb