Skip to content

Instantly share code, notes, and snippets.

View darconeous's full-sized avatar
🦀

Robert Quattlebaum darconeous

🦀
View GitHub Profile
@darconeous
darconeous / tesla-key-card-protocol.md
Last active April 5, 2024 07:09
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum darco@deepdarc.com.

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob

@darconeous
darconeous / playground.rs
Last active July 2, 2019 01:55 — forked from rust-play/playground.rs
Code shared from the Rust Playground
use futures::prelude::*;
use pin_utils::unsafe_pinned;
use std::ops::Deref;
use std::pin::Pin;
use std::sync::Arc;
/// A container for a single object with lifetime that is bound to that of an `Arc`.
/// This is useful for passing around boxed futures that have a lifetime that is limited
/// to that of the object that created it.
///
@darconeous
darconeous / playground.rs
Last active May 29, 2019 17:56 — forked from rust-play/playground.rs
Code shared from the Rust Playground
/// Demonstration of compile-time key-value type safety.
///
/// This program demonstrates how you use Rust generics to encode type
/// information into the keys for a key-value store. This allows for
/// type-safe access to data in the store, preventing things like writing
/// strings to keys that should only contain integers. Attempting to
/// do so results in a compile-time error.
///
/// The example code is at the top of this file, the implementation details
/// are below the example.
@darconeous
darconeous / playground.rs
Last active May 17, 2019 23:52 — forked from rust-play/playground.rs
Code shared from the Rust Playground
/// Demonstration of a way to do polymorphic property lookup of standardized
/// collections of properties via simple traits and getter methods. This
/// approach could be extended to do things like fetch a list of the supported
/// keys, or expose aritrary traits via a property interface.
/// This is the trait that will be our general-purpose property interface. It
/// is intended to be used as a trait object.
///
/// This trait is implemented automatically by the `impl_super_trait!` macro,
@darconeous
darconeous / main.c
Created March 25, 2018 05:10
ATTiny LED Twinkler
/* ATTiny LED Twinkler
*
* This is come code I wrote a while back to "twinkle"
* four GPIO outputs that would drive LEDs. It was designed
* to be run on an eight-pin ATTiny13 chip. It works
* quite well, even considering how inefficient it is.
*
* - Robert Quattlebaum, 2012
*/
@darconeous
darconeous / eagle-200-curl.md
Last active August 10, 2022 03:34
Eagle-200 Local Usage via CURL

Eagle-200 Local Usage via CURL

You can locally pull data from your Rainforest Eagle-200 using cURL.

Rainforest has published a local API document which explains the details of the protocol. But this particular document is about quickly getting to the point and giving you some cURL commands you can use to immediately start pulling out data.

Prerequisites

First, I'll assume that you have the following environment variables set:

Keybase proof

I hereby claim:

  • I am darconeous on github.
  • I am darconeous (https://keybase.io/darconeous) on keybase.
  • I have a public key whose fingerprint is 23D1 FEC8 37D0 5C91 5BA3 8A5D 95B0 6A0F 3F86 5814

To claim this, I am signing this object:

@darconeous
darconeous / masrp.md
Last active September 9, 2019 21:51
Multiplexed Asynchronous Serial Reliability Protocol (MASRP)

Multiplexed Asynchronous Stream Reliability Protocol (MASRP)

Copyright (C) 2017 Nest Labs, All Rights Reserved

License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

@darconeous
darconeous / kidde-interconnect.md
Last active April 1, 2024 03:02
kidde-interconnect

Original "dumb" smoke detector interconnect sounds the siren on all interconnected smoke detectors when a 9-to-12 volt (referenced to neutral/white) direct-current signal is continuously present on the signal wire (red). This still how pretty much all interconnected smoke alarms indicate a fire condition.

However, modern interconnected detectors are capable of detecting carbon monoxide and other conditions. When these conditions are signaled, they must be identified as something other than a smoke alarm by the other detectors. Ideally, any dumb smoke detectors

Mechanism for Secure-by-Default Mesh Network Communication (Draft)

Overall goal is to remove the requirement that hosts keep track of a packet counter across resets. This is a common source of implementation difficulty. When not implemented correctly, it can severely compromise the security of the network.

Symmetric-Crypto Version

In the symmetric version of this scheme, there is a single secret