1*bf47c682SAndroid Build Coastguard Worker## Using WALT on ChromeOS 2*bf47c682SAndroid Build Coastguard Worker 3*bf47c682SAndroid Build Coastguard WorkerWALT can be used on ChromeOS in two different modes: 4*bf47c682SAndroid Build Coastguard Worker 1. Via the [pywalt/walt.py](/pywalt/walt.py) command line script - for this mode refer to [pywalt/README.md](/pywalt/README.md) 5*bf47c682SAndroid Build Coastguard Worker 1. Using the [WALT Android app](https://play.google.com/store/apps/details?id=org.kamrik.latency.walt) and walt.py script as a bridge 6*bf47c682SAndroid Build Coastguard Worker 7*bf47c682SAndroid Build Coastguard Worker 8*bf47c682SAndroid Build Coastguard WorkerFor either mode you will need to use a ChromeOS test image - 9*bf47c682SAndroid Build Coastguard Worker[some pointers on how to get it installed](https://www.chromium.org/chromium-os/testing/autotest-developer-faq/ssh-test-keys-setup) 10*bf47c682SAndroid Build Coastguard Worker 11*bf47c682SAndroid Build Coastguard WorkerCopy the [pywalt/](/pywalt) directory from WALT repo to the Chromebook. One option is to download a repo tarball directly from GitHub: 12*bf47c682SAndroid Build Coastguard Worker 13*bf47c682SAndroid Build Coastguard Worker``` 14*bf47c682SAndroid Build Coastguard Workerwget https://github.com/google/walt/archive/master.tar.gz 15*bf47c682SAndroid Build Coastguard Workertar -xzf master.tar.gz 16*bf47c682SAndroid Build Coastguard Workercd walt-master/pywalt 17*bf47c682SAndroid Build Coastguard Worker./walt.py --help 18*bf47c682SAndroid Build Coastguard Worker``` 19*bf47c682SAndroid Build Coastguard Worker 20*bf47c682SAndroid Build Coastguard Worker 21*bf47c682SAndroid Build Coastguard Worker 22*bf47c682SAndroid Build Coastguard WorkerConnect WALT to Chromebook's USB port and test the setup by running: `$ ./walt.py -t sanity` on the Chromebook. 23*bf47c682SAndroid Build Coastguard WorkerThis continuously displays readings from WALT's sensors (press Ctrl-C to stop): 24*bf47c682SAndroid Build Coastguard Worker``` 25*bf47c682SAndroid Build Coastguard WorkerStarting sanity test 26*bf47c682SAndroid Build Coastguard Workerq G:480 PD_screen:3 PD_laser:910 min-max: 480-480 3-3 910-910 27*bf47c682SAndroid Build Coastguard Workerq G:514 PD_screen:3 PD_laser:896 min-max: 480-514 3-3 896-910 28*bf47c682SAndroid Build Coastguard Workerq G:486 PD_screen:4 PD_laser:894 min-max: 480-514 3-4 894-910 29*bf47c682SAndroid Build Coastguard Workerq G:509 PD_screen:4 PD_laser:891 min-max: 480-514 3-4 891-910 30*bf47c682SAndroid Build Coastguard Worker... 31*bf47c682SAndroid Build Coastguard Worker``` 32*bf47c682SAndroid Build Coastguard WorkerThe first reading `G` is the accelerometer, it should change when WALT is rotated. 33*bf47c682SAndroid Build Coastguard Worker`PD_screen` and `PD_laser` are the light sensors (photodiodes), shading them or exposing to light should change their readings. 34*bf47c682SAndroid Build Coastguard Worker 35*bf47c682SAndroid Build Coastguard Worker 36*bf47c682SAndroid Build Coastguard Worker### Using WALT Android app 37*bf47c682SAndroid Build Coastguard Worker 38*bf47c682SAndroid Build Coastguard WorkerIf you intend to run the android app, run walt.py in TCP bridge mode. This is needed because Android container on ChromeOS has no access to USB. 39*bf47c682SAndroid Build Coastguard Worker - `iptables -A INPUT -p tcp --dport 50007 -j ACCEPT` 40*bf47c682SAndroid Build Coastguard Worker - `./walt.py -t bridge` 41*bf47c682SAndroid Build Coastguard Worker 42*bf47c682SAndroid Build Coastguard WorkerThe script will respond with `Listening on port 50007`. It can be stopped by pressing Ctrl-C. At this point you should be able to use the WALT Android app as if it's running on a regular Android device. If you reset or reconnect the WALT device, you'll need to re-run the script (no need to re-run the iptables command). 43*bf47c682SAndroid Build Coastguard Worker 44*bf47c682SAndroid Build Coastguard WorkerIf you need to deploy your own version of WALT Android app, follow instruction in [Development.md](Development.md) 45