2022-01-20 17:33:04 -07:00
|
|
|
# pysalx
|
|
|
|
`pysalx` - scripts for interacting with the SciAps XRF and LIBS analyzers.
|
|
|
|
|
2022-01-20 17:55:02 -07:00
|
|
|
# SciAps Analyzers
|
|
|
|
In sum, they are Android-derived 64-bit ARM systems.
|
|
|
|
So they interact with standard free software Android
|
|
|
|
tools such as "Android Debug Bridge" (`adb`).
|
|
|
|
|
|
|
|
|
|
|
|
Equipment:
|
|
|
|
|
|
|
|
|
|
|
|
Z-903 LIBS Analyzer
|
|
|
|
|
|
|
|
* https://sciaps.com/libs-handheld-laser-analyzers/z-903-libs/
|
|
|
|
|
|
|
|
X-555 XRF Analyzer
|
|
|
|
|
|
|
|
* https://sciaps.com/xrf-handheld-x-ray-analyzers/x-555-xrf-gun/
|
|
|
|
|
|
|
|
|
|
|
|
## Hardware
|
|
|
|
```
|
|
|
|
root@ngl:/ # free
|
|
|
|
total used free shared buffers
|
|
|
|
Mem: 940616 788688 151928 0 31220
|
|
|
|
-/+ buffers: 757468 183148
|
|
|
|
Swap: 524284 16972 507312
|
|
|
|
|
|
|
|
root@ngl:/ # cat /proc/cpuinfo
|
|
|
|
Processor : AArch64 Processor rev 0 (aarch64)
|
|
|
|
processor : 0
|
|
|
|
processor : 1
|
|
|
|
processor : 2
|
|
|
|
processor : 3
|
|
|
|
Features : fp asimd evtstrm crc32
|
|
|
|
CPU implementer : 0x41
|
|
|
|
CPU architecture: 8
|
|
|
|
CPU variant : 0x0
|
|
|
|
CPU part : 0xd03
|
|
|
|
CPU revision : 0
|
|
|
|
|
|
|
|
Hardware : Qualcomm Technologies, Inc APQ8016
|
2022-01-20 17:56:45 -07:00
|
|
|
|
|
|
|
root@ngl:/ # df
|
|
|
|
Filesystem Size Used Free Blksize
|
|
|
|
/dev 459.3M 52.0K 459.2M 4096
|
|
|
|
/sys/fs/cgroup 459.3M 12.0K 459.3M 4096
|
|
|
|
/mnt/asec 459.3M 0.0K 459.3M 4096
|
|
|
|
/mnt/obb 459.3M 0.0K 459.3M 4096
|
|
|
|
/system 1.2G 1008.2M 172.7M 4096
|
|
|
|
/data 4.8G 151.7M 4.7G 4096
|
|
|
|
/cache 248.0M 152.0K 247.8M 4096
|
|
|
|
/persist 27.5M 168.0K 27.3M 4096
|
|
|
|
/firmware 64.0M 19.0M 44.9M 16384
|
|
|
|
/storage/extsdcard 14.4G 49.5M 14.4G 4096
|
|
|
|
/mnt/media_rw/sdcard0 15.0G 28.9M 15.0G 8192
|
|
|
|
/mnt/secure/asec 15.0G 28.9M 15.0G 8192
|
|
|
|
/storage/sdcard0 15.0G 28.9M 15.0G 8192
|
2022-01-20 17:55:02 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Operating System
|
|
|
|
Android. Kernel 3.10.49 dates to 2014, but it looks it is running their own patch/fork.
|
|
|
|
There is android kernel source available from SciAps. Haven't check if it is
|
|
|
|
complete/corresponding.
|
|
|
|
|
|
|
|
* https://github.com/SciAps/android-kernel
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
root@ngl:/ # uname -a
|
|
|
|
Linux localhost 3.10.49-g98ce14e #7 SMP PREEMPT Tue Sep 14 14:29:56 EDT 2021 aarch64 GNU/Linux
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## SciAps Resources
|
|
|
|
SciAps sites.
|
|
|
|
|
|
|
|
* https://sciaps.com/
|
|
|
|
* https://www.youtube.com/c/SciAps/videos
|
|
|
|
* https://github.com/SciAps
|
|
|
|
|
|
|
|
|
|
|
|
# Installation
|
|
|
|
Tools to interact with the device are likely available in most free software
|
|
|
|
oriented distributions, such as Debian.
|
|
|
|
|
|
|
|
Install on a Debian workstation (running as user `debian`, hostname `workstation`):
|
|
|
|
|
|
|
|
```
|
|
|
|
debian@workstation:~$ sudo apt update
|
|
|
|
debian@workstation:~$ sudo apt install adb
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
# HOWTO
|
|
|
|
TODO HOWTOs
|
|
|
|
|
|
|
|
* Connect to device.
|
|
|
|
* Copy SD card data, such as samples and photos.
|
|
|
|
* Mount device.
|
|
|
|
* Initiate sampling remotely via USB and/or wifi.
|
|
|
|
|
|
|
|
## Connect
|
|
|
|
You may need to set up permissions to access the device as non-root.
|
|
|
|
|
|
|
|
Run:
|
|
|
|
```
|
|
|
|
debian@workstation$ adb root
|
|
|
|
# If you don't have perms, something like:
|
|
|
|
debian@workstation:~$ sudo adb root
|
|
|
|
```
|
|
|
|
|
|
|
|
It should then say you are connected.
|
|
|
|
|
2022-01-20 18:03:39 -07:00
|
|
|
|
|
|
|
To see files, after connecting as show above. Examples (output not shown):
|
2022-01-20 17:55:02 -07:00
|
|
|
|
|
|
|
```
|
2022-01-20 18:03:39 -07:00
|
|
|
# See top level directory:
|
|
|
|
debian@workstation:~$ adb ls /
|
|
|
|
|
|
|
|
# See main sdcard where captured samples and photos are stored (main dir):
|
|
|
|
debian@workstation:~$ adb ls /storage/sdcard0/
|
|
|
|
|
2022-01-20 17:55:02 -07:00
|
|
|
```
|
|
|
|
|
2022-01-20 18:03:39 -07:00
|
|
|
To view debug logs in realtime:
|
|
|
|
|
|
|
|
```
|
|
|
|
debian@workstation:~$ adb shell tail -f /storage/sdcard0/ngl.log
|
|
|
|
```
|
2022-01-20 17:33:04 -07:00
|
|
|
|
|
|
|
# Unofficial
|
|
|
|
Unofficial, unaffiliated with SciAps.
|
|
|
|
|
|
|
|
|
|
|
|
# License
|
|
|
|
GPLv3+.
|
|
|
|
|
|
|
|
|
|
|
|
Copyright (C) 2022, Jeff Moe
|
|
|
|
|