Skip to content

Instantly share code, notes, and snippets.

View anroOfCode's full-sized avatar

Anro Robinson anroOfCode

  • San Francisco, CA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am anroofcode on github.
  • I am anro (https://keybase.io/anro) on keybase.
  • I have a public key whose fingerprint is 824E 1912 76E0 0272 93E8 32C7 FF71 FBAE 793D 5833

To claim this, I am signing this object:

/*
* Ultra_bcm_config - A utility that does one thing, pretty well.
*
* Andrew Robinson <andrew.robinson@gmail.com>
*
* Based off of the framework provided by iwconfig.c - the standard
* linux wireless driver configuration tool. Modified to pass a special
* structure to the custom Broadcom BCM4329 chipset driver running in the
* kernel to enable AccessPoint mode, broadcasting of the SSID, and WEP/WPA
* encryption.
#if defined(__AVR_ATmega324P__)
/* Onboard LED is connected to pin PB5 in Arduino NG, Diecimila, and Duemilanove */
#define LED_DDR DDRB
#define LED_PORT PORTB
#define LED_PIN PINB
#define LED PINB1
/* Ports for soft UART */
#ifdef SOFT_UART
#define UART_PORT PORTD
set AVR=C:\WinAVR-20100110
set CC=avr-gcc
set PATH=C:\WinAVR-20100110\bin;C:\WinAVR-20100110\utils\bin
make -f Makefile atmega324
avrdude -c usbtiny -patmega324p -U flash:w:optiboot_atmega324.hex
avrdude -c usbtiny -patmega324p -U lfuse:w:0xFF:m
avrdude -c usbtiny -patmega324p -U hfuse:w:0xDE:m
avrdude -c usbtiny -patmega324p -U efuse:w:0xFD:m
@anroOfCode
anroOfCode / gist:729210
Created December 5, 2010 16:23
Makefile
atmega324: TARGET = atmega324
atmega324: MCU_TARGET = atmega324p
atmega324: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
atmega324: AVR_FREQ = 16000000L
atmega324: LDSECTION = --section-start=.text=0x7e00
atmega324: $(PROGRAM)_atmega324.hex
atmega324: $(PROGRAM)_atmega324.lst
public class SerializerHelper
{
SerializerHelper()
{
}
public static void serializeToStream(System.IO.Stream stream, object obj)
{
if (obj == null)
@anroOfCode
anroOfCode / gist:667335
Created November 8, 2010 02:59
F(x) predictor
static double f(double x, double y, double z, double w, double v)
{
return 34*Math.Sin(x) + 11*Math.Log(x) * Math.Cos(x) + x*x*v*Math.Sin(w)/Math.Cos(z*5*y) + x*3*Math.Sin(Math.Log(x));
}
<4>[19452.040679] penguin, get AP_PROFILE_SET
<4>[19452.041076] wl_iw: set ap profile:
<4>[19452.041442] ssid = AndrewsAndroidAP
<4>[19452.042144] security = wpa-psk
<4>[19452.042510] key = 1234567890
<4>[19452.042877] channel = 0
<4>[19452.043243] max scb = 2
<4>[19454.110931] Set auto channel = 1
<4>[19454.112182] wl_iw_setap: do passhash...
<4>[19454.210723] [00]: aa2f2f2c
./iwconfig eth0
eth0 IEEE 802.11-DS ESSID:"AndroidTether" Nickname:""
Mode:Master Frequency:2.412 GHz Access Point: 38:E7:D8:19:D7:0C
Bit Rate=54 Mb/s Tx-Power:32 dBm
Retry min limit:7 RTS thr:off Fragment thr:off
Encryption key:off
#
wl_iw_setap(struct net_device *dev, struct ap_profile *ap)
{
int updown = 0;
int channel = 0;
int wsec = 0;
int wpa_auth = 0;
int apstate = 1;
wlc_ssid_t ap_ssid;
wlc_ssid_t null_ssid;
int max_assoc = 8;