There's a thread over on CN about a jailbreak for the AAP/Seestar, if anyone wants to poke around under the hood of their Seestar. I don't have one or access to one, so all I can see is what goes out in the patches, but not the base build.

Read More...

Was eyeballing a thread about stacking on the Seestar, got me wondering what ZWO was using for on-unit stacking, grabbed the 1.7.0 update and went nosing around.

root@Hadriel:/mnt/c/Users/billn/Downloads/ASIAIR# find . -name zwoair_imager | xargs grep extract.cpp
Binary file ./ASIAIR_2.1/assets/patch/deb/home/pi/ASIAIR/bin/zwoair_imager matches
Binary file ./Seestar_1.6.1.apk.d/assets/deb/home/pi/ASIAIR/bin/zwoair_imager matches
Binary file ./Seestar_1.7.0.apk.d/assets/deb/home/pi/ASIAIR/bin/zwoair_imager matches
root@Hadriel:/mnt/c/Users/billn/Downloads/ASIAIR# strings ASIAIR_2.1/assets/patch/deb/home/pi/ASIAIR/bin/zwoair_imager | grep extract.cpp
buf->bptr (bufw*bufh=%lu elements) at line %d in module ./sep/extract.cpp !
cat->thresh (nobj=%lu elements) at line %d in module ./sep/extract.cpp !
cat->npix (nobj=%lu elements) at line %d in module ./sep/extract.cpp !
cat->tnpix (nobj=%lu elements) at line %d in module ./sep/extract.cpp !
cat->xmin (nobj=%lu elements) at line %d in module ./sep/extract.cpp !
cat->xmax (nobj=%lu elements) at line %d in module ./sep/extract.cpp !
cat->ymin (nobj=%lu elements) at line %d in module ./sep/extract.cpp !
cat->ymax (nobj=%lu elements) at line %d in module ./sep/extract.cpp !

So that's SEP (github.com/kbarbary/sep), which is LGPLv3. It's statically compiled, though, not brought in as a lib.

Read More...

My only visibility into what's deployed right now is what's in the update package shipped with the APK. Since you can't download the base image as you can with the AAP, it'll be hard to know for sure until they push an update for that code, unless I can physically get my hands on one. Given their track record, that's likely the only way we'll know for sure.

Read More...

Cracking open the Seestar APK, some familiar looking bits inside.

The Skymap is, of course, Stellarium Web Engine, AGPL license, and thusly taints the Seestar application, both IOS and Android, and obligates ZWO to release source for it.

billn@Hadriel:~/Downloads/Seestar/assets/main/SkyMap/data$ ls
font  planets.ini  shaders  skydata  symbols  symbols.png  textures
billn@Hadriel:~/Downloads/Seestar/assets$ tar -xvf iscope.out
update_package.sh
deb/
deb/asiair_armhf.deb
others/
others/main_S50_1.4.8.bin
others/flash_power_led
others/imx462_CMK-OT1234-FV0_M00-2MP-F00.xml
others/imx462.ko

Cracking the asiair_armhf.deb..
billn@Hadriel:~/Downloads/Seestar/assets/deb/home/pi/ASIAIR$ find . | grep -v wav
.
./asiair.sh
./bin
./bin/air_ble
./bin/AM_Test
./bin/auto_shutdown.sh
./bin/bluetooth.sh
./bin/bsa_server
./bin/comets.py
./bin/common.sh
./bin/network.sh
./bin/old_log_mv.sh
./bin/planet.py
./bin/read_power_cm4.sh
./bin/read_power_mini.sh
./bin/read_power_rk.sh
./bin/run_update_pack.sh
./bin/set_timezone.sh
./bin/shutdownsvr.sh
./bin/Soft03Cmt.txt
./bin/start_INDI.sh
./bin/zwoair_daemon.sh
./bin/zwoair_guider
./bin/zwoair_imager
./bin/zwoair_updater
./config
./model
./model/yolov5s_small.rknn
./sound

Usual suspects for an ASIair derivation, with some new toys.

air_ble and bsa_server seem to be a bluetooth service implementation, ostensibly for connecting to the Seestar using bluetooth instead of wifi. They're both invoked by bluetooth.sh.

