FaradayRF / Faraday-Software

Faraday node software
https://www.faradayrf.com
Other
48 stars 19 forks source link

Implement APRS BASE91 Comment Telemetry #266

Closed kb1lqc closed 7 years ago

kb1lqc commented 7 years ago

Summary

8 Bit telemetry is, well, antiquated. This issue ticket will implement BASE91 comment telemetry into the faraday-aprs package. The result will be a full 12 bit value for each telemetry field.

Problem Explanation

Some developers added on the ability for APRS-IS and websites such as APRS.fi to support BASE91 encoded telemetry in comments. This allows up to 16 bit accuracy for each telemetry field.

Environment

Software

Please include the branch or commit if known regarding what software was used if applicable

Hardware

Let us know about what hardware you are using if applicable. This includes:

  • Faraday radio serial numbers
  • Computer operating system

Supporting Information

kb1lqc commented 7 years ago

Installing base91 from pip: https://pypi.python.org/pypi/base91/1.0.1

kb1lqc commented 7 years ago

Oh sweet Jesus... this stumped me for a few minutes

3.4 The telemetry sequence counter and telemetry channels are encoded using
the Base91 encoding, as it is presently used in Compressed APRS position
packets, the altitude extension, and the DAO extension. Two bytes are
transmitted for the sequence counter and each of the channels, giving over
13 bits of resolution (values 0 to 8280). Please note that APRS uses a
different definition of Base91 than the internet standard Base91 - see
APRS101.PDF for details.

Please note that APRS uses a different definition of Base91 than the internet standard Base91 - see APRS101.PDF for details.

🤔

kb1lqc commented 7 years ago

Well even more reason to move to aprslib, implements base91 APRS flavor https://github.com/rossengeorgiev/aprs-python/blob/master/aprslib/base91.py

standards

kb1lqc commented 7 years ago

Alright I got it. It turns out that aprslib (or aprs-python) has a BASE91 encoder/decoder.

I completely missed that you could specify width with aprslib BASE91... woops. I thought there was an error

kb1lqc commented 7 years ago

Ran code overnight to get 12 bit ADC data into APRS-IS!

image

image

Still had a problem of APRS-IS disconnecting overnight but progress.

kb1lqc commented 7 years ago

It worked well most of today and the data looks really nice.

image

I lost connection in the evening. So there still needs to be some TLC on connecting to APRS-IS. Also, I should add IO Bits to the BASE91 data before closing this one.

kb1lqc commented 7 years ago

Added BASE91 IO data to the comment telemetry transmitted with each position report in branch aprsTelem 0a57a3b

image

kb1lqc commented 7 years ago

WHOA @aprs.fi on twitter helped me get the network adapter working right in Virtualbox. I had to use a "bridged" network adapter setting after power cycling the debian server! I then could connect to the IP Address but would get booted and wouldn't show up on the aprsc status as a client! Restartedthe server and changed my APRS-IS name to `KB1LQC-16" and it works! image

Sending these through my locally hosted APRS-IS aprsc server! @kb1lqd @el-iso @reillyeon Now I will be able to test connection issues with ease :)

image

kb1lqc commented 7 years ago

Still going strong! I hope aprsc running locally helps smooth over network disconnects. If this ends up working over long durations then I can definitely start using local aprsc to mimic network loss and make my code much more reliable! @hdkmike @kb1lqd

https://aprs.fi/telemetry/a/KB1LQC-1?range=day

image

kb1lqc commented 7 years ago

Also, going on 7 hours client connection. Looking good! image

This will help #199, #190, and #119 though I should probably move over to one of those tickets when I actually start coding to resolve this issue. This ticket is just for BASE91 telemetry support which appears to be working!

kb1lqc commented 7 years ago

OK got kicked off:

image

image

my local aprsc server remained connected to APRS-IS so the problem must be with faraday-aprs not handling even local network blips. image

OK I should move this to a different ticket as this is the BASE91 ticket!

kb1lqc commented 7 years ago

Closed with #269 merge. Woot!