Your leaking thatched hut during the restoration of a pre-Enlightenment state.

 

Hello, my name is Judas Gutenberg and this is my blaag (pronounced as you would the vomit noise "hyroop-bleuach").



links

decay & ruin
Biosphere II
Chernobyl
dead malls
Detroit
Irving housing

got that wrong
Paleofuture.com

appropriate tech
Arduino μcontrollers
Backwoods Home
Fractal antenna

fun social media stuff


Like asecular.com
(nobody does!)

Like my brownhouse:
   sprawling mess
Friday, March 5 2021 [REDACTED]

Today I was able to occasionally get LoraLAN packets from my T-beam to my Dragino LoRaLAN access point, where they arrived still encrypted in the conventional LoRaLAN way (using NWKSKEY, APPSKEY, and perhaps DEVADDR). With a LoraLAN packet decoder, I was able to decode this packets into long binary numbers, but these looked superficially like gibberish in ASCII (or any other format I tried). It turned out the sketch I was running on my T-beam was sending its GPS data out through LoraLAN in a format called CayenneLPP, which represents floating point in other values in the most data-dense manner possible while also giving an indication of what the data was. It does this by using a pre-arranged lookup table (one that isn't part of the packet) so that a single byte referring to that table in the packet can describe the data type. (This is a system so arbitrary and simple that it seems like something I might've come up with.) I managed to find some Javascript code that could decrupe CaynnneLPP data packets, though no such decoders were actually online for immediate use [a situation I have since remedied]. When I decoded the CayenneLPP packet, I finally had evidence the the T-beam was correctly transmitting GPS data. Oddly, though, I was utterly unable to get the "Application" I'd set up for the T-beam to work at TheThingNetwork. If I can't get that to work, I might have to end up communicating with my LoRa devices using LoRa and not LoRaLAN, which mean I could just transmit data in plaintext and not have the headache of dealing with unnecessary encryption.
Interestingly, though it was easy to find code to decrypt CayenneLPP packets using Javascript in a browser, when I wanted to decrypt the LoraLAN packets (using, again, NWKSKEY, APPSKEY, and perhaps DEVADDR), the only ways I could find to do that in Javascript was using NodeJS libraries, one of which was written in TypeScript. There didn't seem to be a way to do it in the browser at all, though I spent about 20 minutes trying to (this involved experiments with RequireJS, since the require keyword can't otherwise be used in the browser). The whole Javascript ecosystem is a sprawling mess that depresses me. But that's the inevitable fate of anything that gets popular.


For linking purposes this article's URL is:
http://asecular.com/blog.php?210305

feedback
previous | next