comets.py and planets.py are from pyephem (github.com/brandon-rhodes/pyephem), they get called by zwoair_imager:
billn@Hadriel:~/Downloads/Seestar/assets/deb/home/pi/ASIAIR/bin$ strings zwoair_imager | grep python
python3 %splanet.py %g %g %g
ps -ef|grep "python3 /etc/zwo/esptool/esptool.py"|grep -v grep|awk 'NR==1{print $2}'|xargs kill -9
python3 /etc/zwo/esptool/esptool.py -p /dev/ttyS5 -c esp32s3 write_flash 0x0000 /etc/zwo/esptool/espfirmware/bootloader.bin 0x8000 /etc/zwo/esptool/espfirmware/partition-table.bin 0xd000 /etc/zwo/esptool/espfirmware/ota_data_initial.bin 0x10000
python3 %scomets.py %g %g %g

Well, that's an interesting find. esptool.py is part of this toolset: github.com/espressif/esptool
"A Python-based, open-source, platform-independent utility to communicate with the ROM bootloader in Espressif chips"

This is GPL2.0 covered code.

Looking at that main binaries, compared to the last ASIair release:
billn@Hadriel:~/Downloads/Seestar/assets/deb/home/pi/ASIAIR/bin$ ls -al ~/Downloads/ASIAIR/ASIAIR_2.1/assets/patch/deb/home/pi/ASIAIR/bin/zwoair_*
-rwxrwxrwx 1 billn billn     1317 Jun 20  2022 /home/billn/Downloads/ASIAIR/ASIAIR_2.1/assets/patch/deb/home/pi/ASIAIR/bin/zwoair_ap_led.sh
-rwxrwxrwx 1 billn billn     5882 Nov 14  2022 /home/billn/Downloads/ASIAIR/ASIAIR_2.1/assets/patch/deb/home/pi/ASIAIR/bin/zwoair_daemon.sh
-rwxrwxrwx 1 billn billn  1601224 Feb 21 02:23 /home/billn/Downloads/ASIAIR/ASIAIR_2.1/assets/patch/deb/home/pi/ASIAIR/bin/zwoair_guider
-rwxrwxrwx 1 billn billn 18961784 Feb 21 02:23 /home/billn/Downloads/ASIAIR/ASIAIR_2.1/assets/patch/deb/home/pi/ASIAIR/bin/zwoair_imager
-rwxrwxrwx 1 billn billn   358352 Feb 21 02:23 /home/billn/Downloads/ASIAIR/ASIAIR_2.1/assets/patch/deb/home/pi/ASIAIR/bin/zwoair_updater
billn@Hadriel:~/Downloads/Seestar/assets/deb/home/pi/ASIAIR/bin$ ls -al zwoair_*
-rwxrwxrwx 1 billn billn    2357 Aug  2 22:10 zwoair_daemon.sh
-rwxrwxrwx 1 billn billn 1298064 Aug 18 00:57 zwoair_guider
-rwxrwxrwx 1 billn billn 3254720 Aug 18 00:57 zwoair_imager
-rwxrwxrwx 1 billn billn  399620 Aug 18 00:57 zwoair_updater

Looks like the guider is a bit leaner, but the imager is much, much leaner. Given that the Seestar is fixed hardware, the obvious missing bits would include the entirety of libgphoto2 and all DSLR support.

Let's crack open the imager and see what's under the hood:

