Difference between revisions of "DreamCatcher"
RadioNerds (talk | contribs) |
RadioNerds (talk | contribs) |
||
(80 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | ==Specs (Version 2.03)== | ||
+ | <!-- <div class="mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}"> ---> | ||
+ | * L-band SAW filter (1525 - 1559 MHz) | ||
+ | * Two-stage L-band LNA with 34dB gain | ||
+ | * 1 PPM TCXO | ||
+ | * RF bypass for tuning from 24 - 1600 MHz - use as a regular RTL SDR! | ||
+ | * Software switchable bias tee | ||
+ | * 3 USB ports | ||
+ | * GPIO forest | ||
+ | * UARTs, I2C, SPI headers (unpopulated) for driving external hardware | ||
+ | * Two microSD card holders - for boot and storage! | ||
+ | * 1 GHz CPU | ||
+ | * 512 MB RAM | ||
+ | * USB wifi dongle (based on RTL8188CUS chipset) - AP mode capable! | ||
+ | * Lots of LEDs! | ||
+ | * Switches! | ||
+ | * microUSB OTG | ||
+ | * microUSB power port | ||
+ | * Audio In/Out | ||
+ | * Kernel Version 4.10 and Uboot (2017.01) support | ||
+ | </div> | ||
+ | |||
+ | |||
==Setting up the OS== | ==Setting up the OS== | ||
+ | <!-- <div class="mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}"> ---> | ||
There are two OSs that you can use on the DreamCatcher. | There are two OSs that you can use on the DreamCatcher. | ||
;Armbian | ;Armbian | ||
− | :Standard ARM Linux OS based on Debian, Highly supported but does NOT have build in support for Outernet. This OS requires lots of tweaking to up and going... | + | :Standard ARM Linux OS based on Debian, Highly supported but does NOT have build in support for Outernet. This OS requires lots of tweaking to get up and going... |
:{{zip|Armbian_5.27_Dreamcatcher_Debian_jessie_next_4.10.14_20170602.img.gz|Armbian for DreamCatcher, V5.27}} | :{{zip|Armbian_5.27_Dreamcatcher_Debian_jessie_next_4.10.14_20170602.img.gz|Armbian for DreamCatcher, V5.27}} | ||
+ | |||
+ | NOTE: The kernel in this version of Armbian cannot be updated with apt, there is an issue with the Device Trees that will brick the device. Before doing an apt upgrade, set a hold on the kernel packages like this: <pre>sudo apt-mark hold linux-dtb-next-sunxi linux-headers-next-sunxi linux-image-next-sunxi linux-firmware-image-next-sunxi </pre> | ||
;Skylark | ;Skylark | ||
:Os based on Busybox is read only and has the full Outernet system ready to go. This is the one to use if you want to play with outernet with no tweaking | :Os based on Busybox is read only and has the full Outernet system ready to go. This is the one to use if you want to play with outernet with no tweaking | ||
+ | |||
+ | ====Version 4.4==== | ||
:{{zip|skylark-dc-1705141809-passive-antenna.img.gz|Skylark, for the Passive Antenna, Released May 14, 2017}} | :{{zip|skylark-dc-1705141809-passive-antenna.img.gz|Skylark, for the Passive Antenna, Released May 14, 2017}} | ||
:{{zip|skylark-dc-1706222246-active-antenna.img.gz|Skylark, for the Active Antenna, Released June 22, 2017}} | :{{zip|skylark-dc-1706222246-active-antenna.img.gz|Skylark, for the Active Antenna, Released June 22, 2017}} | ||
− | ==Burning the image to an SD Card== | + | |
+ | ====Version 4.x==== | ||
+ | :{{zip|skylark-dc-1710101557.img.gz|Skylark, for both Antenna Types, Released October 10, 2017}} | ||
+ | |||
+ | |||
+ | ===Burning the image to an SD Card=== | ||
A microSD greater than 4GB in size is required. | A microSD greater than 4GB in size is required. | ||
− | ===Extract the image=== | + | ====Extract the image==== |
It is compressed using "gzip.", many common Unzipping tools on your chosen OS can un-compress these. | It is compressed using "gzip.", many common Unzipping tools on your chosen OS can un-compress these. | ||
Line 24: | Line 57: | ||
− | ===Write the image to the SD card=== | + | ====Write the image to the SD card==== |
− | |||
the best way to burn the SD card is by using etcher here---> https://etcher.io/ | the best way to burn the SD card is by using etcher here---> https://etcher.io/ | ||
+ | </div> | ||
+ | ====SkyLark Resetting to Default Values==== | ||
+ | <pre> | ||
+ | sudo rm -rf /mnt/conf | ||
+ | sudo reboot | ||
+ | </pre> | ||
− | + | ==Startup the DreamCatcher with Armbian Distro== | |
− | + | <!-- <div class="mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}"> ---> | |
− | |||
− | |||
1) Insert SD card into Dreamcatcher board slot marked "SD0_OS," next to LED array. | 1) Insert SD card into Dreamcatcher board slot marked "SD0_OS," next to LED array. | ||
Line 106: | Line 142: | ||
sudo poweroff | sudo poweroff | ||
+ | </div> | ||
+ | |||
+ | |||
+ | ==Custom Startup Scripts for Skylark== | ||
+ | <!-- <div class="mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}"> ---> | ||
+ | |||
+ | |||
+ | User scripts: | ||
+ | |||
+ | Skylark 1.2 has support for starting a user script at bootup. For the technically inclined, look at /etc/init.d/S99user, that should tell you all. | ||
+ | Instructions: | ||
− | ==Board LEDS== | + | ;1) first become root |
+ | :sudo su - | ||
+ | |||
+ | ;2) then make a directory called bin in /mnt/conf | ||
+ | :mkdir /mnt/conf/bin | ||
+ | |||
+ | ;3) in this directory create your script and call it user.sh | ||
+ | :vi /mnt/conf/bin/user.sh | ||
+ | |||
+ | as an example, heres a script that logs the snr every 10 seconds | ||
+ | |||
+ | <pre>#!/bin/sh | ||
+ | |||
+ | while true | ||
+ | do | ||
+ | a=$(wget -q -O - http://127.0.0.1/DIRECT/getTunerStatus | jq .result.snr) | ||
+ | echo -n $(date) ": " | ||
+ | echo $a | ||
+ | sleep 10 | ||
+ | done >> /mnt/downloads/snrlog.txt</pre> | ||
+ | |||
+ | |||
+ | ;4) make sure the script is executable, and owned by root | ||
+ | :chown root:root /mnt/conf/bin/user.sh | ||
+ | |||
+ | :chmod 755 /mnt/conf/bin/user.sh | ||
+ | |||
+ | Thats it. This script will automatically run at boot. | ||
+ | |||
+ | ''be careful though:'' | ||
+ | |||
+ | |||
+ | The script is run at the end of boot. So if you make changes to any service files or configs, you should restart that service as well. Be careful about how much RAM and CPU you consume in this script. Its a very limited system. | ||
+ | |||
+ | |||
+ | </div> | ||
+ | |||
+ | |||
+ | ==Hardware Details== | ||
+ | <!-- <div class="mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}"> ---> | ||
+ | ===Documentation=== | ||
+ | ;{{pdf|Allwinner_A13_datasheet.pdf|AllWinner A13 Processor Datasheet}} | ||
+ | ;{{pdf|AXP209_Datasheet_v1.0en.pdf|AXP209 Power Management IC Datasheet}} | ||
+ | |||
+ | <!--- https://forums.outernet.is/uploads/db5774/original/2X/5/5ceadd8158aeb3aa52f302928756b2d3f4b70c2e.tgz | ||
+ | |||
+ | |||
+ | ;Enhanced single Cell Li-Battery and Power System Management IC | ||
+ | :http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf | ||
+ | |||
+ | --> | ||
+ | |||
+ | ===Board LEDS=== | ||
Onboard LEDs can be controlled by writing to the ON/OFF Control file in SysFs. In the case of LED1/Pckts to turn on the led, write a 1 to the SYSFS Device On/Off Control. | Onboard LEDs can be controlled by writing to the ON/OFF Control file in SysFs. In the case of LED1/Pckts to turn on the led, write a 1 to the SYSFS Device On/Off Control. | ||
Line 117: | Line 216: | ||
<pre>echo 0 > /sys/class/leds/packet/brightness</pre> | <pre>echo 0 > /sys/class/leds/packet/brightness</pre> | ||
+ | |||
+ | {{led | ||
+ | |NAME=CHGLED | ||
+ | |DESCRIPTION=Indicates LiPo Battery Charging | ||
+ | |COLOR=Green | ||
+ | |DEFAULT_AT_BOOT=OFF | ||
+ | |SYSFS_DEVICE= | ||
+ | |USAGE= | ||
+ | |NOTES=indicate LiPo charge if it was used, but as it also introduces noise to the system LiPo powering option was eliminated | ||
+ | }} | ||
{{led | {{led | ||
Line 210: | Line 319: | ||
{{led | {{led | ||
|NAME=LED10 / AGP3 | |NAME=LED10 / AGP3 | ||
− | |DESCRIPTION= | + | |DESCRIPTION=Status indicator of Boot by default |
|COLOR=Red | |COLOR=Red | ||
|DEFAULT_AT_BOOT= | |DEFAULT_AT_BOOT= | ||
|SYSFS_DEVICE= | |SYSFS_DEVICE= | ||
|USAGE= | |USAGE= | ||
− | |NOTES= | + | |NOTES=AXP209.gpio2 |
}} | }} | ||
Line 225: | Line 334: | ||
|SYSFS_DEVICE= | |SYSFS_DEVICE= | ||
|USAGE= | |USAGE= | ||
− | |NOTES= | + | |NOTES=AXP209.gpio2 |
}} | }} | ||
Line 238: | Line 347: | ||
}} | }} | ||
− | ==RF Ports== | + | ===RF Ports=== |
There are two RF ports on the DreamCatcher, they are labeled "LNA_IN" (at the corner of the board), and "LNA_BYPASS". They are SMA Type connections. To enable them you will write a 0 or a 1 to the appropriate SYSFS file location. Writing a 1 will enable it, and a 0 will disable it. if you enable one, you must disable the other; | There are two RF ports on the DreamCatcher, they are labeled "LNA_IN" (at the corner of the board), and "LNA_BYPASS". They are SMA Type connections. To enable them you will write a 0 or a 1 to the appropriate SYSFS file location. Writing a 1 will enable it, and a 0 will disable it. if you enable one, you must disable the other; | ||
Line 245: | Line 354: | ||
− | ===Enable LNA_BYPASS=== | + | ====Enable LNA_BYPASS==== |
:This is normally selected when you are using an external LNA, or Active Antenna | :This is normally selected when you are using an external LNA, or Active Antenna | ||
<pre>echo 1 > /sys/class/leds/rfswitch1/brightness | <pre>echo 1 > /sys/class/leds/rfswitch1/brightness | ||
Line 251: | Line 360: | ||
− | ===Enable LNA_IN=== | + | ====Enable LNA_IN==== |
:This would be used with a passive antenna or internal LNA | :This would be used with a passive antenna or internal LNA | ||
<pre>echo 0 > /sys/class/leds/rfswitch1/brightness | <pre>echo 0 > /sys/class/leds/rfswitch1/brightness | ||
Line 257: | Line 366: | ||
− | ===Enable LNA_BYPASS Bias Tee=== | + | ====Enable LNA_BYPASS Bias Tee==== |
:To Enable the bias tee, use the following commands | :To Enable the bias tee, use the following commands | ||
:NOTE: 68 mA current limit set by R76/100k | :NOTE: 68 mA current limit set by R76/100k | ||
Line 263: | Line 372: | ||
echo out > /sys/class/gpio/gpio119/direction | echo out > /sys/class/gpio/gpio119/direction | ||
echo 1 > /sys/class/gpio/gpio119/value</pre> | echo 1 > /sys/class/gpio/gpio119/value</pre> | ||
+ | |||
+ | |||
+ | ====Enable Internal Audio Speaker Amplifier==== | ||
+ | |||
+ | <pre>sudo su | ||
+ | cd /sys/class/gpio | ||
+ | echo 114 > /sys/class/gpio/export | ||
+ | echo out > /sys/class/gpio/gpio114/direction | ||
+ | echo 1 > /sys/class/gpio/gpio114/value</pre> | ||
+ | |||
+ | |||
+ | Running “alsamixer”, turn up the volume (navigate with cursors, cursor up volume up) and un-mute all channels (pressing “m” key while cursor on them) | ||
+ | |||
+ | [[File:alsamixer.png|300px]] | ||
+ | |||
+ | |||
+ | |||
+ | Speaker amplifier output vias near C42, C43: | ||
+ | |||
+ | [[File:dreamcatcher_speaker.png|200px]] | ||
+ | |||
+ | ===Temperature Monitoring=== | ||
+ | Armbian includes a monitoring application that gives you access to some of the hardware level details... for example to determine the CPU Temp use the following command: <pre>armbianmonitor -m</pre> however this of little use in automated monitoring or application development. | ||
+ | |||
+ | |||
+ | <nowiki>Usage: armbianmonitor [-h] [-b] [-c $path] [-d $device] [-D] [-m] [-p] [-r] [-u] | ||
+ | |||
+ | ############################################################################ | ||
+ | |||
+ | Use armbianmonitor for the following tasks: | ||
+ | |||
+ | armbianmonitor -c /path/to/test performs disk health/performance tests | ||
+ | armbianmonitor -d monitors writes to $device | ||
+ | armbianmonitor -D tries to upload debug disk info to improve armbianmonitor | ||
+ | armbianmonitor -m provides simple CLI monitoring | ||
+ | armbianmonitor -p tries to install cpuminer for performance measurements | ||
+ | armbianmonitor -r tries to install RPi-Monitor | ||
+ | armbianmonitor -u tries to upload armhwinfo.log for support purposes | ||
+ | |||
+ | ############################################################################ | ||
+ | </nowiki> | ||
+ | |||
+ | ====Direct access to System Values==== | ||
+ | |||
+ | |||
+ | =====Board Temperature===== | ||
+ | The following returns the temperature of the CPU in Celsius | ||
+ | <pre>cat /sys/class/thermal/thermal_zone0/temp</pre> | ||
+ | Returns: | ||
+ | <pre>32900</pre> | ||
+ | This is the same as 32.9C | ||
+ | |||
+ | =====CPU Information===== | ||
+ | <pre>cat /proc/cpuinfo</pre> | ||
+ | Returns: | ||
+ | <pre>processor : 0 | ||
+ | model name : ARMv7 Processor rev 2 (v7l) | ||
+ | BogoMIPS : 858.75 | ||
+ | Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32 | ||
+ | CPU implementer : 0x41 | ||
+ | CPU architecture: 7 | ||
+ | CPU variant : 0x3 | ||
+ | CPU part : 0xc08 | ||
+ | CPU revision : 2 | ||
+ | |||
+ | Hardware : Allwinner sun4i/sun5i Families | ||
+ | Revision : 0000 | ||
+ | Serial : 1625428a0703290a | ||
+ | </pre> | ||
+ | |||
+ | ======Processor Features====== | ||
+ | ;half | ||
+ | :Half Word loads and stores | ||
+ | ;thumb | ||
+ | :Thumb (16-bit instruction set) | ||
+ | ;fastmult | ||
+ | :32×32→64-bit multiplication | ||
+ | ;vfp | ||
+ | :VFP (early SIMD vector floating point instructions) | ||
+ | ;edsp | ||
+ | :DSP extensions (the 'e' variant of the ARM9 CPUs, and all others above) | ||
+ | ;thumbee | ||
+ | :ThumbEE | ||
+ | ;neon | ||
+ | :Advanced SIMD/NEON on AArch32 | ||
+ | ;vfpv3 | ||
+ | :VFP version 3 | ||
+ | ;tls | ||
+ | :TLS register | ||
+ | ;vfpd32 | ||
+ | :VFP with 32 D-registers | ||
+ | |||
+ | =====System Load Averages===== | ||
+ | <pre>cat /proc/loadavg</pre> | ||
+ | |||
+ | Returns: | ||
+ | <pre>0.96 0.79 0.75 1/115 19306</pre> | ||
+ | |||
+ | 0.96 = Last One Minute CPU and IO Utilization | ||
+ | |||
+ | 0.79 = Last 5 minute CPU and IO Utilization | ||
+ | |||
+ | 0.75 = Last 10 minute CPU and IO Utilization | ||
+ | |||
+ | 1/115 = Running processes / Total processes | ||
+ | |||
+ | 19306 = Last process ID used | ||
+ | |||
+ | =====System Memory Usage===== | ||
+ | <pre>cat /proc/meminfo</pre> | ||
+ | |||
+ | Returns | ||
+ | <pre> | ||
+ | MemTotal: 510684 kB | ||
+ | MemFree: 40648 kB | ||
+ | MemAvailable: 441480 kB | ||
+ | Buffers: 205240 kB | ||
+ | Cached: 191808 kB | ||
+ | SwapCached: 0 kB | ||
+ | Active: 87248 kB | ||
+ | Inactive: 342072 kB | ||
+ | Active(anon): 13624 kB | ||
+ | Inactive(anon): 18860 kB | ||
+ | Active(file): 73624 kB | ||
+ | Inactive(file): 323212 kB | ||
+ | Unevictable: 0 kB | ||
+ | Mlocked: 0 kB | ||
+ | HighTotal: 0 kB | ||
+ | HighFree: 0 kB | ||
+ | LowTotal: 510684 kB | ||
+ | LowFree: 40648 kB | ||
+ | SwapTotal: 251324 kB | ||
+ | SwapFree: 251324 kB | ||
+ | Dirty: 0 kB | ||
+ | Writeback: 0 kB | ||
+ | AnonPages: 32308 kB | ||
+ | Mapped: 21816 kB | ||
+ | Shmem: 212 kB | ||
+ | Slab: 25540 kB | ||
+ | SReclaimable: 15144 kB | ||
+ | SUnreclaim: 10396 kB | ||
+ | KernelStack: 936 kB | ||
+ | PageTables: 892 kB | ||
+ | NFS_Unstable: 0 kB | ||
+ | Bounce: 0 kB | ||
+ | WritebackTmp: 0 kB | ||
+ | CommitLimit: 506664 kB | ||
+ | Committed_AS: 182860 kB | ||
+ | VmallocTotal: 507904 kB | ||
+ | VmallocUsed: 0 kB | ||
+ | VmallocChunk: 0 kB | ||
+ | CmaTotal: 65536 kB | ||
+ | CmaFree: 648 kB | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | ;MemTotal | ||
+ | :Total amount of physical RAM, in kilobytes. | ||
+ | ;MemFree | ||
+ | :The amount of physical RAM, in kilobytes, left unused by the system. | ||
+ | ;Buffers | ||
+ | :The amount of physical RAM, in kilobytes, used for file buffers. | ||
+ | ;Cached | ||
+ | :The amount of physical RAM, in kilobytes, used as cache memory. | ||
+ | ;SwapCached | ||
+ | :The amount of swap, in kilobytes, used as cache memory. | ||
+ | ;Active | ||
+ | :The total amount of buffer or page cache memory, in kilobytes, that is in active use. This is memory that has been recently used and is usually not reclaimed for other purposes. | ||
+ | ;Inactive | ||
+ | :The total amount of buffer or page cache memory, in kilobytes, that are free and available. This is memory that has not been recently used and can be reclaimed for other purposes. | ||
+ | ;HighTotal and HighFree | ||
+ | :The total and free amount of memory, in kilobytes, that is not directly mapped into kernel space. The HighTotal value can vary based on the type of kernel used. | ||
+ | ;LowTotal and LowFree | ||
+ | :The total and free amount of memory, in kilobytes, that is directly mapped into kernel space. The LowTotal value can vary based on the type of kernel used. | ||
+ | ;SwapTotal | ||
+ | :The total amount of swap available, in kilobytes. | ||
+ | ;SwapFree | ||
+ | :The total amount of swap free, in kilobytes. | ||
+ | ;Dirty | ||
+ | :The total amount of memory, in kilobytes, waiting to be written back to the disk. | ||
+ | ;Writeback | ||
+ | :The total amount of memory, in kilobytes, actively being written back to the disk. | ||
+ | ;Mapped | ||
+ | :The total amount of memory, in kilobytes, which have been used to map devices, files, or libraries using the mmap command. | ||
+ | ;Slab | ||
+ | :The total amount of memory, in kilobytes, used by the kernel to cache data structures for its own use. | ||
+ | ;Committed_AS | ||
+ | :The total amount of memory, in kilobytes, estimated to complete the workload. This value represents the worst case scenario value, and also includes swap memory. | ||
+ | ;PageTables | ||
+ | :The total amount of memory, in kilobytes, dedicated to the lowest page table level. | ||
+ | ;VMallocTotal | ||
+ | :The total amount of memory, in kilobytes, of total allocated virtual address space. | ||
+ | ;VMallocUsed | ||
+ | :The total amount of memory, in kilobytes, of used virtual address space. | ||
+ | ;VMallocChunk | ||
+ | :The largest contiguous block of memory, in kilobytes, of available virtual address space. | ||
+ | |||
+ | TODO: I want to see how the RPi-Monitor works on the DreamCatcher, i know it works on the RaspberryPi and the OrangePi | ||
+ | |||
+ | ===Powering the Board Without a USB Cable=== | ||
+ | You can power the DreamCatcher with 5v to the JP1 current sense option jumper (+) and any convenient ground point such as the ground pin on the CHG-IN header. | ||
+ | |||
+ | |||
+ | [[File:dc_external_power.jpg|300px]] | ||
+ | |||
+ | ===Additional Headers=== | ||
+ | |||
+ | {| class="wikitable" style="width:95%; border:2px solid black;" | ||
+ | !colspan="2" style="font-size:125%;"|'''SPI1''' | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;width:35%" | Description | ||
+ | | style="border-top: 2px solid black;"| Serial Peripheral Interface | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;width:35%" | MOSI | ||
+ | | style="border-top: 2px solid black;"| Master Output, Slave Input | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | MISO | ||
+ | | style="border-top: 2px solid black;"| Master Input, Slave Output | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | CS0 | ||
+ | | style="border-top: 2px solid black;"| Slave Select | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | CLK | ||
+ | | style="border-top: 2px solid black;"| Clock | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | GND | ||
+ | | style="border-top: 2px solid black;"| Ground | ||
+ | |} | ||
+ | |||
+ | <br /> | ||
+ | <br /> | ||
+ | |||
+ | {| class="wikitable" style="width:95%; border:2px solid black;" | ||
+ | !colspan="2" style="font-size:125%;"|'''SPI2''' | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;width:35%" | Description | ||
+ | | style="border-top: 2px solid black;"| Serial Peripheral Interface | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;width:35%" | MOSI | ||
+ | | style="border-top: 2px solid black;"| Master Output, Slave Input | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | MISO | ||
+ | | style="border-top: 2px solid black;"| Master Input, Slave Output | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | CS0 | ||
+ | | style="border-top: 2px solid black;"| Slave Select | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | CLK | ||
+ | | style="border-top: 2px solid black;"| Clock | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | GND | ||
+ | | style="border-top: 2px solid black;"| Ground | ||
+ | |} | ||
+ | |||
+ | <br /> | ||
+ | <br /> | ||
+ | |||
+ | {| class="wikitable" style="width:95%; border:2px solid black;" | ||
+ | !colspan="2" style="font-size:125%;"|'''TWI2''' | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;width:35%" | Description | ||
+ | | style="border-top: 2px solid black;"| Two Wire Interface (I2C) | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;width:35%" | GND | ||
+ | | style="border-top: 2px solid black;"| Ground | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | 3V3 | ||
+ | | style="border-top: 2px solid black;"| 3.3 Volt | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | SCK | ||
+ | | style="border-top: 2px solid black;"| Serial Clock Line | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | SDA | ||
+ | | style="border-top: 2px solid black;"| Serial Data Line | ||
+ | |} | ||
+ | |||
+ | <br /> | ||
+ | <br /> | ||
+ | |||
+ | {| class="wikitable" style="width:95%; border:2px solid black;" | ||
+ | !colspan="2" style="font-size:125%;"|'''UART1''' | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;width:35%" | Description | ||
+ | | style="border-top: 2px solid black;"| Universal Asynchronous Receiver/Transmitter | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;width:35%" | GND | ||
+ | | style="border-top: 2px solid black;"| Ground | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | RX | ||
+ | | style="border-top: 2px solid black;"| Receive Line | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | TX | ||
+ | | style="border-top: 2px solid black;"| Transmit | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | 3V3 | ||
+ | | style="border-top: 2px solid black;"| 3.3 Volt | ||
+ | |} | ||
+ | |||
+ | <br /> | ||
+ | <br /> | ||
+ | |||
+ | {| class="wikitable" style="width:95%; border:2px solid black;" | ||
+ | !colspan="2" style="font-size:125%;"|'''JTAG''' | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;width:35%" | Description | ||
+ | | style="border-top: 2px solid black;"| Joint Test Action Group | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;width:35%" | RESET_N | ||
+ | | style="border-top: 2px solid black;"| Test Reset | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%" | GND | ||
+ | | style="border-top: 2px solid black;"| Ground | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | TDO | ||
+ | | style="border-top: 2px solid black;"| Test Data Out | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | TCK | ||
+ | | style="border-top: 2px solid black;"| Test Clock | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | TMS | ||
+ | | style="border-top: 2px solid black;"| Test Mode Select | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | TDI | ||
+ | | style="border-top: 2px solid black;"| Test Data In | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | 3V3 | ||
+ | | style="border-top: 2px solid black;"| 3.3 Volt | ||
+ | |} | ||
+ | |||
+ | <br /> | ||
+ | <br /> | ||
+ | |||
+ | {| class="wikitable" style="width:95%; border:2px solid black;" | ||
+ | !colspan="2" style="font-size:125%;"|'''GPIO''' | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;width:35%" | Description | ||
+ | | style="border-top: 2px solid black;"| These are in not in the correct order (what IS the CORRECT order?) Use the names to identify | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;width:35%" | 5V0 | ||
+ | | style="border-top: 2px solid black;"| 5.0 Volt | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%" | GNDD1 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PC15/NDQ7 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PC13/NDQ5 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PIN17/NRE | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PC3/NCE1 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PC1/NALE | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PC19/NDQS | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PG9/LED1 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PG11/USBH | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PE5 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PB16 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PB15 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PE9 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PE10 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PE11 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PB1 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | 3V3 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | GNDD | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | GNDD2 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PC14 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PC4 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PC2 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PC0 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PB10 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PG10 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PE4 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PE6 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PE7 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PE8 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PB4 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PB3 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PB2 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;font-size:125%;" | PB0 | ||
+ | | style="border-top: 2px solid black;"| | ||
+ | |} | ||
+ | |||
+ | ===Test Points=== | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=P1 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=P4 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=P7 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=P5 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=P3 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=PWRON | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=RESET | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=AXPGP0 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=AXPGP1 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=AXPGP3 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=AXPGP2 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=NMI_N | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=P11 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=P12 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=USBH_EN | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=USB0_DRV | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=SPK | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=FACTORY | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=LCD_020 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=LCD_021 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=LCD_022 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=LCD_023 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=LCD_CLK | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=LCD_DE | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=LCD_HSYNC | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=LCD_VSYNC | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=TPY2 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=TPY1 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=TPX1 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=TPX2 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=NON_REM1 | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=SDA | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=SCL | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | |||
+ | {{test_point | ||
+ | |NAME=HS | ||
+ | |DESCRIPTION= | ||
+ | }} | ||
+ | </div> | ||
+ | |||
+ | |||
==Outernet Specific Applications== | ==Outernet Specific Applications== | ||
+ | <!-- <div class="mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}"> ---> | ||
+ | |||
+ | ===Outernet Overview=== | ||
+ | NOTE: Complete Outernet support is provided by the SkyLark Release above. If you just want to play with Outernet, then using that build is much easier. The details for software setup below are more more advanced Outernet usage, without needing SkyLark.. | ||
+ | |||
+ | |||
+ | [[File:outernet_overview.png|650px]] | ||
+ | |||
+ | |||
+ | Outernet Broadcasts on L-Band satellite | ||
+ | |||
+ | [[File:outernet_satellite_coverage.jpg|650px]] | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:95%; border:2px solid black;" | ||
+ | !colspan="5" style="font-size:125%;"|'''Satellite Details''' | ||
+ | |- | ||
+ | | style="text-align: center" |'''Satellite Name''' | ||
+ | | style="text-align: center" |'''Orbital Position''' | ||
+ | | style="text-align: center" |'''Coverage Area''' | ||
+ | | style="text-align: center" |'''Outernet Frequency''' | ||
+ | | style="text-align: center" |'''Symbol Rate''' | ||
+ | |- | ||
+ | | I-4 F3 Americas | ||
+ | |98°W | ||
+ | |North, South, and Central America, Pacific and Atlantic Oceans | ||
+ | |1539.8725 MHz | ||
+ | |4200 | ||
+ | |- | ||
+ | |Alphasat | ||
+ | |25°E | ||
+ | |Europe, Africa, Middle East, East Asia, Atlantic and Indian Oceans | ||
+ | |1546.2500 MHz | ||
+ | |4200 | ||
+ | |- | ||
+ | |I-4 F1 APAC | ||
+ | |144.0°E | ||
+ | |Asia, Australia, Pacific and Indian Oceans | ||
+ | |1545.9525 MHz | ||
+ | |4200 | ||
+ | |} | ||
+ | |||
+ | |||
+ | ===Adding a custom Frequency=== | ||
+ | From time to time the frequency used for the Outernet datastream will change. This is the proper workaround for adding a new custom frequency: | ||
+ | |||
+ | ;1) Connect by terminal to your Dreamcatcher using the "outernet" user account | ||
+ | |||
+ | |||
+ | ;2) Open this config file with VI editor with "Sudo", edit then save: | ||
+ | :"sudo vi /mnt/conf/etc/skylark_config.json" | ||
+ | :Enter the "outernet" user password when prompted for a password | ||
+ | |||
+ | |||
+ | ;3) Edit only the custom frequency and symbol rate setting (every other will change back on reboot) | ||
+ | <pre> | ||
+ | "custom": { | ||
+ | "label": "Custom", | ||
+ | "value": "custom", | ||
+ | "freq": "1546.25", | ||
+ | "symbolrate": "4200" | ||
+ | }</pre> | ||
+ | |||
+ | ;4) Set the Outernet application to use the custom frequency | ||
+ | :Open the "Tuner" Application | ||
+ | :Select the "Satellite" tab | ||
+ | "Select "Custom" from the dropdown | ||
+ | |||
+ | [[File:outernet_tuner_custom_freq.png|650px]] | ||
===ONDD Setup=== | ===ONDD Setup=== | ||
− | + | FTP to a DreamCatcher, copy the following files off of the system... be SURE to FORCE binary transfer. | |
− | + | <pre>/usr/sbin/ondd(md5:207723be33f4da57bd64a6549e11e95d) | |
− | + | /usr/sbin/ontimeout (md5:5092f17f0152ca352799290999ba7a6c)</pre> | |
− | + | Create an empty conf file | |
− | + | <pre>/etc/ondd/ondd.conf</pre> | |
− | + | Create a place to place downloads | |
− | + | <pre>/home/downloads (or wherever)</pre> | |
− | + | Create a place for download cache | |
− | + | <pre>/home/download_cache</pre> | |
− | + | Run ondd with the following command: | |
+ | <pre>/usr/sbin/ondd -d --pid_file /var/run/ondd.pid --cfg-gile [empty cfg file you created] -c [location for download cache] -o [location for completed downloads] -D /var/run/ondd.data --sdr-timeout-handler /usr/sbin/ontimeout</pre> | ||
− | |||
====Command Help==== | ====Command Help==== | ||
− | [Skylark][outernet@outernet:/usr/sbin]$ /usr/sbin/ondd -h | + | <nowiki>[Skylark][outernet@outernet:/usr/sbin]$ /usr/sbin/ondd -h |
− | + | 00:11:21.099 [main] Unable to load config: /etc/ondd.conf (null) | |
− | + | Usage: ondd | |
− | + | --cfg-file CONFIG_FILE override default config file location | |
− | + | --pid-file PID_FILE override default pid file location | |
− | + | --ctrl-sock SOCK_FILE override default control socket path used for ipc | |
− | + | --status-sock SOCK_FILE override default status report socket path - status e | |
− | + | --cert-file CERT_FILE override default ceritificate file location | |
− | + | -D SOCK_FILE data socket path to which the demodulator sends raw s | |
− | + | --sdr-timeout-handler script to execute if no data arrives through the date | |
− | + | -o PATH path to output directory where downloaded files are d | |
− | + | -c PATH path to cache directory where partially downloaded fd | |
− | + | -O PATH if specified, files which path does not begin with td | |
− | + | -b N set the maximum number of download completion eventsy | |
− | + | -d start ondd in daemon mode | |
− | + | -i print to stdout the current signal strength and snr,d | |
− | + | -V enable verbose mode | |
− | + | -v display ondd version info | |
− | + | -h display this helptext | |
+ | </nowiki> | ||
+ | |||
+ | |||
+ | ====External API Access==== | ||
+ | Skylark has 3 known access points for external api access. These APIs provide access to specific items in a JSON format. They do not require login and are enabled by default as far as we can tell (version 4.4) | ||
+ | |||
+ | =====getTunerStatus===== | ||
+ | This provides the tuner connection status which is the same as what is available in the ui under Tuner-->Status tab. | ||
+ | |||
+ | ======Access URL====== | ||
+ | http://10.0.0.1/DIRECT/getTunerStatus | ||
+ | |||
+ | The following values are provided: | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:95%; border:2px solid black;" | ||
+ | !colspan="3" style="font-size:125%;"|'''getTunerStatus Values''' | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;" | JSON Parameter | ||
+ | | style="border-top: 2px solid black;"|Description | ||
+ | | style="border-top: 2px solid black;"|Example Value | ||
+ | |- | ||
+ | |error | ||
+ | |Indicates by TRUE or FALSE if there was an error in processing the request | ||
+ | |false | ||
+ | |- | ||
+ | |result | ||
+ | |contains the complete parameter value set | ||
+ | | (see below) | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:95%; border:2px solid black;" | ||
+ | !colspan="3" style="font-size:125%;"|'''getTunerStatus "result" Parameter Values''' | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;" | JSON Value | ||
+ | | style="border-top: 2px solid black;"|Description | ||
+ | | style="border-top: 2px solid black;"|Example | ||
+ | |- | ||
+ | | scope="row"| event | ||
+ | | | ||
+ | |"packet_received" | ||
+ | |- | ||
+ | | scope="row"| event_details | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | scope="row"|lock | ||
+ | |Indicates the status of the satellite lock where: | ||
+ | 0 = Not Locked | ||
+ | |||
+ | 1 = Locked | ||
+ | |1 | ||
+ | |- | ||
+ | | scope="row"|freq | ||
+ | |Frequency the receiver is tuned to. | ||
+ | |1539.87 | ||
+ | |- | ||
+ | | scope="row" |freq_offset | ||
+ | |The frequency offset in Hz from the Primary frequency | ||
+ | |-2557.35 | ||
+ | |- | ||
+ | | scope="row" |set_rs | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | scope="row" |rssi | ||
+ | |Received signal strength indication (dBm) | ||
+ | |-116.74 | ||
+ | |- | ||
+ | | scope="row" |snr | ||
+ | |Signal to Noise Ratio | ||
+ | |Indicates the strength of the incoming signal to the device, must be higher than 3.0 to 4.0 for a quality locked signal | ||
+ | |- | ||
+ | | scope="row" |ser | ||
+ | |Symbol Error Rate | ||
+ | |The rate of error for the received packet stream | ||
+ | |- | ||
+ | | scope="row"|crc_ok | ||
+ | |The number of packets that passed the CRC check | ||
+ | |317628 | ||
+ | |- | ||
+ | | scope="row" |crc_err | ||
+ | |The number of packets that failed the CRC check | ||
+ | |0 | ||
+ | |- | ||
+ | | scope="row"|alg_pk_mn | ||
+ | |This describes how much the signal stands out from the noise. | ||
+ | |28.06 | ||
+ | |- | ||
+ | | scope="row"|state | ||
+ | |Indicates the current signal lock state, where: | ||
+ | 0 = Search | ||
+ | |||
+ | 1 = Signal Detect | ||
+ | |||
+ | 2 = Const Lock | ||
+ | |||
+ | 3 = Code Lock | ||
+ | |||
+ | 4 = Frame Lock | ||
+ | |4 | ||
+ | |- | ||
+ | | scope="row"|transfers | ||
+ | |This is a JSON Array that contains the current transfers in progress. Although this is usually just one item, the code clearly supports multiple simultaneous downloads | ||
+ | | (See Below) | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:95%; border:2px solid black;" | ||
+ | !colspan="3" style="font-size:125%;"|'''getTunerStatus "result" --> "Transfer" Parameter Values''' | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;" | JSON Value | ||
+ | | style="border-top: 2px solid black;"|Description | ||
+ | | style="border-top: 2px solid black;"|Example | ||
+ | |- | ||
+ | |carousel_id | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |path | ||
+ | |File path for the download object | ||
+ | | | ||
+ | |- | ||
+ | |hash | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |block_count | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |block_received | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |complete | ||
+ | | | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | example JSON: | ||
+ | <pre> | ||
+ | { | ||
+ | "result": { | ||
+ | "event": "packet_received", | ||
+ | "event_details": "", | ||
+ | "lock": 1, | ||
+ | "freq": 1539.87, | ||
+ | "freq_offset": -2557.35, | ||
+ | "set_rs": 4200, | ||
+ | "rssi": -116.74, | ||
+ | "snr": 11.58, | ||
+ | "ser": 0, | ||
+ | "crc_ok": 317628, | ||
+ | "crc_err": 0, | ||
+ | "alg_pk_mn": 28.06, | ||
+ | "state": 4, | ||
+ | "transfers": [{ | ||
+ | "carousel_id": 2, | ||
+ | "path": "opaks/58d9-news-pack.2017-09-05_1743.tbz2", | ||
+ | "hash": "bb4d85e4e41c190780b67dc44aee2add2be413137f6aee0c197052281a8c902d", | ||
+ | "block_count": 225, | ||
+ | "block_received": 136, | ||
+ | "complete": 0 | ||
+ | }, {}] | ||
+ | }, | ||
+ | "error": false | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | ======Duplicating the UI Tuner Status====== | ||
+ | the UI tuner status provides some values that must be calculated from the API Values provided above. | ||
+ | |||
+ | {| class="wikitable" style="width:95%; border:2px solid black;" | ||
+ | !colspan="3" style="font-size:125%;"|'''Implementing the Tuner UI Values''' | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;" |UI Label | ||
+ | | style="border-top: 2px solid black;"|API Value(s) | ||
+ | | style="border-top: 2px solid black;"|Calculation | ||
+ | |- | ||
+ | |SNR (dB) | ||
+ | |snr | ||
+ | |snr | ||
+ | |- | ||
+ | |Lock | ||
+ | |lock | ||
+ | |lock? "yes" : "no" | ||
+ | |- | ||
+ | |Rssi (dBm) | ||
+ | |rssi | ||
+ | |rssi | ||
+ | |- | ||
+ | |APkMn Ratio | ||
+ | |alg_pk_mn | ||
+ | |alg_pk_mn | ||
+ | |- | ||
+ | |Frequency (MHz) | ||
+ | |freq | ||
+ | |freq | ||
+ | |- | ||
+ | |Freq Offset (Hz) | ||
+ | |freq_offset | ||
+ | |freq_offset | ||
+ | |- | ||
+ | |Symbol Error Rate (SER) | ||
+ | |ser | ||
+ | |ser | ||
+ | |- | ||
+ | |Packets Received | ||
+ | |crc_ok, crc_err | ||
+ | |crc_ok + crc_err | ||
+ | |- | ||
+ | |Valid Packets | ||
+ | |crc_ok | ||
+ | |crc_ok | ||
+ | |- | ||
+ | |Valid packets % | ||
+ | |crc_ok, crc_err | ||
+ | |round(100*crc_ok / (crc_ok + crc_err) | ||
+ | |- | ||
+ | |Packet Error Rate (PER) | ||
+ | |crc_err, crc_ok | ||
+ | |round(1000*crc_err/ (crc_ok + crc_err) ) / 1000 | ||
+ | |- | ||
+ | |Lock State | ||
+ | |state | ||
+ | |0=Search, 1=Signal Detect, 2=Const Lock, 3=Code Lock, 4=Frame Lock | ||
+ | |- | ||
+ | |Transfers: | ||
+ | |path, block_received, block_count | ||
+ | |path + (round( 100 * block_received / block_count)) + "%" | ||
+ | |} | ||
+ | |||
+ | |||
+ | =====getAPRS===== | ||
+ | This interface provides a complete listing of the received APRS messages. | ||
+ | |||
+ | |||
+ | ======Access URL====== | ||
+ | http://10.0.0.1/DIRECT/getAPRS | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:95%; border:2px solid black;" | ||
+ | !colspan="3" style="font-size:125%;"|'''getTunerStatus Values''' | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;" | JSON Value | ||
+ | | style="border-top: 2px solid black;"|Description | ||
+ | | style="border-top: 2px solid black;"|Example | ||
+ | |- | ||
+ | | scope="row"|result | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | scope="row"|error | ||
+ | | | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | |||
+ | example JSON: | ||
+ | <pre> | ||
+ | { | ||
+ | "result": "KE7WWT-1>APMI01,TCPIP*,qAS,KE7WWT:OUTNET\n | ||
+ | KE7WWT-1>APMI01,TCPIP*,qAS,KE7WWT:OUTNET\n | ||
+ | KE7WWT-1>APMI01,TCPIP*,qAS,KE7WWT:OUTNET\n", | ||
+ | "error": false | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | =====whatsNew===== | ||
+ | provides a list of the whats new listing | ||
+ | |||
+ | |||
+ | ======Access URL====== | ||
+ | http://10.0.0.1/DIRECT/whatsNew | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:95%; border:2px solid black;" | ||
+ | !colspan="2" style="font-size:125%;"|'''getTunerStatus Values''' | ||
+ | |- | ||
+ | | scope="row" style="border-top: 2px solid black;" | JSON Value | ||
+ | | style="border-top: 2px solid black;"|Description | ||
+ | |- | ||
+ | | scope="row"|result | ||
+ | |Complete result set, separated by "\n" between rows | ||
+ | |- | ||
+ | | scope="row"|error | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | Example JSON: | ||
+ | <pre> | ||
+ | {"result": | ||
+ | "1504634234,combined.js\n | ||
+ | 1504634005,Amateur Radio/APRS/APRSAT/messages-2017-09-05_17:53.txt\n | ||
+ | 1504633409,News/2017-09-05.EurekAlert - Breaking News.NASA sees development of Tropical Depression 19W.html\n | ||
+ | 1504633409,News/2017-09-05.EurekAlert - Breaking News.Opioid abuse can be treated successfully in primary care settings, stud.html\n | ||
+ | 1504633408,News/2017-09-05.EurekAlert - Breaking News.Eating meat linked to higher risk of diabetes.html\n", | ||
+ | "error":false} | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | |||
+ | ====Running Custom Scripts==== | ||
+ | The Skylark release for the DreamCatcher is a read only system. Although there are logs and data written to certain locations, you cannot install additional applications on the system with tools such as apt and yum. You can however, run scripts at boot that may be used to start other services as needed. | ||
+ | |||
+ | |||
+ | Since version 1.2 Skylark has support for starting a user script at bootup. For the technically inclined, look at /etc/init.d/S99user, that should tell you all. | ||
+ | |||
+ | =====Installing User Boot Script===== | ||
+ | |||
+ | ;first become root | ||
+ | :sudo su - | ||
+ | ;then make a directory called bin in /mnt/conf | ||
+ | :mkdir /mnt/conf/bin | ||
+ | ;in this directory create your script and call it user.sh | ||
+ | :vi /mnt/conf/bin/user.sh | ||
+ | |||
+ | as an example, heres a script that logs the snr every 10 seconds | ||
+ | <pre> | ||
+ | #!/bin/sh | ||
+ | |||
+ | while true | ||
+ | do | ||
+ | a=$(wget -q -O - http://127.0.0.1/DIRECT/getTunerStatus | jq .result.snr) | ||
+ | echo -n $(date) ": " | ||
+ | echo $a | ||
+ | sleep 10 | ||
+ | done >> /mnt/downloads/snrlog.txt | ||
+ | </pre> | ||
+ | |||
+ | ;make sure the script is executable, and owned by root | ||
+ | :chown root:root /mnt/conf/bin/user.sh | ||
+ | :chmod 755 /mnt/conf/bin/user.sh | ||
+ | |||
+ | |||
+ | NOTE: be careful though: | ||
+ | |||
+ | The script is run at the end of boot. So if you make changes to any service files or configs, you should restart that service as well. | ||
+ | Be careful about how much RAM and CPU you consume in this script. Its a very limited system. | ||
+ | </div> | ||
==ADS-B reception using dump1090== | ==ADS-B reception using dump1090== | ||
+ | <!-- <div class="mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}"> ---> | ||
===Install Updates and Base Packages=== | ===Install Updates and Base Packages=== | ||
− | <pre>sudo apt update | + | |
+ | <pre>sudo apt-mark hold linux-dtb-next-sunxi linux-headers-next-sunxi linux-image-next-sunxi linux-firmware-image-next-sunxi | ||
+ | sudo apt update | ||
sudo apt upgrade | sudo apt upgrade | ||
sudo apt install rtl-sdr librtlsdr-dev pkg-config build-essential | sudo apt install rtl-sdr librtlsdr-dev pkg-config build-essential | ||
wget https://raw.githubusercontent.com/keenerd/rtl-sdr/master/rtl-sdr.rules | wget https://raw.githubusercontent.com/keenerd/rtl-sdr/master/rtl-sdr.rules | ||
− | sudo mv rtl-sdr.rules /etc/udev/rules.d/ | + | sudo mv rtl-sdr.rules /etc/udev/rules.d/</pre> |
− | + | ||
+ | ====Reboot the DreamCatcher==== | ||
+ | sudo reboot | ||
===Install dump1090=== | ===Install dump1090=== | ||
Line 339: | Line 1,484: | ||
'''NOTE:''' The “rfswitch1” and “rfswitch2” lines are not strictly necessary, but will not hurt anything - the Dreamcatcher Armbian image ships with the LNA bypass enabled by default. | '''NOTE:''' The “rfswitch1” and “rfswitch2” lines are not strictly necessary, but will not hurt anything - the Dreamcatcher Armbian image ships with the LNA bypass enabled by default. | ||
− | === | + | ===Running dump1090 as a daemon=== |
− | + | if you dump1090 to run in the background after a reboot, you need to set it up as a daemon. | |
+ | |||
+ | ====Create a Startup script in /etc/init.d==== | ||
+ | |||
+ | The following is a sample startup script. This was poached from this site: http://www.satsignal.eu/raspberry-pi/dump1090.html | ||
+ | |||
+ | * Create a simple script in /etc/init.d, in my case i called it, dump1090.sh | ||
+ | * Cut and paste the following into the file | ||
+ | |||
+ | <nowiki> | ||
+ | #!/bin/bash | ||
+ | ### BEGIN INIT INFO | ||
+ | # | ||
+ | # Provides: dump1090 | ||
+ | # Required-Start: $remote_fs | ||
+ | # Required-Stop: $remote_fs | ||
+ | # Default-Start: 2 3 4 5 | ||
+ | # Default-Stop: 0 1 6 | ||
+ | # Short-Description: dump1090 initscript | ||
− | + | # | |
+ | ### END INIT INFO | ||
+ | ## Fill in name of program here. | ||
+ | PROG="dump1090" | ||
+ | PROG_PATH="/home/pi/dump1090" | ||
+ | PROG_ARGS="--interactive --net --no-fix --net-ro-size 500 --net-ro-rate 5 --net-heartbeat 60 --gain -10" | ||
+ | PIDFILE="/var/run/dump1090.pid" | ||
+ | |||
+ | start() { | ||
+ | if [ -e $PIDFILE ]; then | ||
+ | ## Program is running, exit with error. | ||
+ | echo "Error! $PROG is currently running!" 1>&2 | ||
+ | exit 1 | ||
+ | else | ||
+ | ## Change from /dev/null to something like /var/log/$PROG if you want to save output. | ||
+ | cd $PROG_PATH | ||
+ | ./$PROG $PROG_ARGS 2>&1 >/dev/null & | ||
+ | echo "$PROG started" | ||
+ | touch $PIDFILE | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | stop() { | ||
+ | if [ -e $PIDFILE ]; then | ||
+ | ## Program is running, so stop it | ||
+ | echo "$PROG is running" | ||
+ | killall $PROG | ||
+ | rm -f $PIDFILE | ||
+ | echo "$PROG stopped" | ||
+ | else | ||
+ | ## Program is not running, exit with error. | ||
+ | echo "Error! $PROG not started!" 1>&2 | ||
+ | exit 1 | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | ## Check to see if we are running as root first. | ||
+ | ## Found at http://www.cyberciti.biz/tips/shell-root-user-check-script.html | ||
+ | if [ "$(id -u)" != "0" ]; then | ||
+ | echo "This script must be run as root" 1>&2 | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | case "$1" in | ||
+ | start) | ||
+ | start | ||
+ | exit 0 | ||
+ | ;; | ||
+ | stop) | ||
+ | stop | ||
+ | exit 0 | ||
+ | ;; | ||
+ | reload|restart|force-reload) | ||
+ | stop | ||
+ | start | ||
+ | exit 0 | ||
+ | ;; | ||
+ | **) | ||
+ | echo "Usage: $0 {start|stop|reload}" 1>&2 | ||
+ | exit 1 | ||
+ | ;; | ||
+ | esac | ||
+ | exit 0</nowiki> | ||
+ | |||
+ | NOTE: You need to alter the PROG_PATH value to the location of your dump1090 application | ||
+ | |||
+ | * Set the permission to executable <pre>sudo chmod +x /etc/init.d/dump1090.sh</pre> | ||
+ | * Install to the startup directories <pre>sudo update-rc.d dump1090.sh defaults</pre> | ||
+ | * If you want to remove it later <pre>sudo update-rc.d -f dump1090.sh remove</pre> | ||
+ | * Test Start the application<pre>sudo /etc/init.d/dump1090.sh start</pre> | ||
+ | * NOTE: If you want to stop it<pre>sudo /etc/init.d/dump1090.sh stop</pre> | ||
+ | |||
+ | ===Verify that it is running=== | ||
+ | To verify that the application is running connect to the IP Address of the system and 8080 like <pre>http://10.0.1.150:8080</pre> you should see a map load.. | ||
+ | </div> | ||
==Running the Dreamcatcher SDR from another System== | ==Running the Dreamcatcher SDR from another System== | ||
+ | <!-- <div class="mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}"> ---> | ||
The SDR on the dreamcatcher is connected the the CPU via USB, this connection can be changed to an external USB and the SDR can be connected to another systems USB. Doing this will prevent the SDR from being used by the dreamcatcher. | The SDR on the dreamcatcher is connected the the CPU via USB, this connection can be changed to an external USB and the SDR can be connected to another systems USB. Doing this will prevent the SDR from being used by the dreamcatcher. | ||
Line 355: | Line 1,593: | ||
This will disconnect the SDR from the usb hub on the DreamCatcher and route it's usb to the external cable. | This will disconnect the SDR from the usb hub on the DreamCatcher and route it's usb to the external cable. | ||
+ | </div> | ||
==Listen to FM broadcasts== | ==Listen to FM broadcasts== | ||
+ | <!-- <div class="mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}"> ---> | ||
Its possible to listen to standard FM broadcast radio using the Dreamcatchers SDR. | Its possible to listen to standard FM broadcast radio using the Dreamcatchers SDR. | ||
Line 385: | Line 1,625: | ||
Obviously, the most important one is the -f option for selecting the tuned frequency. You may also have to play around with the -s if the output is noisy. | Obviously, the most important one is the -f option for selecting the tuned frequency. You may also have to play around with the -s if the output is noisy. | ||
FM broadcasts tend to be quite powerful signals, and I have not needed an antenna for receiving any of the local stations, but in case of bad reception, just adding a sub-1M SMA cable at the LNA_BYPASS RF input of the Dreamcatcher should improve reception dramatically. | FM broadcasts tend to be quite powerful signals, and I have not needed an antenna for receiving any of the local stations, but in case of bad reception, just adding a sub-1M SMA cable at the LNA_BYPASS RF input of the Dreamcatcher should improve reception dramatically. | ||
+ | </div> | ||
+ | |||
+ | ==Modify the Tuner application to add Frequencies== | ||
+ | Although this isnt all that useful unless you want to have lots of entries in the satellite list that won't work, it is important to know how all this works so you can if you need to later... | ||
+ | |||
+ | Skylark is read only, so to make these changes, you will need to use the User.sh service scripts to re-install the changes after every reboot, then restart the ui service. | ||
+ | |||
+ | Create a Custom skylark_config.json file | ||
+ | Modify your custom skylark_config.json file and copy to the proper locations (if you dont have this file, copy /etc/skylark_config.json to this location | ||
+ | |||
+ | Add the new entries to the "tunerConf" section | ||
+ | Add new entires for each new satellite entry, note the entries for sat1, sat2, sat3 below: | ||
+ | |||
+ | "tunerConf": { | ||
+ | "beams": { | ||
+ | "sat1": { | ||
+ | "label": "Satellite 1", | ||
+ | "value": "sat1", | ||
+ | "freq": "1545.1111", | ||
+ | "symbolrate": "4200" | ||
+ | }, | ||
+ | "sat2": { | ||
+ | "label": "Satellite 2", | ||
+ | "value": "sat2", | ||
+ | "freq": "1545.2222", | ||
+ | "symbolrate": "4200" | ||
+ | }, | ||
+ | "sat3": { | ||
+ | "label": "Satellite 3", | ||
+ | "value": "sat3", | ||
+ | "freq": "1545.3333", | ||
+ | "symbolrate": "4200" | ||
+ | }, | ||
+ | "apac": { | ||
+ | "label": "Asia Pacific (144E)", | ||
+ | "value": "apac", | ||
+ | "freq": "1545.9525", | ||
+ | "symbolrate": "4200" | ||
+ | }, | ||
+ | "emea": { | ||
+ | "label": "Europe, West Asia, Africa (25E)", | ||
+ | "value": "emea", | ||
+ | "freq": "1545.94", | ||
+ | "symbolrate": "4200" | ||
+ | }, | ||
+ | "americas": { | ||
+ | "label": "Americas (98W)", | ||
+ | "value": "americas", | ||
+ | "freq": "1539.8725", | ||
+ | "symbolrate": "4200" | ||
+ | }, | ||
+ | "custom": { | ||
+ | "label": "Custom", | ||
+ | "value": "custom", | ||
+ | "freq": "1546.25", | ||
+ | "symbolrate": "4200" | ||
+ | } | ||
+ | }, | ||
+ | "selectedBeam": "americas" | ||
+ | }, | ||
+ | Add the new entries to the "overRide" section. | ||
+ | This will allow the new entries to remain after a reboot. | ||
+ | |||
+ | "overRides": [ | ||
+ | "netConf.hostname", | ||
+ | "netConf.mode", | ||
+ | "netConf.sta", | ||
+ | "netConf.ap", | ||
+ | "tunerConf.selectedBeam", | ||
+ | "tunerConf.beams.custom", | ||
+ | "tunerConf.beams.sat1", | ||
+ | "tunerConf.beams.sat2", | ||
+ | "tunerConf.beams.sat3" | ||
+ | ] | ||
+ | save the new skylark_config.json file to /mnt/conf/bin | ||
+ | check the file syntax with "jq -c < skylark_config.json" | ||
+ | |||
+ | Add a user.sh script to /mnt/config/bin directory | ||
+ | NOTE: in order to get this to work reliably i needed to copy the config to both places. im sure in my reverse engineering that i missed something simple, but this worked.. | ||
+ | |||
+ | #!/bin/sh | ||
+ | #copy the skylark config to /mnt/conf/etc | ||
+ | cp /mnt/conf/bin/skylark_config.json /mnt/conf/etc/skylark_config.json | ||
+ | |||
+ | #copy the skylark config to /etc | ||
+ | cp -f /mnt/conf/bin/skylark_config.json /etc | ||
+ | |||
+ | #restart the ui service | ||
+ | /etc/init.d/S70ui2service restart | ||
+ | reboot your DC to see how it works... | ||
+ | |||
+ | |||
+ | ==Install a custom applicaiton to skylark 4.4== | ||
+ | I've wanted to add some custom applications to the DC running SkyLark (currently 4.4).. this is the process to install it so it remains after a reboot.. Although Skylark is based on the OS.js platform (https://www.os-js.org/), its customized quite a bit. | ||
+ | |||
+ | Additionally Skylark is read only, any changes you make will be overwritten on the next reboot. To get around this, we will use the user script service to re-install the customizations after every reboot, then bounce the window manager. | ||
+ | |||
+ | Create your custom application | ||
+ | you can use an existing application as a template, but you will need to modify much of it so its unique. Developing the application is beyond the scope of this post, and requires more effort. (mine clearly needs some work, but wanted to document this first) | ||
+ | |||
+ | Existing applications can be found in: /usr/share/www/packages/default | ||
+ | copy one of these to your writable location.. in my case it was /mnt/conf/bin | ||
+ | modify the application as required. | ||
+ | |||
+ | Create Custom Icons | ||
+ | you will need both 16x16 and 32x32 size icons | ||
+ | store these in your writable location for example /mnt/conf/bin | ||
+ | |||
+ | Create a custom packages.json | ||
+ | Copy the packages.json file from /usr/lib/node_modules/ui2 to your writable location.. /mnt/conf/bin | ||
+ | |||
+ | modify the file adding an entry to the "www" group for your new application... Check the syntax of the file with "jq -c < packages.json" when your complete. | ||
+ | |||
+ | for my example i added the following.. | ||
+ | |||
+ | "default/RACHEL": { | ||
+ | "className": "ApplicationRachel", | ||
+ | "name": "RACHEL", | ||
+ | "mime": null, | ||
+ | "icon": "apps/RACHEL.png", | ||
+ | "category": "utilities", | ||
+ | "preload": [ | ||
+ | { | ||
+ | "type": "javascript", | ||
+ | "src": "combined.js" | ||
+ | }, | ||
+ | { | ||
+ | "src": "scheme.html", | ||
+ | "type": "scheme" | ||
+ | }, | ||
+ | { | ||
+ | "type": "stylesheet", | ||
+ | "src": "combined.css" | ||
+ | } | ||
+ | ], | ||
+ | "type": "application", | ||
+ | "path": "default/RACHEL", | ||
+ | "build": {}, | ||
+ | "repo": "default" | ||
+ | } | ||
+ | Add a User Service Script | ||
+ | Create a "user.sh" script to place all the files in the proper place then restart the ui service.. | ||
+ | |||
+ | #!/bin/sh | ||
+ | |||
+ | cp -f /mnt/conf/bin/packages.json /usr/lib/node_modules/ui2 | ||
+ | chmod 644 /usr/lib/node_modules/ui2/packages.json | ||
+ | |||
+ | cp -R /mnt/conf/bin/RACHEL /usr/share/www/packages/default | ||
+ | chmod 755 /mnt/conf/bin/RACHEL | ||
+ | |||
+ | cp -f /mnt/conf/bin/RACHEL_16x16.png /usr/share/www/themes/icons/default/16x16/apps/RACHEL.png | ||
+ | |||
+ | cp -f /mnt/conf/bin/RACHEL_32x32.png /usr/share/www/themes/icons/default/32x32/apps/RACHEL.png | ||
+ | |||
+ | /etc/init.d/S70ui2service restart | ||
+ | when you goto the Skylark Web UI, you will see your new application.. |
Latest revision as of 17:06, 27 October 2017
Contents
- 1 Specs (Version 2.03)
- 2 Setting up the OS
- 3 Startup the DreamCatcher with Armbian Distro
- 4 Custom Startup Scripts for Skylark
- 5 Hardware Details
- 6 Outernet Specific Applications
- 7 ADS-B reception using dump1090
- 8 Running the Dreamcatcher SDR from another System
- 9 Listen to FM broadcasts
- 10 Modify the Tuner application to add Frequencies
- 11 Install a custom applicaiton to skylark 4.4
Specs (Version 2.03)
- L-band SAW filter (1525 - 1559 MHz)
- Two-stage L-band LNA with 34dB gain
- 1 PPM TCXO
- RF bypass for tuning from 24 - 1600 MHz - use as a regular RTL SDR!
- Software switchable bias tee
- 3 USB ports
- GPIO forest
- UARTs, I2C, SPI headers (unpopulated) for driving external hardware
- Two microSD card holders - for boot and storage!
- 1 GHz CPU
- 512 MB RAM
- USB wifi dongle (based on RTL8188CUS chipset) - AP mode capable!
- Lots of LEDs!
- Switches!
- microUSB OTG
- microUSB power port
- Audio In/Out
- Kernel Version 4.10 and Uboot (2017.01) support
Setting up the OS
There are two OSs that you can use on the DreamCatcher.
- Armbian
- Standard ARM Linux OS based on Debian, Highly supported but does NOT have build in support for Outernet. This OS requires lots of tweaking to get up and going...
- Armbian for DreamCatcher, V5.27
NOTE: The kernel in this version of Armbian cannot be updated with apt, there is an issue with the Device Trees that will brick the device. Before doing an apt upgrade, set a hold on the kernel packages like this:
sudo apt-mark hold linux-dtb-next-sunxi linux-headers-next-sunxi linux-image-next-sunxi linux-firmware-image-next-sunxi
- Skylark
- Os based on Busybox is read only and has the full Outernet system ready to go. This is the one to use if you want to play with outernet with no tweaking
Version 4.4
- Skylark, for the Passive Antenna, Released May 14, 2017
- Skylark, for the Active Antenna, Released June 22, 2017
Version 4.x
Burning the image to an SD Card
A microSD greater than 4GB in size is required.
Extract the image
It is compressed using "gzip.", many common Unzipping tools on your chosen OS can un-compress these.
- Linux / OSx
- gunzip [filename.gz]
- Windows
- use 7Zip
Write the image to the SD card
the best way to burn the SD card is by using etcher here---> https://etcher.io/
SkyLark Resetting to Default Values
sudo rm -rf /mnt/conf sudo reboot
Startup the DreamCatcher with Armbian Distro
1) Insert SD card into Dreamcatcher board slot marked "SD0_OS," next to LED array.
2) insert the USB Wifi Dongle, or other USB network device if you have it.
3) Optionally - connect the USB Cable to your PC with a terminal application open.
4) connect power to a USB port, or alternatively the USB cable to PC can provide power
after the bootup process you should see a "Dreamcatcher Login:" prompt
- Default Username
- root
- Default Password
- 1234
Configure Wifi
To connect to a wifi network, you can use one of the following methods, SSID/password will be stored and applied automatically at next boot.
Single Command Line
nmcli d wifi connect [your_ssid] password [your_password]
nmcli d wifi connect MYSSID password IMSOSECURE
if you succeed, you should see something like:
Connection with UUID '8f820c8a-5af3-4336-8161-6f57030a7ec5' created and activated on device 'wlan1'
Simple Command line Gui
nmtui
The UI is very self explanatory.
Check the current IP
to check assigned ip use:
ifconfig
root@dreamcatcher:/etc# ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1104 (1.0 KiB) TX bytes:1104 (1.0 KiB) wlan1 Link encap:Ethernet HWaddr e8:4e:06:4b:a6:fa inet addr:10.0.1.150 Bcast:10.0.1.255 Mask:255.255.255.0 inet6 addr: fe80::ea4e:6ff:fe4b:a6fa/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:78 errors:0 dropped:0 overruns:0 frame:0 TX packets:41 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:14882 (14.5 KiB) TX bytes:4947 (4.8 KiB)
Install The RTL-SDR Libraires and Utilities
To install librtlsdr and sdr utilities like rtl_fm etc, use:
apt update; apt install rtl-sdr
(you will need to have already connected to network for this to work)
Shutting Down
Unlike Skylark, the root filesystem here is modified and is writeable, so it is important you shut this down properly:
sudo poweroff
Custom Startup Scripts for Skylark
User scripts:
Skylark 1.2 has support for starting a user script at bootup. For the technically inclined, look at /etc/init.d/S99user, that should tell you all.
Instructions:
- 1) first become root
- sudo su -
- 2) then make a directory called bin in /mnt/conf
- mkdir /mnt/conf/bin
- 3) in this directory create your script and call it user.sh
- vi /mnt/conf/bin/user.sh
as an example, heres a script that logs the snr every 10 seconds
#!/bin/sh while true do a=$(wget -q -O - http://127.0.0.1/DIRECT/getTunerStatus | jq .result.snr) echo -n $(date) ": " echo $a sleep 10 done >> /mnt/downloads/snrlog.txt
- 4) make sure the script is executable, and owned by root
- chown root:root /mnt/conf/bin/user.sh
- chmod 755 /mnt/conf/bin/user.sh
Thats it. This script will automatically run at boot.
be careful though:
The script is run at the end of boot. So if you make changes to any service files or configs, you should restart that service as well. Be careful about how much RAM and CPU you consume in this script. Its a very limited system.
Hardware Details
Documentation
AllWinner A13 Processor Datasheet
AXP209 Power Management IC Datasheet
Board LEDS
Onboard LEDs can be controlled by writing to the ON/OFF Control file in SysFs. In the case of LED1/Pckts to turn on the led, write a 1 to the SYSFS Device On/Off Control.
To Turn the Led on:
echo 1 > /sys/class/leds/packet/brightness
To Turn it off:
echo 0 > /sys/class/leds/packet/brightness
CHGLED | |
---|---|
Description | Indicates LiPo Battery Charging |
Color | Green |
Default at Boot | OFF |
SysFs Device | |
Usage | |
Notes | indicate LiPo charge if it was used, but as it also introduces noise to the system LiPo powering option was eliminated |
LED1 / Pckts | |
---|---|
Description | Flashes with Outernet Packets are Received |
Color | Green |
Default at Boot | OFF |
SysFs Device | /sys/class/leds/packet |
Usage | On/Off = brightness |
Notes | Unused in Armbian |
LED2 / Flock | |
---|---|
Description | Satellite Lock Indicator on when satellite signal is locked |
Color | Red |
Default at Boot | OFF |
SysFs Device | /sys/class/leds/lock |
Usage | On/Off = brightness |
Notes | Unused in Armbian |
LED3 / SNR1 | |
---|---|
Description | SNR indicator |
Color | Blue |
Default at Boot | OFF |
SysFs Device | /sys/class/leds/snr1 |
Usage | On/Off = brightness |
Notes | Unused in Armbian |
LED4 / SNR2 | |
---|---|
Description | SNR indicator |
Color | Blue |
Default at Boot | OFF |
SysFs Device | /sys/class/leds/snr2 |
Usage | On/Off = brightness |
Notes | Unused in Armbian |
LED5 / SNR3 | |
---|---|
Description | SNR indicator |
Color | Blue |
Default at Boot | OFF |
SysFs Device | /sys/class/leds/snr3 |
Usage | On/Off = brightness |
Notes | Unused in Armbian |
LED6 / SNR4 | |
---|---|
Description | SNR indicator |
Color | Blue |
Default at Boot | OFF |
SysFs Device | /sys/class/leds/snr4 |
Usage | On/Off = brightness |
Notes | Unused in Armbian |
LED7 / USR1 | |
---|---|
Description | sdcard activity indicator. equivalent of the HDD activity light |
Color | Green |
Default at Boot | OFF |
SysFs Device | /sys/class/leds/storage |
Usage | On/Off = brightness |
Notes |
LED8 / USR2 | |
---|---|
Description | heartbeat: flashes when kernel is booted and working normally. |
Color | Green |
Default at Boot | OFF |
SysFs Device | /sys/class/leds/heartbeat |
Usage | On/Off = brightness |
Notes | long off, N short flashes, long off, repeat, where N = 2 * Load_Average |
LED9 / PWR | |
---|---|
Description | Power: White LED, on when board is powered. |
Color | White |
Default at Boot | ON |
SysFs Device | |
Usage | |
Notes |
LED10 / AGP3 | |
---|---|
Description | Status indicator of Boot by default |
Color | Red |
Default at Boot | |
SysFs Device | |
Usage | |
Notes | AXP209.gpio2 |
LED11 / STATUS | |
---|---|
Description | |
Color | Green |
Default at Boot | |
SysFs Device | |
Usage | |
Notes | AXP209.gpio2 |
LED12 / USBH | |
---|---|
Description | USB Hub Indicator Light, Green when active |
Color | Green |
Default at Boot | ON |
SysFs Device | /sys/class/leds/usbhuben |
Usage | On/Off = brightness |
Notes | Turning this off, will disable all USB ports. |
RF Ports
There are two RF ports on the DreamCatcher, they are labeled "LNA_IN" (at the corner of the board), and "LNA_BYPASS". They are SMA Type connections. To enable them you will write a 0 or a 1 to the appropriate SYSFS file location. Writing a 1 will enable it, and a 0 will disable it. if you enable one, you must disable the other;
NOTE: you must be a Superuser to control these... use "sudo su" first
Enable LNA_BYPASS
- This is normally selected when you are using an external LNA, or Active Antenna
echo 1 > /sys/class/leds/rfswitch1/brightness echo 0 > /sys/class/leds/rfswitch2/brightness
Enable LNA_IN
- This would be used with a passive antenna or internal LNA
echo 0 > /sys/class/leds/rfswitch1/brightness echo 1 >/sys/class/leds/rfswitch2/brightness
Enable LNA_BYPASS Bias Tee
- To Enable the bias tee, use the following commands
- NOTE: 68 mA current limit set by R76/100k
echo 119 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio119/direction echo 1 > /sys/class/gpio/gpio119/value
Enable Internal Audio Speaker Amplifier
sudo su cd /sys/class/gpio echo 114 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio114/direction echo 1 > /sys/class/gpio/gpio114/value
Running “alsamixer”, turn up the volume (navigate with cursors, cursor up volume up) and un-mute all channels (pressing “m” key while cursor on them)
Speaker amplifier output vias near C42, C43:
Temperature Monitoring
Armbian includes a monitoring application that gives you access to some of the hardware level details... for example to determine the CPU Temp use the following command:
armbianmonitor -m
however this of little use in automated monitoring or application development.
Usage: armbianmonitor [-h] [-b] [-c $path] [-d $device] [-D] [-m] [-p] [-r] [-u] ############################################################################ Use armbianmonitor for the following tasks: armbianmonitor -c /path/to/test performs disk health/performance tests armbianmonitor -d monitors writes to $device armbianmonitor -D tries to upload debug disk info to improve armbianmonitor armbianmonitor -m provides simple CLI monitoring armbianmonitor -p tries to install cpuminer for performance measurements armbianmonitor -r tries to install RPi-Monitor armbianmonitor -u tries to upload armhwinfo.log for support purposes ############################################################################
Direct access to System Values
Board Temperature
The following returns the temperature of the CPU in Celsius
cat /sys/class/thermal/thermal_zone0/temp
Returns:
32900
This is the same as 32.9C
CPU Information
cat /proc/cpuinfo
Returns:
processor : 0 model name : ARMv7 Processor rev 2 (v7l) BogoMIPS : 858.75 Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x3 CPU part : 0xc08 CPU revision : 2 Hardware : Allwinner sun4i/sun5i Families Revision : 0000 Serial : 1625428a0703290a
Processor Features
- half
- Half Word loads and stores
- thumb
- Thumb (16-bit instruction set)
- fastmult
- 32×32→64-bit multiplication
- vfp
- VFP (early SIMD vector floating point instructions)
- edsp
- DSP extensions (the 'e' variant of the ARM9 CPUs, and all others above)
- thumbee
- ThumbEE
- neon
- Advanced SIMD/NEON on AArch32
- vfpv3
- VFP version 3
- tls
- TLS register
- vfpd32
- VFP with 32 D-registers
System Load Averages
cat /proc/loadavg
Returns:
0.96 0.79 0.75 1/115 19306
0.96 = Last One Minute CPU and IO Utilization
0.79 = Last 5 minute CPU and IO Utilization
0.75 = Last 10 minute CPU and IO Utilization
1/115 = Running processes / Total processes
19306 = Last process ID used
System Memory Usage
cat /proc/meminfo
Returns
MemTotal: 510684 kB MemFree: 40648 kB MemAvailable: 441480 kB Buffers: 205240 kB Cached: 191808 kB SwapCached: 0 kB Active: 87248 kB Inactive: 342072 kB Active(anon): 13624 kB Inactive(anon): 18860 kB Active(file): 73624 kB Inactive(file): 323212 kB Unevictable: 0 kB Mlocked: 0 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 510684 kB LowFree: 40648 kB SwapTotal: 251324 kB SwapFree: 251324 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 32308 kB Mapped: 21816 kB Shmem: 212 kB Slab: 25540 kB SReclaimable: 15144 kB SUnreclaim: 10396 kB KernelStack: 936 kB PageTables: 892 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 506664 kB Committed_AS: 182860 kB VmallocTotal: 507904 kB VmallocUsed: 0 kB VmallocChunk: 0 kB CmaTotal: 65536 kB CmaFree: 648 kB
- MemTotal
- Total amount of physical RAM, in kilobytes.
- MemFree
- The amount of physical RAM, in kilobytes, left unused by the system.
- Buffers
- The amount of physical RAM, in kilobytes, used for file buffers.
- Cached
- The amount of physical RAM, in kilobytes, used as cache memory.
- SwapCached
- The amount of swap, in kilobytes, used as cache memory.
- Active
- The total amount of buffer or page cache memory, in kilobytes, that is in active use. This is memory that has been recently used and is usually not reclaimed for other purposes.
- Inactive
- The total amount of buffer or page cache memory, in kilobytes, that are free and available. This is memory that has not been recently used and can be reclaimed for other purposes.
- HighTotal and HighFree
- The total and free amount of memory, in kilobytes, that is not directly mapped into kernel space. The HighTotal value can vary based on the type of kernel used.
- LowTotal and LowFree
- The total and free amount of memory, in kilobytes, that is directly mapped into kernel space. The LowTotal value can vary based on the type of kernel used.
- SwapTotal
- The total amount of swap available, in kilobytes.
- SwapFree
- The total amount of swap free, in kilobytes.
- Dirty
- The total amount of memory, in kilobytes, waiting to be written back to the disk.
- Writeback
- The total amount of memory, in kilobytes, actively being written back to the disk.
- Mapped
- The total amount of memory, in kilobytes, which have been used to map devices, files, or libraries using the mmap command.
- Slab
- The total amount of memory, in kilobytes, used by the kernel to cache data structures for its own use.
- Committed_AS
- The total amount of memory, in kilobytes, estimated to complete the workload. This value represents the worst case scenario value, and also includes swap memory.
- PageTables
- The total amount of memory, in kilobytes, dedicated to the lowest page table level.
- VMallocTotal
- The total amount of memory, in kilobytes, of total allocated virtual address space.
- VMallocUsed
- The total amount of memory, in kilobytes, of used virtual address space.
- VMallocChunk
- The largest contiguous block of memory, in kilobytes, of available virtual address space.
TODO: I want to see how the RPi-Monitor works on the DreamCatcher, i know it works on the RaspberryPi and the OrangePi
Powering the Board Without a USB Cable
You can power the DreamCatcher with 5v to the JP1 current sense option jumper (+) and any convenient ground point such as the ground pin on the CHG-IN header.
Additional Headers
SPI1 | |
---|---|
Description | Serial Peripheral Interface |
MOSI | Master Output, Slave Input |
MISO | Master Input, Slave Output |
CS0 | Slave Select |
CLK | Clock |
GND | Ground |
SPI2 | |
---|---|
Description | Serial Peripheral Interface |
MOSI | Master Output, Slave Input |
MISO | Master Input, Slave Output |
CS0 | Slave Select |
CLK | Clock |
GND | Ground |
TWI2 | |
---|---|
Description | Two Wire Interface (I2C) |
GND | Ground |
3V3 | 3.3 Volt |
SCK | Serial Clock Line |
SDA | Serial Data Line |
UART1 | |
---|---|
Description | Universal Asynchronous Receiver/Transmitter |
GND | Ground |
RX | Receive Line |
TX | Transmit |
3V3 | 3.3 Volt |
JTAG | |
---|---|
Description | Joint Test Action Group |
RESET_N | Test Reset |
GND | Ground |
TDO | Test Data Out |
TCK | Test Clock |
TMS | Test Mode Select |
TDI | Test Data In |
3V3 | 3.3 Volt |
GPIO | |
---|---|
Description | These are in not in the correct order (what IS the CORRECT order?) Use the names to identify |
5V0 | 5.0 Volt |
GNDD1 | |
PC15/NDQ7 | |
PC13/NDQ5 | |
PIN17/NRE | |
PC3/NCE1 | |
PC1/NALE | |
PC19/NDQS | |
PG9/LED1 | |
PG11/USBH | |
PE5 | |
PB16 | |
PB15 | |
PE9 | |
PE10 | |
PE11 | |
PB1 | |
3V3 | |
GNDD | |
GNDD2 | |
PC14 | |
PC4 | |
PC2 | |
PC0 | |
PB10 | |
PG10 | |
PE4 | |
PE6 | |
PE7 | |
PE8 | |
PB4 | |
PB3 | |
PB2 | |
PB0 |
Test Points
P1 | |
---|---|
Description |
P4 | |
---|---|
Description |
P7 | |
---|---|
Description |
P5 | |
---|---|
Description |
P3 | |
---|---|
Description |
PWRON | |
---|---|
Description |
RESET | |
---|---|
Description |
AXPGP0 | |
---|---|
Description |
AXPGP1 | |
---|---|
Description |
AXPGP3 | |
---|---|
Description |
AXPGP2 | |
---|---|
Description |
NMI_N | |
---|---|
Description |
P11 | |
---|---|
Description |
P12 | |
---|---|
Description |
USBH_EN | |
---|---|
Description |
USB0_DRV | |
---|---|
Description |
SPK | |
---|---|
Description |
FACTORY | |
---|---|
Description |
LCD_020 | |
---|---|
Description |
LCD_021 | |
---|---|
Description |
LCD_022 | |
---|---|
Description |
LCD_023 | |
---|---|
Description |
LCD_CLK | |
---|---|
Description |
LCD_DE | |
---|---|
Description |
LCD_HSYNC | |
---|---|
Description |
LCD_VSYNC | |
---|---|
Description |
TPY2 | |
---|---|
Description |
TPY1 | |
---|---|
Description |
TPX1 | |
---|---|
Description |
TPX2 | |
---|---|
Description |
NON_REM1 | |
---|---|
Description |
SDA | |
---|---|
Description |
SCL | |
---|---|
Description |
HS | |
---|---|
Description |
Outernet Specific Applications
Outernet Overview
NOTE: Complete Outernet support is provided by the SkyLark Release above. If you just want to play with Outernet, then using that build is much easier. The details for software setup below are more more advanced Outernet usage, without needing SkyLark..
Outernet Broadcasts on L-Band satellite
Satellite Details | ||||
---|---|---|---|---|
Satellite Name | Orbital Position | Coverage Area | Outernet Frequency | Symbol Rate |
I-4 F3 Americas | 98°W | North, South, and Central America, Pacific and Atlantic Oceans | 1539.8725 MHz | 4200 |
Alphasat | 25°E | Europe, Africa, Middle East, East Asia, Atlantic and Indian Oceans | 1546.2500 MHz | 4200 |
I-4 F1 APAC | 144.0°E | Asia, Australia, Pacific and Indian Oceans | 1545.9525 MHz | 4200 |
Adding a custom Frequency
From time to time the frequency used for the Outernet datastream will change. This is the proper workaround for adding a new custom frequency:
- 1) Connect by terminal to your Dreamcatcher using the "outernet" user account
- 2) Open this config file with VI editor with "Sudo", edit then save
- "sudo vi /mnt/conf/etc/skylark_config.json"
- Enter the "outernet" user password when prompted for a password
- 3) Edit only the custom frequency and symbol rate setting (every other will change back on reboot)
"custom": { "label": "Custom", "value": "custom", "freq": "1546.25", "symbolrate": "4200" }
- 4) Set the Outernet application to use the custom frequency
- Open the "Tuner" Application
- Select the "Satellite" tab
"Select "Custom" from the dropdown
ONDD Setup
FTP to a DreamCatcher, copy the following files off of the system... be SURE to FORCE binary transfer.
/usr/sbin/ondd(md5:207723be33f4da57bd64a6549e11e95d) /usr/sbin/ontimeout (md5:5092f17f0152ca352799290999ba7a6c)
Create an empty conf file
/etc/ondd/ondd.conf
Create a place to place downloads
/home/downloads (or wherever)
Create a place for download cache
/home/download_cache
Run ondd with the following command:
/usr/sbin/ondd -d --pid_file /var/run/ondd.pid --cfg-gile [empty cfg file you created] -c [location for download cache] -o [location for completed downloads] -D /var/run/ondd.data --sdr-timeout-handler /usr/sbin/ontimeout
Command Help
[Skylark][outernet@outernet:/usr/sbin]$ /usr/sbin/ondd -h 00:11:21.099 [main] Unable to load config: /etc/ondd.conf (null) Usage: ondd --cfg-file CONFIG_FILE override default config file location --pid-file PID_FILE override default pid file location --ctrl-sock SOCK_FILE override default control socket path used for ipc --status-sock SOCK_FILE override default status report socket path - status e --cert-file CERT_FILE override default ceritificate file location -D SOCK_FILE data socket path to which the demodulator sends raw s --sdr-timeout-handler script to execute if no data arrives through the date -o PATH path to output directory where downloaded files are d -c PATH path to cache directory where partially downloaded fd -O PATH if specified, files which path does not begin with td -b N set the maximum number of download completion eventsy -d start ondd in daemon mode -i print to stdout the current signal strength and snr,d -V enable verbose mode -v display ondd version info -h display this helptext
External API Access
Skylark has 3 known access points for external api access. These APIs provide access to specific items in a JSON format. They do not require login and are enabled by default as far as we can tell (version 4.4)
getTunerStatus
This provides the tuner connection status which is the same as what is available in the ui under Tuner-->Status tab.
Access URL
http://10.0.0.1/DIRECT/getTunerStatus
The following values are provided:
getTunerStatus Values | ||
---|---|---|
JSON Parameter | Description | Example Value |
error | Indicates by TRUE or FALSE if there was an error in processing the request | false |
result | contains the complete parameter value set | (see below) |
getTunerStatus "result" Parameter Values | ||
---|---|---|
JSON Value | Description | Example |
event | "packet_received" | |
event_details | ||
lock | Indicates the status of the satellite lock where:
0 = Not Locked 1 = Locked |
1 |
freq | Frequency the receiver is tuned to. | 1539.87 |
freq_offset | The frequency offset in Hz from the Primary frequency | |
set_rs | ||
rssi | Received signal strength indication (dBm) | |
snr | Signal to Noise Ratio | Indicates the strength of the incoming signal to the device, must be higher than 3.0 to 4.0 for a quality locked signal |
ser | Symbol Error Rate | The rate of error for the received packet stream |
crc_ok | The number of packets that passed the CRC check | 317628 |
crc_err | The number of packets that failed the CRC check | 0 |
alg_pk_mn | This describes how much the signal stands out from the noise. | 28.06 |
state | Indicates the current signal lock state, where:
0 = Search 1 = Signal Detect 2 = Const Lock 3 = Code Lock 4 = Frame Lock |
4 |
transfers | This is a JSON Array that contains the current transfers in progress. Although this is usually just one item, the code clearly supports multiple simultaneous downloads | (See Below) |
getTunerStatus "result" --> "Transfer" Parameter Values | ||
---|---|---|
JSON Value | Description | Example |
carousel_id | ||
path | File path for the download object | |
hash | ||
block_count | ||
block_received | ||
complete |
example JSON:
{ "result": { "event": "packet_received", "event_details": "", "lock": 1, "freq": 1539.87, "freq_offset": -2557.35, "set_rs": 4200, "rssi": -116.74, "snr": 11.58, "ser": 0, "crc_ok": 317628, "crc_err": 0, "alg_pk_mn": 28.06, "state": 4, "transfers": [{ "carousel_id": 2, "path": "opaks/58d9-news-pack.2017-09-05_1743.tbz2", "hash": "bb4d85e4e41c190780b67dc44aee2add2be413137f6aee0c197052281a8c902d", "block_count": 225, "block_received": 136, "complete": 0 }, {}] }, "error": false }
Duplicating the UI Tuner Status
the UI tuner status provides some values that must be calculated from the API Values provided above.
Implementing the Tuner UI Values | ||
---|---|---|
UI Label | API Value(s) | Calculation |
SNR (dB) | snr | snr |
Lock | lock | lock? "yes" : "no" |
Rssi (dBm) | rssi | rssi |
APkMn Ratio | alg_pk_mn | alg_pk_mn |
Frequency (MHz) | freq | freq |
Freq Offset (Hz) | freq_offset | freq_offset |
Symbol Error Rate (SER) | ser | ser |
Packets Received | crc_ok, crc_err | crc_ok + crc_err |
Valid Packets | crc_ok | crc_ok |
Valid packets % | crc_ok, crc_err | round(100*crc_ok / (crc_ok + crc_err) |
Packet Error Rate (PER) | crc_err, crc_ok | round(1000*crc_err/ (crc_ok + crc_err) ) / 1000 |
Lock State | state | 0=Search, 1=Signal Detect, 2=Const Lock, 3=Code Lock, 4=Frame Lock |
Transfers: | path, block_received, block_count | path + (round( 100 * block_received / block_count)) + "%" |
getAPRS
This interface provides a complete listing of the received APRS messages.
Access URL
http://10.0.0.1/DIRECT/getAPRS
getTunerStatus Values | ||
---|---|---|
JSON Value | Description | Example |
result | ||
error |
example JSON:
{ "result": "KE7WWT-1>APMI01,TCPIP*,qAS,KE7WWT:OUTNET\n KE7WWT-1>APMI01,TCPIP*,qAS,KE7WWT:OUTNET\n KE7WWT-1>APMI01,TCPIP*,qAS,KE7WWT:OUTNET\n", "error": false }
whatsNew
provides a list of the whats new listing
Access URL
http://10.0.0.1/DIRECT/whatsNew
getTunerStatus Values | |
---|---|
JSON Value | Description |
result | Complete result set, separated by "\n" between rows |
error |
Example JSON:
{"result": "1504634234,combined.js\n 1504634005,Amateur Radio/APRS/APRSAT/messages-2017-09-05_17:53.txt\n 1504633409,News/2017-09-05.EurekAlert - Breaking News.NASA sees development of Tropical Depression 19W.html\n 1504633409,News/2017-09-05.EurekAlert - Breaking News.Opioid abuse can be treated successfully in primary care settings, stud.html\n 1504633408,News/2017-09-05.EurekAlert - Breaking News.Eating meat linked to higher risk of diabetes.html\n", "error":false}
Running Custom Scripts
The Skylark release for the DreamCatcher is a read only system. Although there are logs and data written to certain locations, you cannot install additional applications on the system with tools such as apt and yum. You can however, run scripts at boot that may be used to start other services as needed.
Since version 1.2 Skylark has support for starting a user script at bootup. For the technically inclined, look at /etc/init.d/S99user, that should tell you all.
Installing User Boot Script
- first become root
- sudo su -
- then make a directory called bin in /mnt/conf
- mkdir /mnt/conf/bin
- in this directory create your script and call it user.sh
- vi /mnt/conf/bin/user.sh
as an example, heres a script that logs the snr every 10 seconds
#!/bin/sh while true do a=$(wget -q -O - http://127.0.0.1/DIRECT/getTunerStatus | jq .result.snr) echo -n $(date) ": " echo $a sleep 10 done >> /mnt/downloads/snrlog.txt
- make sure the script is executable, and owned by root
- chown root:root /mnt/conf/bin/user.sh
- chmod 755 /mnt/conf/bin/user.sh
NOTE: be careful though:
The script is run at the end of boot. So if you make changes to any service files or configs, you should restart that service as well. Be careful about how much RAM and CPU you consume in this script. Its a very limited system.
ADS-B reception using dump1090
Install Updates and Base Packages
sudo apt-mark hold linux-dtb-next-sunxi linux-headers-next-sunxi linux-image-next-sunxi linux-firmware-image-next-sunxi sudo apt update sudo apt upgrade sudo apt install rtl-sdr librtlsdr-dev pkg-config build-essential wget https://raw.githubusercontent.com/keenerd/rtl-sdr/master/rtl-sdr.rules sudo mv rtl-sdr.rules /etc/udev/rules.d/
Reboot the DreamCatcher
sudo reboot
Install dump1090
Download and compile dump1090 (one time only):
mkdir adsb cd adsb git clone https://github.com/MalcolmRobb/dump1090 cd dump1090 make
Antennas
Hook-up a 1090MHz antenna, suitable for ADS-B reception to the LNA_BYPASS RF input of Dreamcatcher. You can find some good starting points here: http://discussions.flightaware.com/ads-b-flight-tracking-f21/three-easy-diy-antennas-for-beginners-t20177.html
Running dump1090
echo 1 | sudo tee /sys/class/leds/rfswitch1/brightness echo 0 | sudo tee /sys/class/leds/rfswitch2/brightness ./dump1090 --interactive --net
NOTE: The “rfswitch1” and “rfswitch2” lines are not strictly necessary, but will not hurt anything - the Dreamcatcher Armbian image ships with the LNA bypass enabled by default.
Running dump1090 as a daemon
if you dump1090 to run in the background after a reboot, you need to set it up as a daemon.
Create a Startup script in /etc/init.d
The following is a sample startup script. This was poached from this site: http://www.satsignal.eu/raspberry-pi/dump1090.html
- Create a simple script in /etc/init.d, in my case i called it, dump1090.sh
- Cut and paste the following into the file
#!/bin/bash ### BEGIN INIT INFO # # Provides: dump1090 # Required-Start: $remote_fs # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: dump1090 initscript # ### END INIT INFO ## Fill in name of program here. PROG="dump1090" PROG_PATH="/home/pi/dump1090" PROG_ARGS="--interactive --net --no-fix --net-ro-size 500 --net-ro-rate 5 --net-heartbeat 60 --gain -10" PIDFILE="/var/run/dump1090.pid" start() { if [ -e $PIDFILE ]; then ## Program is running, exit with error. echo "Error! $PROG is currently running!" 1>&2 exit 1 else ## Change from /dev/null to something like /var/log/$PROG if you want to save output. cd $PROG_PATH ./$PROG $PROG_ARGS 2>&1 >/dev/null & echo "$PROG started" touch $PIDFILE fi } stop() { if [ -e $PIDFILE ]; then ## Program is running, so stop it echo "$PROG is running" killall $PROG rm -f $PIDFILE echo "$PROG stopped" else ## Program is not running, exit with error. echo "Error! $PROG not started!" 1>&2 exit 1 fi } ## Check to see if we are running as root first. ## Found at http://www.cyberciti.biz/tips/shell-root-user-check-script.html if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 exit 1 fi case "$1" in start) start exit 0 ;; stop) stop exit 0 ;; reload|restart|force-reload) stop start exit 0 ;; **) echo "Usage: $0 {start|stop|reload}" 1>&2 exit 1 ;; esac exit 0
NOTE: You need to alter the PROG_PATH value to the location of your dump1090 application
- Set the permission to executable
sudo chmod +x /etc/init.d/dump1090.sh
- Install to the startup directories
sudo update-rc.d dump1090.sh defaults
- If you want to remove it later
sudo update-rc.d -f dump1090.sh remove
- Test Start the application
sudo /etc/init.d/dump1090.sh start
- NOTE: If you want to stop it
sudo /etc/init.d/dump1090.sh stop
Verify that it is running
To verify that the application is running connect to the IP Address of the system and 8080 like
http://10.0.1.150:8080
you should see a map load..
Running the Dreamcatcher SDR from another System
The SDR on the dreamcatcher is connected the the CPU via USB, this connection can be changed to an external USB and the SDR can be connected to another systems USB. Doing this will prevent the SDR from being used by the dreamcatcher.
To Do this:
- Populate USB1 connector (or just solder wires for a usb pigtail cable)
- Remove R72 and R73 and move them to the R116 and R117 footprints.
This will disconnect the SDR from the usb hub on the DreamCatcher and route it's usb to the external cable.
Listen to FM broadcasts
Its possible to listen to standard FM broadcast radio using the Dreamcatchers SDR.
Install necessary Software
sudo apt install rtl-sdr sox
Enable sound output through the 3.5mm TRRS connector
alsamixer
Enable every column except the second and third by pressing “m” (for mute/unmute) when the column is selected. Use the keyboard left-arrow and right-arrow keys to move among the columns. For the second column, use up-arrow and down-arrow keys to adjust output volume. Be careful to not set it too high; if the column color changes to white, it has been set too high. Leave the third column muted.
You may have to reset theseAon every boot. Alternatively, you can save and restore them using: sudo /usr/sbin/alsactl store sudo /usr/sbin/alsactl restore
Connect a TRRS (tip-ring-ring-sleeve) headset cable - the kind you might use with an Android phone - to the 3.5mm connector on Dreamcatcher that is labelled “headphn”. This has 4 conductors - a “normal” set of headphones has 3.
Run this:
rtl_fm -f 104.7M -M fm -s 340k -A fast -r 32k -l 0 -E deemp | play -r 32k -t raw -e s -b 16 -c 1 -V1 -
More information about the various command line options is at the rtl_fm homepage at http://kmkeen.com/rtl-demod-guide/
Obviously, the most important one is the -f option for selecting the tuned frequency. You may also have to play around with the -s if the output is noisy.
FM broadcasts tend to be quite powerful signals, and I have not needed an antenna for receiving any of the local stations, but in case of bad reception, just adding a sub-1M SMA cable at the LNA_BYPASS RF input of the Dreamcatcher should improve reception dramatically.
Modify the Tuner application to add Frequencies
Although this isnt all that useful unless you want to have lots of entries in the satellite list that won't work, it is important to know how all this works so you can if you need to later...
Skylark is read only, so to make these changes, you will need to use the User.sh service scripts to re-install the changes after every reboot, then restart the ui service.
Create a Custom skylark_config.json file Modify your custom skylark_config.json file and copy to the proper locations (if you dont have this file, copy /etc/skylark_config.json to this location
Add the new entries to the "tunerConf" section Add new entires for each new satellite entry, note the entries for sat1, sat2, sat3 below:
"tunerConf": {
"beams": { "sat1": { "label": "Satellite 1", "value": "sat1", "freq": "1545.1111", "symbolrate": "4200" }, "sat2": { "label": "Satellite 2", "value": "sat2", "freq": "1545.2222", "symbolrate": "4200" }, "sat3": { "label": "Satellite 3", "value": "sat3", "freq": "1545.3333", "symbolrate": "4200" }, "apac": { "label": "Asia Pacific (144E)", "value": "apac", "freq": "1545.9525", "symbolrate": "4200" }, "emea": { "label": "Europe, West Asia, Africa (25E)", "value": "emea", "freq": "1545.94", "symbolrate": "4200" }, "americas": { "label": "Americas (98W)", "value": "americas", "freq": "1539.8725", "symbolrate": "4200" }, "custom": { "label": "Custom", "value": "custom", "freq": "1546.25", "symbolrate": "4200" } }, "selectedBeam": "americas" },
Add the new entries to the "overRide" section. This will allow the new entries to remain after a reboot.
"overRides": [
"netConf.hostname", "netConf.mode", "netConf.sta", "netConf.ap", "tunerConf.selectedBeam", "tunerConf.beams.custom", "tunerConf.beams.sat1", "tunerConf.beams.sat2", "tunerConf.beams.sat3" ]
save the new skylark_config.json file to /mnt/conf/bin check the file syntax with "jq -c < skylark_config.json"
Add a user.sh script to /mnt/config/bin directory NOTE: in order to get this to work reliably i needed to copy the config to both places. im sure in my reverse engineering that i missed something simple, but this worked..
- !/bin/sh
- copy the skylark config to /mnt/conf/etc
cp /mnt/conf/bin/skylark_config.json /mnt/conf/etc/skylark_config.json
- copy the skylark config to /etc
cp -f /mnt/conf/bin/skylark_config.json /etc
- restart the ui service
/etc/init.d/S70ui2service restart reboot your DC to see how it works...
Install a custom applicaiton to skylark 4.4
I've wanted to add some custom applications to the DC running SkyLark (currently 4.4).. this is the process to install it so it remains after a reboot.. Although Skylark is based on the OS.js platform (https://www.os-js.org/), its customized quite a bit.
Additionally Skylark is read only, any changes you make will be overwritten on the next reboot. To get around this, we will use the user script service to re-install the customizations after every reboot, then bounce the window manager.
Create your custom application you can use an existing application as a template, but you will need to modify much of it so its unique. Developing the application is beyond the scope of this post, and requires more effort. (mine clearly needs some work, but wanted to document this first)
Existing applications can be found in: /usr/share/www/packages/default copy one of these to your writable location.. in my case it was /mnt/conf/bin modify the application as required.
Create Custom Icons you will need both 16x16 and 32x32 size icons store these in your writable location for example /mnt/conf/bin
Create a custom packages.json Copy the packages.json file from /usr/lib/node_modules/ui2 to your writable location.. /mnt/conf/bin
modify the file adding an entry to the "www" group for your new application... Check the syntax of the file with "jq -c < packages.json" when your complete.
for my example i added the following..
"default/RACHEL": {
"className": "ApplicationRachel", "name": "RACHEL", "mime": null, "icon": "apps/RACHEL.png", "category": "utilities", "preload": [ { "type": "javascript", "src": "combined.js" }, { "src": "scheme.html", "type": "scheme" }, { "type": "stylesheet", "src": "combined.css" } ], "type": "application", "path": "default/RACHEL", "build": {}, "repo": "default" }
Add a User Service Script Create a "user.sh" script to place all the files in the proper place then restart the ui service..
- !/bin/sh
cp -f /mnt/conf/bin/packages.json /usr/lib/node_modules/ui2 chmod 644 /usr/lib/node_modules/ui2/packages.json
cp -R /mnt/conf/bin/RACHEL /usr/share/www/packages/default chmod 755 /mnt/conf/bin/RACHEL
cp -f /mnt/conf/bin/RACHEL_16x16.png /usr/share/www/themes/icons/default/16x16/apps/RACHEL.png
cp -f /mnt/conf/bin/RACHEL_32x32.png /usr/share/www/themes/icons/default/32x32/apps/RACHEL.png
/etc/init.d/S70ui2service restart when you goto the Skylark Web UI, you will see your new application..