Skip to content

Instantly share code, notes, and snippets.

View tcr's full-sized avatar
🚮
bad command or file name

Tim Ryan tcr

🚮
bad command or file name
View GitHub Profile
@tcr
tcr / work.md
Last active July 19, 2016 18:17
TELEC Work

Special emissions testing build of T2

Using t2-build, we can generate a special version of kmod-rt2x00-lib.ipk and kmod-rt2800-lib.ipk that allows modification of testing parameters at runtime.

Explicitly run make package/kernel/mac80211/compile V=s -C openwrt or the full build process. Find the file by running

Tessel Stack (also in descending order of complexity):

Level Stack Repo
User / Module Code JS (Many)
CLI JS t2-cli
Tessel Library Linux / JS / Comms t2-firmware
SSH/GPIO Daemons Linux / C t2-firmware
OpenWRT Linux / C / Shell / More t2-firmware
Firmware C / Comms t2-firmware
@tcr
tcr / 999-tim_did_a.patch
Last active July 19, 2016 17:58
999-tim_did_a.patch
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 1274b85..56b3d00 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -38,11 +38,141 @@
#include <linux/slab.h>
#include <linux/clk.h>
#include <linux/of.h>
+#include <linux/stat.h>
@tcr
tcr / info.md
Last active August 29, 2015 14:26 — forked from tcr3dr/info.md
Tessel 2 FCC Approval

Tessel 2 is seeking FCC approval. Tessel 2 runs OpenWRT, a distribution of Linux designed as open firmware for routers with very granular control over wireless capabilities. Currently Tessel 2 is stuck in FCC approval pending its demonstration of being able to generate packets in the 802.11n range.

Testing instructions

Installation on a Tessel 2:

opkg update
opkg install tcpdump
wget https://kevinmehall.net/tmp/packetspammer -O /usr/bin/packetspammer
from __future__ import print_function
import sys
import six
from gevent import socket
from gevent.queue import Queue
from gevent.socket import wait_read
import gevent
def parse_arg(arg):
(proto, role, port) = arg.split(':')
@tcr
tcr / .gitignore
Last active August 29, 2015 14:22
Hello World for Node
node_modules
out
@tcr
tcr / Vagrantfile
Last active August 29, 2015 14:19
Tessel 2 VM
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.username = "root"
config.ssh.password = "tessel2"
config.ssh.shell = "ash"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.box = "technicalmachine/tessel2"
@tcr
tcr / Vagrantfile
Last active November 29, 2015 02:39
tessel 2 openwrt in packer
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.username = "root"
config.ssh.password = "tessel2"
config.ssh.shell = "ash"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.box = "technicalmachine/tessel2"
@tcr
tcr / one.lua
Last active August 29, 2015 14:07
-- match regex /a*b/
print('/a*b/')
-- Lua wrapper to extract a character from a string
-- at the indexth position (starting from 0)
-- This is just a helper since Lua is 1-indexed which
-- is insane. You can just copy this out.
function charat (str, index)
return string.sub(str, index + 1, index + 1)
end
@tcr
tcr / gist:53226a6e88a00cd42a4f
Created October 8, 2014 02:39
Uppercase/lowercase lookup tables in gcc
Cool!