billn@Hadriel:~/Downloads/Seestar/assets/deb/home/pi/ASIAIR/bin$ strings zwoair_imager | grep ^lib | more
libcfitsio.so.7
libopencv_imgcodecs.so.3.2
libopencv_highgui.so.3.2
libopencv_imgproc.so.3.2
libopencv_core.so.3.2
libopencv_features2d.so.3.2
libopencv_calib3d.so.3.2
libopencv_video.so.3.2
libusb-1.0.so.0
libusb_get_device_descriptor
libusb_handle_events_timeout
libusb_get_config_descriptor
libusb_hotplug_register_callback
libusb_hotplug_deregister_callback
libusb_init
libusb_exit
libusb_free_config_descriptor
libz.so.1
libnova-0.16.so.0
libxml2.so.2
libjpeg.so.62
libcrypto.so.1.1
libpigpiod_if2.so.1
libwcs.so.6
libgsl.so.23
libgslcblas.so.0
libavcodec.so.58
libavutil.so.56
libavformat.so.58
librockchip_mpp.so.1
librt.so.1
libmedia-ctl.so
librkaiq.so
libeasymedia.so.1
libdl.so.2
librknn_api.so
libstdc++.so.6
libm.so.6
libgomp.so.1
libgcc_s.so.1
libpthread.so.0
libc.so.6
libusb_init fail
libusb_exit

