2022-01-20 17:33:04 -07:00
|
|
|
# pysalx
|
|
|
|
`pysalx` - scripts for interacting with the SciAps XRF and LIBS analyzers.
|
|
|
|
|
2022-01-20 18:07:15 -07:00
|
|
|
|
|
|
|
# Installation
|
|
|
|
Tools to interact with the device are available in most free software
|
|
|
|
oriented distributions, such as Debian.
|
|
|
|
|
|
|
|
Install on a Debian workstation (running as user `debian`, hostname `workstation`)
|
|
|
|
example:
|
|
|
|
|
|
|
|
```
|
2022-01-20 18:35:16 -07:00
|
|
|
debian@workstation:~$ git clone https://spacecruft.org/spacecruft/pysalx
|
2022-01-20 18:07:15 -07:00
|
|
|
debian@workstation:~$ sudo apt update
|
|
|
|
debian@workstation:~$ sudo apt install adb
|
2022-01-20 18:35:16 -07:00
|
|
|
debian@workstation:~$ cd pysalx/
|
2022-01-20 18:07:15 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
# HOWTO
|
2022-01-20 18:35:16 -07:00
|
|
|
See `./scripts/` directory in this repo for current scripts.
|
2022-01-20 20:08:21 -07:00
|
|
|
|
2022-01-20 18:37:29 -07:00
|
|
|
Current scripts:
|
|
|
|
|
2022-01-20 20:08:21 -07:00
|
|
|
* `pysalx-backup-export` --- Backup the export directory, with spectra from
|
|
|
|
templates.
|
|
|
|
* `pysalx-backup-extsd` --- Backup the ext SD card.
|
|
|
|
* `pysalx-backup-fs` --- Backup whole file system. Not yet.
|
2022-01-20 18:37:29 -07:00
|
|
|
* `pysalx-backup-sd` --- Backup the SD card.
|
|
|
|
* `pysalx-install-deps` --- Install script dependencies (initial setup).
|
|
|
|
* `pysalx-tail-log` --- View the analyzer logfile in semi-real-time.
|
2022-01-20 18:35:16 -07:00
|
|
|
|
|
|
|
|
2022-01-20 18:07:15 -07:00
|
|
|
TODO HOWTOs
|
|
|
|
|
|
|
|
* Connect to device.
|
|
|
|
* Copy SD card data, such as samples and photos.
|
|
|
|
* Mount device.
|
|
|
|
* Initiate sampling remotely via USB and/or wifi.
|
|
|
|
|
|
|
|
|
2022-01-20 20:11:17 -07:00
|
|
|
## Usage
|
2022-01-20 18:07:15 -07:00
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
To see files, after connecting as show above. Examples (output not shown):
|
|
|
|
|
|
|
|
```
|
|
|
|
# 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/
|
|
|
|
```
|
|
|
|
|
|
|
|
To view debug logs in realtime:
|
|
|
|
|
|
|
|
```
|
|
|
|
debian@workstation:~$ adb shell tail -f /storage/sdcard0/ngl.log
|
|
|
|
```
|
|
|
|
|
2022-01-20 20:11:17 -07:00
|
|
|
# Notes
|
|
|
|
See more notes in the `doc/` directory.
|
|
|
|
|
2022-01-20 18:26:04 -07:00
|
|
|
|
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/
|
|
|
|
|
|
|
|
|
|
|
|
## SciAps Resources
|
|
|
|
SciAps sites.
|
|
|
|
|
|
|
|
* https://sciaps.com/
|
|
|
|
* https://www.youtube.com/c/SciAps/videos
|
|
|
|
* https://github.com/SciAps
|
|
|
|
|
|
|
|
|
2022-01-20 18:26:04 -07:00
|
|
|
# Unofficial
|
|
|
|
This repository, documentation and code is
|
|
|
|
unofficial, unaffiliated with SciAps.
|
|
|
|
|
2022-01-20 17:33:04 -07:00
|
|
|
|
|
|
|
# License
|
|
|
|
GPLv3+.
|
|
|
|
|
|
|
|
|
|
|
|
Copyright (C) 2022, Jeff Moe
|
|
|
|
|