forked from johncclayton/charger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
35 lines (24 loc) · 1.24 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Prerequisites:
- libusb - compiled via 3rdparty directory
- q4 + dev tools
- libsodium
- zeromq
I installed libsodium then zeromq from the net. The cppzmg library that comes with nzmqt is old and errors out due to missing zmq_event_t type - go get the latest single cppzmq.hpp from git and replace the file in 3rdparty/include.
Arch
----
Everything hangs together based on ZeroMQ. This allows me to write the components in whatever language I want, applicable to the task at hand.
Compiling libusb
================
Install libudev via this:
apt-get install libudev0
USB Interface
=============
The iCharger communicates via USB. It's driven by the icharger_usb program that provides the following service end-points:
req/resp - settings & commands
pub/sub - state of the device
For example, to get information about the iCharger system you would do the following:
- connect to all zeromq end points
- send an INIT_DONE request to the icharger_usb command interface
- wait for a INIT_CONFIRMED response from the publisher, this contains the initial state snapshot
After this has been done, further state responses are received on the pub/sub bus as any data changes. The frequencly of updates is controlled by
the icharger_usb service.