Breaking those down:
libcfitsio: Used for FITS file format, typically under a custom license that allows free use.
libopencv: OpenCV libraries, typically under the Apache 2 License.
libusb: Usually under the LGPL (Lesser General Public License), or a similar permissive license.
libz: Usually under the zlib License, a permissive free software license.
libnova: Likely under LGPL.
libxml2: Typically under the MIT License.
libjpeg: Custom free software license, similar to the BSD License.
libcrypto: Part of OpenSSL, which used to be under a custom license but is now under Apache License 2.0 as of version 3.0.0.
libpigpiod_if2: Likely under the Unlicense.
libwcs: WCSLIB, FITS/World Coordinate System lib, https://www.atnf.csiro.au/people/mcalabre/WCS/wcslib/, GPL3.
libgsl: GNU Scientific Library, under the GPL. 
libavcodec, libavutil, libavformat: Part of FFmpeg, generally under the LGPL or GPL depending on how it was compiled.
librockchip_mpp: Rockchip specific (https://github.com/rockchip-linux/mpp/), Apache2/MIT license.
librt, libmedia-ctl, librkaiq, libeasymedia, libdl, librknn_api, libstdc++, libm, libgomp, libgcc_s, libpthread, libc: These are likely standard system libraries, often under the LGPL or another permissive license, depending on the system.
[code]

I think I noted libwcs before, possible I missed it, but libgsl is a death knell, that's not just GPL covered, that's GNU covered code. Stepping back and taking a wider gander for libwcs:
[code]
billn@Hadriel:~/Downloads/ASIAIR$ find . -name zwoair_imager
./ASIAIR_1.0.4_Apkpure.apk.d/assets/root/home/pi/ASIAIR/bin/zwoair_imager
./ASIAIR_1.0.5_Apkpure.apk.d/assets/root/home/pi/ASIAIR/bin/zwoair_imager
./ASIAIR_1.0.8/assets/root/home/pi/ASIAIR/bin/zwoair_imager
./ASIAIR_1.0.9/assets/root/home/pi/ASIAIR/bin/zwoair_imager
./ASIAIR_1.1_Apkpure.apk.d/assets/root/home/pi/ASIAIR/bin/zwoair_imager
./ASIAIR_1.3/assets/root/home/pi/ASIAIR_new/bin/zwoair_imager
./ASIAIR_2.1/assets/patch/deb/home/pi/ASIAIR/bin/zwoair_imager
billn@Hadriel:~/Downloads/ASIAIR$ find . -name zwoair_imager | xargs strings | grep libwcs
libwcs.so.6
billn@Hadriel:~/Downloads/ASIAIR$ find . -name zwoair_imager | xargs grep libwcs
Binary file ./ASIAIR_2.1/assets/patch/deb/home/pi/ASIAIR/bin/zwoair_imager matches

So that seems like a recent addition to both the ASIAir and thusly the Seestar. That likely means it's in the AM3/AM5 app as well.

Something interesting in the unpack:
billn@Hadriel:~/Downloads/Seestar/assets/deb/home/pi/ASIAIR/bin$ ls ../model/
yolov5s_small.rknn

This looks like the yolo5s_small model for use with the opencv libraries. While sifting through the updater, I found a couple hardware references that hint at the hardware involved:
ZWO AirPlus-RK3568
Rockchip RV1126

The Rockchip RV1126: www.vcancn.com/products/development-board
The RK3568: www.96rocks.com/blog/2020/11/28/introduce-rockchip-rk3568/

Some features of the RK3568:
Integrated efficient RKNN AI processing unit
NPU with 1TOPs computing power
Embedded neural network hardware accelerator, support INT8, INT16, FP16 efficient operation
NPU hardware natively supports technologies such as pre-processing merging, channel quantization, and zero skipping
Support lossless compression of INT8, INT16, FP16 neural network parameters
The NPU core supports ordinary convolution, depth separable convolution, deconvolution, hole convolution, fully connected layer and pooling layer
NPU internal blocks include multiply-add operations, activation, LUT and precision conversion units, and support custom layer construction
Support one-click model conversion, support Caffe/TensorFlow/TF-Lite/ONNX/PyTorch/Keras/Darknet mainstream framework models

Now that's all fun and interesting, so the Seestar has a neural net processor and is rocking a CV model that will let it recognize things. I don't see a plate solver in this package, but, since they're likely following the embedded OS model of the Plus and Mini model, where a fallback/reset image is stored on the MMC, the only files that will appear in the update packages like this will be things that need updating. You'll note the absence of an indi-y package, as we usually see. Given that this is fixed hardware set, I wouldn't be shocked if there's simply no need for an INDI layer. I can't find a reference to the start_INDI.sh in here anywhere, even though it's still present. Probably just overlooked cruft that didn't get cleaned out.

Hopping back up the stack a little, let's circle back to something I noted during the unpack:
billn@Hadriel:~/Downloads/Seestar/assets/others$ strings main_S50_1.4.8.bin  | more
1.2.7-64-g7ddff06-dirty
Seestar
19:02:16
Aug  7 2023
v4.4.5
tls != NULL
/IDF/components/pthread/pthread_local_storage.c
pthread_local_storage_thread_deleted_callback
cpu_start
[0;32mI (%u) %s: App cpu up.
[0;32mI (%u) %s: Pro cpu up.
[0;31mE (%u) %s: Running on single core variant of a chip, but app is built with multi-core support.
[0;31mE (%u) %s: Check that CONFIG_FREERTOS_UNICORE is enabled in menuconfig
[0;32mI (%u) %s: Starting app cpu, entry point is %p
[0;33mW (%u) %s: 32 kHz XTAL not found, switching to internal 150 kHz oscillator
rtc_clk_xtal_freq_get() == RTC_XTAL_FREQ_40M
/IDF/components/esp_system/port/soc/esp32s3/clk.c

I suspect this is what the ESP interface is for, this binary gets pushed to a daughterboard over GPIO, and this is actual mount interface for motor controls.
billn@Hadriel:~/Downloads/Seestar/assets/others$ strings main_S50_1.4.8.bin  | grep az
azm_slew1_irun
azm_slew1_irun = %d
azm_slew1_ihold
azm_slew1_ihold = %d
azm_slew2_irun
azm_slew2_irun = %d
azm_slew2_ihold
azm_slew2_ihold = %d
azm_track1_irun
azm_track1_irun = %d
azm_track1_ihold
azm_track1_ihold = %d
azm_track2_irun
azm_track2_irun = %d
azm_track2_ihold
azm_track2_ihold = %d
azm irun = %d
 azm ihold = %d
 azm irun = %d
azm irun = %d
azm ihold = %d

I'd be willing to bet the AM3/AM5 use the same base design.

Read More...

I have a theory as to why, but I'm curious why you haven't held ZWO to account for infringing indilib they way they have. There's clearly enough evidence to support the notion that they're infringing, and only doing the absolute bare minimum, if that, in terms of gpl/lgpl compliance, when forced to.

Read More...

Nothing new to report, in the way of impactful changes. They published a source tree for their astrometry.net fork after being notified of violation, so technically they've met the requirement there. I've been in contact with a few other lib owners, with no motion to report. I've also been having a conversation with Apple's legal team about the use of GPL code in the app, without meeting the distribution terms of the GPL, but that's slow going. I won't have anything new to report until the next version drop from ZWO, or one of the lib owners responds. When I know, I'll pass it on.

Read More...