research notes
psychogeophysical inscription device HOWTO: 56
The device allows for placing of one (magnetic field) surface as an inscription or diagram on another (physical) surface. The intensity of the local magnetic field changes the frequency of the needle/wires back and forth movement. A simple prototype can be constructed using an Arduino sampling a coil amplified with an op07 operational amplifier and driving a IRF640 MOSFET and the motor of a primitive tattooing device. The tattoo device is constructed from a CDROM drive motor after: http://www.rentyman.com/neatstuff/tattoo.html
Inscription can be made using carbon paper or directly onto stone, plaster or skin.
Parts: 2x 10K resistor, 100K resistor, 100mH inductor coil, op07 opamp, IRF640 FET, battery holder and battery, salvaged CDROM motor, biro pen tube, wire, metal brace (from network card), Arduino, gaffer tape.
Video: http://vimeo.com/13519419
Code:
int x,y; int adcpin = 0; unsigned long adc0; void setup() { Serial.begin(9600); } void loop() { adc0 = analogRead(adcpin); analogWrite(2, adc0); Serial.print(adc0); Serial.print("\n\r"); }
ibm x60 portrait 55
using psychogeophysical inscription device and carbon paper on laptop lid (no significant processes running!)
prototype psychogeophysical inscription device 54
placing one surface as an inscription or diagram on another. simple prototype using Arduino sampling coil/op07 magnetic field amplifier and driving IRF640 MOSFET and motor:
code rocks commandline symphony notes 53
START: stty, swapoff, old kernel
swapoff -a stty -F /dev/ttyUSB0 115200
5 acts:
1- process table and xxxx….sh yyyyy….sh
nice -n -10 top -d.1 | tee pipe play -t raw -r 44100 -u -b -c 1 pipe
also with: A,M,N,P,T - alt display, sort by memory, PID, CPU, time (and G for group)
2- evp/i_am/speech somehow
cat /dev/mem | strings | espeak --stdout | ./evp 1 32 8000 1 > pipe play -t raw -r 44100 -u -b -c 1 pipe
3- self
./self > /dev/dsp
4- code rocks
cat /dev/mem > /dev/ttyUSB0 cat /dev/ttyUSB0 > /dev/dsp
5- rock off:
cat /dev/mem > /dev/ttyUSB0; cat /dev/ttyUSB0 | tee /dev/dsp > /dev/mem
report on mass storage/atmega32u4 52
Working with atmega32u4, LUFA mass storage code and Riegel FAT/SD library:
http://www.roland-riegel.de/sd-reader/index.html
following:
http://elasticsheep.com/2010/04/teensy2-usb-mass-storage-with-an-sd-card/
For detektors (http://detektors.org). Trying to sample 8000 bytes per second and write (later as WAV file, now as unsigned) to SD card with FAT16 filesystem which can then be accessed when USB is connected as a mass storage device.
USB mass storage is working but under various optimisations and configurations we experienced random crashes especially when we used one counter interrupt for ADC/double buffer and another (with ISR_NOBLOCK) for writing buffers to FAT/SD. Now we have buffer write in main (perhaps do double buffer switch here too or change to OpenLog code) and settings:
-Os // for optimisation
#define USE_DYNAMIC_MEMORY 0 // in SD-reader_config.h
which does not crash but at some points drops samples/does not write (we see ADC LED which flashes on buffer fill go dim/flash v fast or slow down depending on minor changes in the code.
causes/questions
Is it a hardware problem … with timing?
Can only test with other hardware eg. teensy, AVR USB key or atmega328.
timing - some kind of overflow? but CTC resets on match.
what is with cli repeated in .lss for our code?
For example:
908: 0f b6 in r0, 0x3f ; 63 90a: f8 94 cli 90c: 9e bf out 0x3e, r25 ; 62 90e: 0f be out 0x3f, r0 ; 63 910: 8d bf out 0x3d, r24 ; 61
And note that: 0x3d is SPL, 0x3e is SPH, 0x3f is SREG
So in principle is not cli for very long.
See: http://www.nongnu.org/avr-libc/user-manual/FAQ.html
When setting up space for local variables on the stack, the compiler generates code like this:
/* prologue: frame size=20 */
push r28
push r29
in r28,__SP_L__
in r29,__SP_H__
sbiw r28,20
in __tmp_reg__,__SREG__
cli
out __SP_H__,r29
out __SREG__,__tmp_reg__
out __SP_L__,r28
/* prologue end (size=10) */
It reads the current stack pointer value, decrements it by the required amount of bytes, then disables interrupts, writes back the high part of the stack pointer, writes back the saved SREG (which will eventually re-enable interrupts if they have been enabled before), and finally writes the low part of the stack pointer.
At the first glance, there's a race between restoring SREG, and writing SPL. However, after enabling interrupts (either explicitly by setting the I flag, or by restoring it as part of the entire SREG), the AVR hardware executes (at least) the next instruction still with interrupts disabled, so the write to SPL is guaranteed to be executed with interrupts disabled still. Thus, the emitted sequence ensures interrupts will be disabled only for the minimum time required to guarantee the integrity of this operation.
See also: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=28683&start=0
about ISR_BLOCK and ISR_NOBLOCK
#define ISR_NOBLOCK
ISR runs with global interrupts initially enabled. The interrupt enable flag is activated by the compiler as early as possible within the ISR to ensure minimal processing delay for nested interrupts.
This may be used to create nested ISRs, however care should be taken to avoid stack overflows, or to avoid infinitely entering the ISR for those cases where the AVR hardware does not clear the respective interrupt flag before entering the ISR.
from: http://www.nongnu.org/avr-libc/user-manual/group\_\_avr\_\_interrupts.html
BLOCK is standard with global interrupts disabled in the ISR
how fast is SD/FAT storage?
For block of 512 bytes? Riegel reports 29 kB/s = 58 x 512 per second = 58 Hz. We need to write approx 16 blocks of 512 bytes per second at 8000 samples per second.
also note that FAT32 is reported as faster at 73 kB/s.
how fast is ADC?
/* ADC speed - clock / pre-scale and each ADC takes 13 cycles so if we pre-scale of 4 = 8Mhz/4 = 2 Mhz = 153 Khz approx */ // set a2d prescale factor to 8 (with both set) sbi(ADCSRA, ADPS1); // pre-scale of 4 // sbi(ADCSRA, ADPS0); sbi(ADCSRA, ADEN); sbi(ADCSRB, ADHSM); // high speed
is interrupt set correctly?
cli(); // apparently "Have to set OCR1A *after*, otherwise it gets reset to 0!" TCCR1A = 0; TCCR1B = (1 << WGM12) | (1 << CS10); // check OK. CTC . no prescalar OCR1A = (F_CPU / samplerate); TIMSK1 = (1 << OCIE1A); // check OK TIMSK0 = 0; // do we need this sei();
FAT notes
cluster size = bytes per sector (512) * sectors per cluster (32) = 16K
Slow down is happening in fat_write_file in fat.c (Riegel) as each time we want to go to the next cluster get_next_cluster is called one more time each round. So as position increases/file grows we call this over and over. Why?
Seems like we look at first cluster pointer in directory entry and then read ref to next cluster in the FAT and then next ref…
But if file is contiguous?
solutions
change double buffer
open directory and create file first
append file only in 512 byte chunks:
- do we need a new cluster (16k)? if so append
- Write the 512byte sector.
- Change the size in the directory table entry.
(but what about FAT table for clusters? in append?)
test other FAT libraries:
The one we use: http://www.roland-riegel.de/sd-reader/index.html
http://www.8051projects.net/mmc-sd-interface-fat16/sd-card-initialization.php
http://www.basementcode.com/avr/sd\_fatfs/fatfs.php
http://elm-chan.org/fsw/ff/00index\_e.html
and:
http://elm-chan.org/fsw/ff/00index\_p.html
tinyfatfs here: http://www.cl.cam.ac.uk/teaching/0910/P31/code/
http://frank.circleofcurrent.com/cache/fat\_sd.htm
http://tinkerish.com/blog/?p=13
http://www.dharmanitech.com/2009/01/sd-card-interfacing-with-atmega8-fat32.html
in assembly: http://digitalelectronicsandprograming.blogspot.com/2009/02/fat32-complete-library-in-asm-linguage.html
other issues
- centre of the ADC signal (is now from 0-255). this needs to be checked/tested with op-amps and biasing. DONE
- we can perhaps save time using left adjust and just read ADCH (but will need to switch bits round)
rough notes
Other variables could be manipulated off of a stack frame by declaring them in the ISR (not static).
try the naked attribute, that will kill all the pushing and popping, apart form the stack pointer.
see: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=27147&start=0
http://svn.tuxisalive.com/firmware/tuxaudio/trunk/main.c
also on measuring ISR latency:
http://www.uchobby.com/index.php/2007/11/24/arduino-interrupts/
sample code for…
- USB connect/disconnect
void EVENT_USB_Device_Connect(void) { recording=0; PORTD |= 0x80; cli(); TIMSK1 &= ~(1 << OCIE1A); closewavfile(); /* Reset the MSReset flag upon connection */ IsMassStoreReset = false; }
- sleeping and interrupt wakeup
unsigned char waker, waking; void wakeup(void); ISR(USB_GEN_vect) { } ISR(INT2_vect) { waker=waker^1; } void sleeper(void){ //power off PORTD|=0x81; // sleep and wake on PD1/INT1 - power down mode set_sleep_mode(SLEEP_MODE_PWR_DOWN); sei(); sleep_mode(); sleep_disable(); // wakeup waker=1; } int main(void){ DDRD=0x81; // PD7 and PD0 as out only PORTD|=0x81; // FET is on PD0 - power OFF // set up interrupt EIMSK &= ~(1<<INT2); // pd2 is on/off EICRA |= (1<<ISC21) | (1<<ISC20); EIFR |= (1<<INTF2); EIMSK |= (1<<INT2); USBCON |= (1<<OTGPADE) | (1<<VBUSTE); // wake on USB UDIEN |= (1<<WAKEUPE); sei(); waker=0; while(1){ if (waker==0) {sleeper();} PORTD|=0x80; // PD7/LED/power only _delay_ms(100); PORTD&= ~(0x81); _delay_ms(100); } }
the stack
How to detect RAM memory and variable overlap problems? You can simply run avr-nm on your output (ELF) file. Run it with the -n option, and it will sort the symbols numerically (by default, they are sorted alphabetically).
Look for the symbol _end, that's the first address in RAM that is not allocated by a variable. (avr-gcc internally adds 0x800000 to all data/bss variable addresses, so please ignore this offset.) Then, the run-time initialization code initializes the stack pointer (by default) to point to the last available address in (internal) SRAM. Thus, the region between _end and the end of SRAM is what is available for stack. (If your application uses malloc(), which e. g. also can happen inside printf(), the heap for dynamic memory is also located there. See Memory Areas and Using malloc().)
The amount of stack required for your application cannot be determined that easily. For example, if you recursively call a function and forget to break that recursion, the amount of stack required is infinite. :-) You can look at the generated assembler code (avr-gcc … -S), there's a comment in each generated assembler file that tells you the frame size for each generated function. That's the amount of stack required for this function, you have to add up that for all functions where you know that the calls could be nested.
references
http://elasticsheep.com/2010/04/teensy2-usb-mass-storage-with-an-sd-card/
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=76428&start=0
WAV: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
PCM header: http://survey.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=89108&start=0
ISR_NOBLOCK and crash: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=60207&start=0
example sd: http://code.google.com/p/avr-blackbox/source/browse/trunk/main.c?spec=svn5&r=5
openlog: http://www.uoxray.uoregon.edu/orangutan/main\_1.c
Very good SD/MMC guide: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235125412/all
http://blushingboy.net/p/SDuFAT/downloads/2/
first steps with the atmega32u4 for detektors 51
- 1] Microcontroller prototype (below) now working after a few hardware bugs: we tied pin 6 (SHDN) of MAX1676 to GND and not to VCC. Pin 5 of the mini-usb is GND and not pin 4.
- 2] Using dfu-programmer:
Pull HWB and RESET low…
Then run
dfu-programmer atmega32u4 erase
before
dfu-programmer atmega32u4 flash test.hex
dfu-programmer for the atmega32u4 installed from latest source:
Note: All fuses as factory defaults! Using 8 MHz clock (by default divided by 8 to run at 1 MHz)
detektor second prototype 50
This is the microcontroller/mass storage and power management part of the detektor design: http://detektors.org
All designs (and soon software) are now in svn:
preparing for 11.4 48
reworkings of HD, floppy, CD-ROM
[in contrast to ghost floppy rework in Torun we now connect 12 and 16 to GND to set running - also some kind of recording using pins 22 and 24 to GND]
from: http://www.tvdsb.on.ca/banting/ICE3M/unit6/floppy/floppy\_cable\_pins.html
Pins 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33, are all grounds. Pin 2 - High Density Select Pin 8 - Index Pulse (produced by the spindle motor for timing) Pin 10 - A: Motor on Pin 12 - Drive Select B: Pin 14 - Drive Select A: Pin 16 - B: Motor on Pin 18 - Direction of the head stepper motor (A low here moves in one direction, high moves the other direction) Pin 20 - Step Pulse (Each pulse here cause the head stepper to make a step) Pin 22 - Write Data Pin 24 - Write Enable (A low turns on the write circuit) Pin 26 - Track 0 ( A low puts the head stepper over track zero) Pin 28 - Write Protect Pin 30 - Read Data Pin 32 - Select head (A Low selects head zero) Pin 34 - Disk Change Switch
island2 networking completed 47
For chmod+x next week. Small portions of the island are shared globally across Internet hidden within ping or ICMP packets.
- Project:
- Code:
http://1010.co.uk/island2.002.tar.gz
[The code is potentially useful for anyone coding kernel modules under recent kernel versions (>2.6.20) and making use of ICMP packeteering, netfilter hooks, and job scheduling.]
- Links:
http://sd.wareonearth.com/~phil/net/ping/
echo = ping audio 46
import sys import ossaudiodev from scapy.all import sr1,IP,ICMP x=ossaudiodev.open("/dev/dsp","rw") (fmt, channels, rate) = x.setparameters(64, 1, 8000) while(1): xx=x.read(1024) p=sr1(IP(dst="192.168.2.11")/ICMP()/(xx)) xx=x.write(str(p.payload))
RNG [Random Number Generator] shield for Arduino 45
In this case for the Arduino Mega and following a well rehearsed design previously used here:
Hardware
see repository for KiCad board file.
Example code
/* //RNG - Random Number Generator example// */ int readpin = 54; // this is analog pin 0 on the mega int x,xx,y,alt,randy, accum; void setup() { Serial.begin(9600); pinMode(readpin, INPUT); xx=0;alt=0;randy=0;accum=0; } void loop() { for (x=0;x<166;x++){ y = digitalRead(readpin); if (y==LOW) xx++; } if ((xx&1)==1) x=0; else x=1; xx=0; x= x ^ alt; alt= alt ^ 1; randy=(x<<accum)|randy; accum++; if (accum==8) { Serial.print(randy, BYTE); // Serial.print("\n\r"); accum=0; randy=0; } }
Usage
To fill the Linux kernel entropy buffer for further calls to /dev/random:
./readrng -d /dev/ttyUSB0 -q 512
using readrng from http://www.cryogenius.com/hardware/rng/read\_rng.c
… or use the RNG in your own Arduino application.
explorations in ferrite core memory 44
Testing writing of a 1 and a 0 (and then a read after a delay of 120 microseconds) to a single ferrite core (salvaged from old coils):
code
/* exploring induction/memory in ferrite core using L298 dual H bridge// ;; positive pulse to X [and Y if is in grid] ;; to read apply negative to X [and Y] ;; read induced voltage on C (wrapped wire on the coil) ;; if voltage then was a 1 (and then we need a reset to 1 with pulse) ;; if no voltage then was a 0 (and no pulse is needed to reset) ;; so 1]pulse 2]low 3]read and print induced voltage on ADC */ #define F_CPU 12000000UL // 12 MHz #include <avr/io.h> #include <stdio.h> #include <inttypes.h> #include <avr/delay.h> #define UART_BAUD_CALC(UART_BAUD_RATE,F_OSC) ((F_OSC)/((UART_BAUD_RATE)*16l)-1) void delay(int ms){ while(ms){ _delay_ms(0.96); ms--; } } void serial_init(int baudrate){ UBRRH = (uint8_t)(UART_BAUD_CALC(baudrate,F_CPU)>>8); UBRRL = (uint8_t)UART_BAUD_CALC(baudrate,F_CPU); /* set baud rate */ UCSRB = (1<<RXEN) | (1<<TXEN); /* enable receiver and transmitter */ UCSRC = (1<<URSEL) | (3<<UCSZ0); /* asynchronous 8N1 */ } static int uart_putchar(char c, FILE *stream); static FILE mystdout = FDEV_SETUP_STREAM(uart_putchar, NULL,_FDEV_SETUP_WRITE); static int uart_putchar(char c, FILE *stream) { loop_until_bit_is_set(UCSRA, UDRE); UDR = c; return 0; } void adc_init(){ DDRC=0x00; PORTC=0x00; unsigned char channel = 0; ADMUX=(channel & 0x0f); // ADCSRA: ADC Control and Status Register // ADPS2..ADPS0: ADC frequency Prescaler Select Bits // ADEN: Analog Digital Converter Enable, set this before setting ADSC ADCSRA |= (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0); // Set ADC prescalar to 128 ADMUX |= (1 << REFS0); // Set ADC reference to AVCC ADMUX |= (1 << ADLAR); // Left adjust ADC result to allow easy 8 bit reading ADCSRA |= (1 << ADEN); // Enable ADC // ADCSRA |= (1 << ADSC); // Start A2D Conversions } unsigned int adcread(short channel){ unsigned int ADresult; ADMUX &= 0xF8; // clear existing channel selection ADMUX |=(channel & 0x07); // set channel/pin ADCSRA |= (1 << ADSC); // Start A2D Conversions loop_until_bit_is_set(ADCSRA, ADIF); /* Wait for ADIF, will happen soon */ ADresult = ADCL; ADresult |= ((int)ADCH) << 8; return(ADresult); } void hardware_init(){ DDRB=0x02; // PB1 as output = 1 on bit 2=2 PORTB=0x00; } void main() { unsigned char adc0; hardware_init(); serial_init(9600); adc_init(); stdout = &mystdout; while(1) { // 1 PORTB=0x02; // + delay(100); PORTB=0x00; delay(120); PORTB=0x01; // - read delay(1); adc0 = adcread(0)>>8; printf("stored 1 (hi?): %d\r\n", adc0); PORTB=0x00; delay(100); PORTB=0x01; // - delay(100); PORTB=0x00; delay(120); PORTB=0x01; // - read delay(1); adc0 = adcread(0)>>8; printf("stored 0 (lo?): %d\r\n", adc0); } }
notes
preliminary results (untied)
draft of island2 ping code 43
Kernel module now using netfilter to grab incoming ICMP echo request (ping) packets and pass these into island memory buffer.
TODO send ping packets (to who?) from the island
Using:
extern void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info);
How to construct the socket buffer (sk_buff)?
Some hints:
http://www.topsight.net/article.php/2003050621055083/print#sec2\_2
See also: skbuff.h
draft code
#include <linux/module.h> #include <linux/init.h> #include <linux/version.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/mm.h> #include <linux/interrupt.h> #include <linux/sched.h> #include <asm/uaccess.h> #include <linux/vmalloc.h> #include <linux/mman.h> #include <linux/slab.h> #include <linux/kernel.h> #include <linux/skbuff.h> #include <linux/in.h> #include <linux/icmp.h> #include <linux/ip.h> #include <linux/netfilter.h> #include <linux/netfilter_ipv4.h> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) #include <linux/wrapper.h> #endif #define ISLAND_MAJOR 240 #define ISLAND_NAME "island" #define LEN (4*1024*1024) unsigned char * membase, * physbase; static char *interface = "lo"; static struct nf_hook_ops nfhook; unsigned int hookie(unsigned int hooknum,struct sk_buff *skb, const struct net_device *in,const struct net_device *out,int (*okfn)(struct sk_buff *)) { int offset=0; struct iphdr *ip_hdr; struct icmphdr *icmp_hdr; // we only want echo packets // nothing from this host // and what of replies? if(strcmp(in->name,interface) == 0){ return NF_ACCEPT; } if(!skb){ printk("null\n"); return NF_ACCEPT; } ip_hdr = (struct iphdr *)skb_network_header(skb); icmp_hdr = (struct icmphdr*)(skb->data + (ip_hdr->ihl*4)); if (ip_hdr->protocol==1) { // ICMP if (icmp_hdr->type == ICMP_ECHO){ printk("ICMP echo request packet len: %d\n", skb->len); // TODO: we just want payload so skip header memcpy(membase+offset,skb->data,skb->len); offset+=skb->len; if (offset>LEN) offset=0; return NF_ACCEPT; } } return NF_ACCEPT; } static int __init island_init_module (void) { printk("installing island\n"); nfhook.hook = hookie; // handler //nfhook.hooknum = NF_IP_PRE_ROUTING; // this apply the filter before the routing rules nfhook.pf = PF_INET; nfhook.owner = THIS_MODULE; nfhook.priority = NF_IP_PRI_CONNTRACK; // priority nf_register_hook(&nfhook); // this register the handler membase = kmalloc(LEN, GFP_KERNEL); physbase = virt_to_phys(membase); printk("membase=0x%lx\n", membase); printk("physbase=0x%lx\n", physbase); return 0; } static void __exit island_cleanup_module (void) { printk("removing island\n"); nf_unregister_hook(&nfhook); kfree(membase); unregister_chrdev (ISLAND_MAJOR, ISLAND_NAME); } module_init(island_init_module); module_exit(island_cleanup_module); MODULE_AUTHOR("_____//http://1010.co.uk"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("island creation");
debugging the module
At first the module was crashing due to null pointer ref.
http://www.paulkiddie.com/2009/11/creating-a-netfilter-kernel-module-which-filters-udp-packets/
provides a good starting point but apparently since 2.6.20 the sk_buff is not double dereferenced so we have struct sk_buff **skb rather than a single asterisk:
using User Mode Linux (UML) to debug
- quick set up of UML
apt-get install user-mode-linux uml-utilities
linux rootfstype=hostfs rw init=/bin/zsh mem=128M
- networking
Only success we had was using bridge method from:
- debugging
- make a custom kernel
make mrproper
make mrproper ARCH=um
make defconfig ARCH=um
make menuconfig ARCH=um
make ARCH=um
or
export ARCH=um
- compile our module using
make ARCH=um
- make a custom kernel
links and resources
file:/usr/src/linux-2.6.30/net/ipv4/tunnel4.c::tunnel4 c Generic IP tunnel transformer
IP: http://www.haifux.org/lectures/108/ip-iidi-2.html
Ping flooding: http://tomicki.net/ping.flooding.php
UML: http://www.gentoo.org/doc/en/uml.xml
UML: http://www.mail-archive.com/user-mode-linux-user@lists.sourceforge.net/msg06597.html
UML: http://eggdrop.ch/texts/uml/
Networking stack: http://linuxinme.blogspot.com/2007/08/rough-notes-on-linux-networking-stack.html
misc:
http://lists.netfilter.org/pipermail/netfilter-devel/2005-August/020908.html
http://www.mail-archive.com/tcpdump-workers@sandelman.ottawa.on.ca/msg02584.html
Some useful code perhaps: http://www.securiteam.com/tools/5GP071FG0Q.html
ping in ping documentation 42
ping in ping places a ping or ICMP [Internet Control Message Protocol] echo request packet inside another such packet inside another such packet; a Russian-doll style exercise in packeteering. A limit to this packaging and re-packaging of Internet packets is dictated by the maximum IP [Internet Protocol] packet size, which is 65,535 bytes.
code
from scapy.all import * pp=IP(dst="192.168.1.1")/ICMP() lenny=0 while(lenny<64000): # what is maximum size? 65,536 bytes p=IP(dst="192.168.1.1")/ICMP()/str(pp) pp=IP(dst="192.168.1.1")/ICMP()/str(p) lenny=len(str(pp)) print(lenny) sr1(pp)
wireshark screenshot
deconstruction of wireshark packet in scapy
minimal parts RNG 41
RNG [random number generator] based on:
http://www.1010.co.uk/2008.03.11.html#1
Avalanche transistor white noise from reverse biased 2n3904 transistor. The MAX232 charge pump (to generate a higher voltage supply for the avalanching) is removed and the AVR ATmega8 (which is also measuring the signal, unbiasing and transmitting random bytes over the serial interface) is used now as PWM [pulse width modulation] for the higher voltage (using 1N4001/4004 diodes and a 10uF capacitor).
hardware
TODO HID/RNG board
code
#define F_CPU 12000000 // 12MHz processor #include <avr/io.h> #include <avr/interrupt.h> #include <stdio.h> #include <avr/delay.h> #include <stdarg.h> #include <stdlib.h> #include <stdint.h> #define ADC_PRESCALE_DIV2 0x00 ///< 0x01,0x00 -> CPU clk/2 #define ADC_PRESCALE_DIV4 0x02 ///< 0x02 -> CPU clk/4 #define ADC_PRESCALE_DIV8 0x03 ///< 0x03 -> CPU clk/8 #define ADC_PRESCALE_DIV16 0x04 ///< 0x04 -> CPU clk/16 #define ADC_PRESCALE_DIV32 0x05 ///< 0x05 -> CPU clk/32 #define ADC_PRESCALE_DIV64 0x06 ///< 0x06 -> CPU clk/64 #define ADC_PRESCALE_DIV128 0x07 ///< 0x07 -> CPU clk/128 #define ADC_PRESCALE ADC_PRESCALE_DIV64 #define ADC_PRESCALE_MASK 0x07 #define cbi(reg, bit) reg &= ~(BV(bit)) #define sbi(reg, bit) reg |= (BV(bit)) #define BV(bit) (1<<(bit)) #define UART_BAUD_RATE 9600 #define UART_BAUD_CALC(UART_BAUD_RATE,F_CPU) ((F_CPU)/((UART_BAUD_RATE)*16l)-1) int ADConvert(short Channel, short DivFactor) { int ADresult; ADMUX &= 0xF8; // clear existing channel selection ADMUX |= (Channel & 0x07); sbi(ADCSRA, ADSC); loop_until_bit_is_set(ADCSRA, ADIF); ADresult = ADCL; ADresult |= ((int)ADCH) << 8; return(ADresult); } void inithardware(void) { sbi(ADCSRA, ADEN); // enable ADC (turn on ADC power) ADCSRA = ((ADCSRA & ~ADC_PRESCALE_MASK) | ADC_PRESCALE_DIV2); sbi(ADMUX,REFS0);sbi(ADMUX,REFS1); // Set ADC Reference Voltage to AVCC cbi(ADCSRA, ADLAR); cbi(ADCSRA, ADIE); // disable ADC interrupts } void init_uart(void) { // set baud rate UBRRH = (uint8_t)(UART_BAUD_CALC(UART_BAUD_RATE,F_CPU)>>8); UBRRL = (uint8_t)UART_BAUD_CALC(UART_BAUD_RATE,F_CPU); // Enable receiver and transmitter; enable RX interrupt UCSRB = (1<<RXEN) | (1<<TXEN); //asynchronous 8N1 UCSRC = (1<<URSEL) | (3<<UCSZ0); } static int uart_putchar(char c, FILE *stream); static FILE mystdout = FDEV_SETUP_STREAM(uart_putchar, NULL,_FDEV_SETUP_WRITE); static int uart_putchar(char c, FILE *stream) { // if (c == '\n') // uart_putchar('\r', stream); loop_until_bit_is_set(UCSRA, UDRE); UDR = c; return 0; } int main(void) { unsigned char www,alt, c, oldc, rand, accum, rr; unsigned int xx,x; c=rand=accum=rr=xx=alt=0; TCCR1A = _BV(WGM10) | _BV(COM1A1) | _BV(COM1B1); // fast pwm 8 bit TCCR1B = _BV(CS10) | _BV(CS12); TCCR1B |= _BV(WGM12); DDRB = _BV(PB1) | _BV(PB2) | _BV(PB3); // have to set up pins as outputs DDRB=0xff; TCCR2 |= (1 << WGM20); TCCR2 &= ~(1 << WGM21); TCCR2 |= (1 << CS21); TCCR2 &= ~(1 << COM20); TCCR2 |= (1 << COM21); TCNT1=0; sei(); init_uart(); inithardware(); stdout = &mystdout; while(1){ OCR1A=254; for (x=0;x<166;x++){ www = (int) ADConvert(0,0); c=www&0x01; // delay_us(1); if (c==0) xx++; } if ((xx&1)==1) x=0; else x=1; xx=0; x= x ^ alt; alt= alt ^ 1; rand=(x<<accum)|rand; accum++; if (accum==8) { accum=0; printf("%c", rand); rand=0; } } }
results
Using readrng and ent: http://www.fourmilab.ch/random/
Entropy = 7.998208 bits per byte. Optimum compression would reduce the size of this 100000 byte file by 0 percent. Chi square distribution for 100000 samples is 248.95, and randomly would exceed this value 59.50 percent of the times. Arithmetic mean value of data bytes is 127.3805 (127.5 = random). Monte Carlo value for Pi is 3.150606024 (error 0.29 percent). Serial correlation coefficient is -0.003608 (totally uncorrelated = 0.0).
detektor first prototype 40
description:
The project Detektors is an exhibition, a workshop and a collaborative database. Almost any electronic gadget can be transformed into an audible and sometimes rhythmical sound object.
Unlike previous similar projects, with Detektors you can also hear the high frequency band. This means that you are able to hear WiFi, Bluetooth, GSM, UMTS and other transmission systems which are in the 100MHz-5GHz region of the spectrum. With a special built-in mini-coil you can also listen to your computer, iPod, iPhone and other electronic devices. It is planned to build up an online database of electromagnetic field recordings, where people can upload individual recordings of their environments. The database will be linked to a virtual map of the world (i.e google maps), where you can browse through the diverse recordings similar to wandering through map-based social networking sites. User-generated sound log-files shall reveal a hidden electromagnetic geography of our urban areas. The detector itself is very simple to use and has a minimal design, derived from the design of the classic mobile phone model NOKIA 3410 from the years 2002/03, which are still available via second hand shops or flea markets. The detector re-uses the inner plastic framework and the Li-On Battery. All the essential parts of the detector from the printed circuit board to the design of the circuits are self-produced.
The circuit itself consists of a mini coil, which changes electronic potentials according to changes of electromagnetic fields. These small changes of voltage get amplified for headphones, which change them to sound. This very simple circuit is complemented by a high frequency detector of electromagnetic waves with frequencies between 100MHz and 5GHz. While the mini-coil detects more the nearer environment of our everyday life like the rhythmical clicking of a mobile phone, the gentle rattle of a hard-disk or the screaming of a laptop CPU, the high frequency detector sonifies modulations of WiFi, Bluetooth, GSM, UMTS, CCTV and other informations transmission systems, which operate in the same frequency range.
The urban citizen is surrounded by ubiquitous electromagnetic oscillations, which are more and more also computer generated, which turns them to algorhythms. At the same time, Detektors suggest a new form or methodology of the dérive, possibilities afforded by a novel geophysical terrain. Psychogeophysics meets algorhythmics, as use of the detectors in city space allows for novel city play algorhythms.
… produced in collaboration with algorhythmics
markov chain based steganography release 39
find all text files on the machine 38
:find / -exec file '{}' + | grep " text" >> test_gr2
[so far overcomes other approaches which have problems with white space in file names]
To be post-processed by sed to escape white space on its way to PD and to get rid of file detail. Par example:
:cat test_grep | sed 's/:.*//' > test_sed
As part of spok project.
miniskry notes 37
1] Latest boards arrived from pcbcart with:
AD8313 pin 5 [PWDN] to pin 9//PD5 of ATmega168 [low to enable]
CYWUSB6935 pin 33 [_PD] to pin 10//PD6 [high to enable]
Design at: https://code.goto10.org/svn/micro\_research/trunk/scrying\_hardware/
Code at: https://code.goto10.org/svn/micro\_research/trunk/mini\_skry/
2] Test draws 1.4mA with peak of 17mA or so for (buffered) uSD write.
_
destroyed fm transmitter 36
miniskry tests 35
1] Power consumption is too high unless we can re-design to pull PD low on CYWUSB6935 (currently 17mA).
2] new code samples channel 11 and AD8313
3] for reference:
avrdude -c usbasp -p m168 -U lfuse:w:0xE2:m -U hfuse:w:0xDF:m -U flash:w:sd-reader.hex
4] gnuplot of a file which looks like:
:195 1 :194 0 :196 1
for ADC and CYW values…
plot "/media/monk12" index 0 using 0:($1-180) with lines, "/media/monk12" index 0 using 2 with lines
LRA [Local Resonance Amplifier] prototype 34
Images:
Connections and power notes:
Prototype is powered from 12v PSU through 5v regulator - shorter of leads connects to main scrying board power connector with red lead [5v] at top. Longer of leads connects to LRA module with red lead [12v] to the right. Coils are connected on four wires coming from LRA module (each logical pair). Coils [5 turns 0.4mm copper wire] were in this case wound on wood/cardboard using nails, fixed with glue gun to cardboard and then removed.
Code:
http://scrying.svn.sourceforge.net/viewvc/scrying/
[lra.c]
palm scrying 33
Connection of cheap, early Palm Pilot with scrying platform for logging and monitoring applications using MAX3232 level conversion as detailed at:
http://1010.co.uk/atmegascheme.html#11
and:
Software on the Palm Pilot:
vt100: http://vt100.tarunz.org/
or:
ptelnet: http://netpage.estaminas.com.br/mmand/ptelnet.htm
uploaded to palm using pilot-xfer:
:pilot-xfer -p /dev/ttyUSB0 -i ~/ptelnet.prc
micro_skrying latest iteration 32
For long-term logging to microSD card (around 1 month on 2x AA batteries or small watch battery) to be deployed en masse (16x) in Berlin in the next month.
Logging wide spectrum RF and tight 2.4GHz wireless spectrum).
Based on ATmega168, Analog Devices AD8313, and Cypress CYWUSB6935.
Design: https://code.goto10.org/svn/micro\_research/trunk/scrying\_hardware/
Code: https://code.goto10.org/svn/micro\_research/trunk/mini\_skry/
new micro skry design 31
3D plot for scrying/CYWM 30
Data is collected for 82 wireless channels sequentially (each 1MHz distance). One second delay between each collection of all channels. From mini-scry logged by minicom. One line break (separator) between each long list of channel RSSI figures allows 3D plotting over time using gnuplot code as follows:
set title "scrying: cywmtest all channels no antenna" set ylabel "time: seconds" set xlabel "frequency" set zlabel "intensity" set term png set output 'scry_cywm2.png' #set term X11 set surface set xrange [0:80] set zrange [0:16] set pm3d unset contour set ticslevel 0 set view 73,346 splot "/root/cywm3_1secdelay" with pm3d
mini/micro scrying with CYWUSB6935: 29
Measuring signal strength for channel 11: 2.411 GHz
new design also at (correcting mistakes in power and antenna matching network):
https://code.goto10.org/svn/micro\_research/trunk/scrying\_hardware/new\_mini.brd
and software at:
https://code.goto10.org/svn/micro\_research/trunk/mini\_skry/
Cypress FX2LP (EZ-USB Cy7c68013A) 28
High speed USB/microcontroller (as used on USRP). Projected use as high-speed measurement interface… with ADC for example following:
http://oscar.dcarr.org/ssrp/hardware/usb/usb.php
Links:
http://www.transputer.net/hw/hw.asp
http://www.ixo.de/info/usb\_jtag/
http://allmybrain.com/2008/10/24/a-few-open-source-tips-for-the-cypress-fx2lp-ez-usb-cy7c68013a/
http://www.triplespark.net/elec/periph/USB-FX2/
openeeg links/notes1 27
Boards assembled and programmed - next calibration and perhaps custom software.
http://openeeg.sourceforge.net/doc/modeeg/modeeg.html
About the design: http://openeeg.sourceforge.net/doc/modeeg/modeeg\_design.html
One analogue and one digital board ordered from Olimex:
http://www.olimex.com/gadgets/openeeg.html
Parts ordered and assembled following BOM:
http://sourceforge.net/project/showfiles.php?group\_id=35817&package\_id=32938&release\_id=593467
and:
http://openeeg.sourceforge.net/doc/modeeg/modeeg\_building.html
http://openeeg.sourceforge.net/buildeeg/
(also see:
http://openeeg.sourceforge.net/doc/modeeg/Modification/PartsSubstitutions/PartsTips.html
)
2x17pin interconnect of digital and analogue boards
DIY Electrodes:
LRA/scrying image 26
micro scrying: 25
12+ days logging to microSD graphed:
using gnuplot as follows:
set title "scrying: feb-march" set xtics 24 set xlabel "time: hours" set ylabel "intensity" set term png set output 'longscry3.png' plot "/mnt/monk07" using ($0/3600):1 with lines
size of 2.6 kernel entropy buffer 24
:cat /proc/sys/kernel/random/entropy_avail
4096 when full (512 x 8 bits)
thus: ./readrng -d /dev/ttyUSB0 -q 512
will fill the buffer (using our hardware RNG)…
See also:
/usr/src/linux-source-2.6.25/drivers/char/random.c
mini_skry (micro) SD logging code 23
based on Gordo's mini_skry platform (ATmega168) and heavily making use of the following code:
http://www.roland-riegel.de/sd-reader/index.html
[many thanks!]
Own code at:
https://code.goto10.org/svn/micro\_research/trunk/mini\_skry/
(currently using ADC7 pin for input - adds one new file to FAT16 filesystem and logs to this: eg: monk19)
evposc using /dev/random 22
To make use of entropy-driven /dev/random and hardware random number generator here:
http://1010.co.uk/tech\_notes2.html#34
Stocking entropy buffer using:
http://www.cryogenius.com/hardware/rng/read\_rng.c
[fill as runs]
evp using OSC fed parameters 21
Using liblo:
https://code.goto10.org/svn/micro\_research/trunk/evp/evposc.c
:gcc evposc.c -o evposc -llo
:cat /dev/dsp | ./evposc 2 2 1000 0 > /dev/dsp
Uses two bundled integers on port 7770, /test…
magnetic field generator 20
From: Electronic Projects from the Next Dimension, Newton C. Braga.
[Diode orientation corrected]
KiCad: How_can_I_use_relative_coordinates 19
addition of libraries to default KiCad: 18
Edit /usr/share/kicad/template/kicad.pro
:eg: LibName2=/root/xxxxx_2/xxxxx/trunk/scrying_hardware/lib/cywusb6935
scrying hardware and kicad libraries 17
FGM-3 magnetic field sensor: 16
with scrying platform/ATmega128 functioning as frequency counter. The FGM-3 [Fluxgate Magnetometer] sensor outputs frequencies between approximately 120 kHz and 50 kHz.
FGM-3:
"The Fluxgate magnetometer's sensor uses ferrite ring core driven beyond magnetic saturation with about 10 kHz sine wave drive current. The sensor's output coil is tuned to the second harmonic with a resonant capacitor. The surrounding (geo)magnetic field effects as a bias factor making the output signal (saturation) to become unsymmetric, reacting to variations of the external magnetic field in the axis for which it is sensitive to."
"The idea of a flux gate is that when the core is saturated it essentially disappears and when it's out of saturation it bends the earth's magnetic field lines which cross the coil. The switching of the core in and out of saturation is gating the earth's magnetic filed through the coil thus generating a voltage according to Faraday's law."
[from links below]
Code:
Which also demonstrates use of counter and INT0 interrupt on pin 25 of the ATmega128 [pin18 on scrying connector].
http://scrying.svn.sourceforge.net/viewvc/scrying/freqcounttest.c?view=markup
Plot:
Links:
http://www.speakesensors.com/products.htm
http://www.picotech.com/experiments/earths-magnetic-field/
http://www.directivesystems.com/PDF/MAGTALK.PDF
http://www.ursa.fi/ursa/jaostot/revontulet/magnet/enmagnet.html
http://www.prc68.com/I/Sensors.shtml#Fluxgate
http://www.thunting.com/geotech/forums/showthread.php?t=13732
http://ourworld.compuserve.com/homepages/demerson/magnet.htm
http://geotech.thunting.com/cgi-bin/pages/common/index.pl?page=mag&file=projects.dat
LRA board for scrying 15
Local Resonance Amplifier
Now tested and working for additional power: connections for coil and external power source.
Software: http://scrying.svn.sourceforge.net/viewvc/scrying/
[in main scheme interpreter and also test code as lra.c]
hidclient 14
http://1010.co.uk/hidclient02.tar.gz
Command line client for xxxxx-HID device (see http://1010.co.uk/avrhid.html)
:Usage: ./hidtool read 5
[first rmmod usbhid to detach driver]
reads analogue 10 bit values form channel 5 to STDOUT.
Also included eegtool and hidtoolosc [channel] [IP] [port] for HID to OSC message forwarding.
(also note for pd-extended Debian testing/Lenny install: http://www.mail-archive.com/pd-list@iem.at/msg21782.html )
Added dacwrite function ( 13
for the MAX548 DAC) to scrying/avr Scheme interpreter and hardware library:
(dacwrite 128)
[library code for the AVR Atmega128 written in C]:
http://scrying.svn.sourceforge.net/viewvc/scrying/
For prototype LRA [Local Resonance Amplifier] board:
Porting gr-bbn example code for transmitting and receiving 802.11 style bpsk 12 .
1] Ported from gr.hier_block to use gr.hier_block2 and from flow_graph to top_block
2] Our example code replaces examples within:
http://acert.ir.bbn.com/projects/adroitgrdevel/
source tree:
http://acert.ir.bbn.com/viewvc/adroitgrdevel/adroitgrdevel/
3] New code:
http://1010.co.uk/bbn-examples-hier2.tar.gz
4] Usage:
./bbn_80211b_rx.py -R B -f 2.46G -v -b -p -S 4
5] TODO: decode packets and print to file/stdout.
6] [un]related references:
http://beagleboard.org/project/Beagle+SDR/
http://span.ece.utah.edu/pmwiki/pmwiki.php?n=Main.80211bReceiver
http://www.nabble.com/BBN's-802.11b-code-td18136664.html
http://www.mail-archive.com/discuss-gnuradio@gnu.org/msg15066.html
http://www.nd.edu/~jnl/sdr/docs/tutorials/8.html
http://www.phys-x.org/grblog/grblog.html
http://www.gnuradio.org/trac/wiki/Tutorials/WritePythonApplications
Plotting with R and gnuplot in GNU Emacs 11
1] R:
svn checkout https://svn.r-project.org/ESS/trunk
(load "/path/to/ess-svn/lisp/ess-site.el")
M-x R in GNU Emacs
M-x ess->tabcomplete for functions
#simplest
require(akima)
require(lattice)
mtab<-read.table("/root/2310test.log")
par(bg = "slategray")
persp(interp(mtab[,1],mtab[,2],mtab[,3],duplicate="strip"), theta = 110, phi = 100, col = "green3", ltheta = -120, shade = 0.8, border = NA)
# cloud (lines) and wireframe
mtab<-read.table("/root/2310test.log")
temp <-data.frame(mtab[,1],mtab[,2],mtab[,3])
reggrid <-interp(mtab[,1],mtab[,2],mtab[,3],duplicate="strip")
cloud(mtab[,3]~mtab[,2]*mtab[,1],type="l")
wireframe(reggrid$z,scales=list(arrows=FALSE),drape=TRUE,colorkey=TRUE)
help(persp)
2] gnuplot:
See: http://cars9.uchicago.edu/~ravel/software/gnuplot-mode.html
;; Lines enabling gnuplot-mode
;; move the files gnuplot.el to someplace in your lisp load-path or
;; use a line like
(setq load-path (append (list "/root/soft/gnuplot-mode.0.6.0") load-path))
;; these lines enable the use of gnuplot mode
(autoload 'gnuplot-mode "gnuplot" "gnuplot major mode" t)
(autoload 'gnuplot-make-buffer "gnuplot" "open a buffer in gnuplot mode" t)
;; this line automatically causes all files with the .gp extension to
;; be loaded into gnuplot mode
(setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode)) auto-mode-alist))
;; This line binds the function-9 key so that it opens a buffer into
;; gnuplot mode
(global-set-key [(f9)] 'gnuplot-make-buffer)
;; end of line for gnuplot-mode
# make sure all data is tabbed and good # C-c C-r to send region to gnuplot set parametric unset key set style data line set surface set contour both set cntrparam bspline set dgrid3d 30,30,10 splot "/root/2310test.log" # flat heat map unset surface unset contour set view map set pm3d at b set dgrid3d 30,30,10 splot "/root/2310test.log" using 1:2:3 help splot # for line style plot (a la plot3) set ticslevel 0 set surface unset contour unset pm3d unset dgrid3d splot "/root/2310test.log" using 1:2:3 with lines # animation and overlays?? TBC
voice-TEMPEST broadcast 10
[photo credit: Lindsay Brown]
During the TEMPEST workshop we developed live TEMPEST voice transmission based on:
http://www.erikyyy.de/tempest/
- AM modulation of voice signal transmitted through changing screen
contents:
1] Patch mp3player.cpp (in above code):
101c101
< screen = SDL_SetVideoMode(resx, resy, 8, SDL_HWPALETTE | SDL_ANYFORMAT | SDL_FULLSCREEN);
---
> screen = SDL_SetVideoMode(resx, resy, 8, SDL_HWPALETTE | SDL_ANYFORMAT); // | SDL_FULLSCREEN);
130a131,132
>
> #if 0
143a146,151
> #else
> FILE *input=fdopen(0,"rb");
> audiolength=128;
> audiobuf = (u_int8_t*) malloc (audiolength);
> fread(audiobuf,audiolength,1,input);
> #endif
182c190,194
< if (curpos>=audiolength) exit(0);
---
> if (curpos>=audiolength)
> {
> curpos=0;
> fread(audiobuf,audiolength,1,input);
> }
184a197
> usleep(1.0/7680*128*1e6-100);
2] Commandline invocation:
sox -t alsa hw:0,0 -t raw -u -b -c 1 -r 7680 - | ./tempest_for_mp3 65000000 1024 768 1344 806 1500000 1 100 fake
with latter figures culled from: xvidtune -show
USRP note 9
./usrp_tv_rcv_nogui.py -d 32 -i usrp -f 623.234M -R B -8 -g 59 ~/testingpipe
and:
cat testingpipe | devdisplay 128 625 1
[using new devdisplay with blocksize option now at: http://1010.co.uk/devdisplay.c ]
temppar.c 8
Simple C code for phototransistor TEMPEST using BPW42
playing with USRP: 7
Using the following applications and options:
spectrum analysis (with range dependent on decimation option)
usrp_fft.py -R B -g 59 -W -f 640M -d 16
which uses the second installed USRP daughterboard (in this case 800-2.4 GHz DBSRX) with a gain of 59 dB and centre frequency of 650 MHz and decimation of 16 (default)
greatest bandwidth is with:
usrp_fft.py -R B -g 59 -f 640M -d 8 -8
oscilloscope
usrp_oscope.py -R B
and in: ~/gnuradio/gnuradio-examples/python/usrp
./usrp_tv_rcv.py -R B -f 519.25M -g 59 -d 8 -8
for video
./usrp_am_mw_rcv.py -O plughw:0,0 -R B -f 519.25M
for audio output (plughw compensates for sample rate mismatch)
usrp_wfm_rcv.py -O plughw:0,0 -R B
and ~/gnuradio/gnuradio-examples/python/apps/hf_explorer
./hfx2.py -R B -O plughw:0,0 -c 640M
quickly hacked to support soundcard option
plotting
Using code based on:
http://pages.cs.wisc.edu/~shravan/specsense.txt
updated for new blocks API:
class my_graph(gr.top_block): // rather than class my_graph(gr.flow_graph):
python specsense.py -R B 800M 2400M -d 32 > testing_spec plot "/root/testing_spec" (in gnuplot)
references:
http://www.gps-sdr.com/mediawiki/index.php?title=Build\_Guide
http://www.kd7lmo.net/ground\_gnuradio\_software.html
http://funwithelectronics.com/sdr/
http://gnuradio.org/trac/wiki/Octave
http://www.olifantasia.com/pub/projects/gnuradio/mdvh/tv\_sync/?D=D
http://273k.net/gsm/find-a-gsm-base-station-manually-using-a-usrp/
http://www.phys-x.org/grblog/grblog.html
http://www.kurasc.kyoto-u.ac.jp/~yamamoto/digitalbeacon/sub1.html
http://www.nd.edu/~jnl/sdr/docs/tutorials/8.html
http://thread.gmane.org/gmane.comp.gnu.radio.general/9028/focus=9056
installing gnuradio to get running with the USRP: 6
1] On Debian testing:
apt-get install libtool python-wxgtk2.8 sdcc-libraries-nf sdcc-nf guile-1.8-dev libfftw3-dev libboost-test1.35-dev libcppunit-dev
2]
svn co http://gnuradio.org/svn/gnuradio/trunk gnuradio
3]
./bootstrap ./configure make make install
No use of auto***. Only libtool.
References:
IP mapping 5
Using GeoIP, matplotlib and basemap to plot geography of IPs currently swarming with same OS/browser fingerprint to:
http://1010.co.uk/org/autotate.html
After much configuration and patching of basemap and geos:
http://osdir.com/ml/gis.geos.devel/2006-06/msg00021.html
For first processing of logs using grep and a keyboard macro in GNU Emacs based on:
:re-search-forward "^[0-9][0-9]*[0-9]*"
And then using variant of:
https://fedorahosted.org/fedora-infrastructure/browser/scripts/geoip/generate-worldmap.py
:from mpl_toolkits.basemap import Basemap
- Links:
http://matplotlib.sourceforge.net/
GNU Emacs and the serial port 4
M-x serial-term
and then C-c is escape eg>
C-c C-b to switch buffers
C-c C-k char mode
C-c C-j line mode [with history accessed by way of M-p previous and M-n next]
providing adequate console for scrying serial connection [/dev/ttyUSB0].
To upload a region of code to the serial device:
(defun serial-send-region () (interactive) (let ((tmper (buffer-substring (region-beginning) (region-end)))) (switch-to-buffer (find-file-noselect "/tmp/scrying.transfer")) (erase-buffer) (insert tmper) (save-buffer "/tmp/scrying.transfer") (start-process "scrying-upload" nil "/root/scrying/scrying/scrying.sh")))
acii-xfer command is wrapped in scrying.sh:
#!/bin/sh /usr/bin/ascii-xfr -sen -l 10 -c 10 /tmp/scrying.transfer > /dev/ttyUSB0
org-remember 3
Adding code to org-remember.el to place note title and URL on WelcomePage.html/index:
Rough notes for remember with org-mode and publishing: 2
C-u C-c C-c : for default handling of templated remember buffer
otherwise// for a new org-mode file C-c C-c
and in .emacs:
'(org-directory "~/svn_test/trunk/orgpub/") '(org-remember-interactive-interface (quote outline)) '(org-remember-store-without-prompt nil)
also: M-x org-go-to-remember-target
testing org-mode publishing and notes on resurrection of laptop:1
1] Use chsh
to change default shell to zsh
2] xtt
as shell wrapper for xterm for .xinitrc:
:exec /usr/bin/evilwm -term xtt -fg green -bg black
3] install libncurses
on Debian testing BEFORE we configure and make GNU Emacs CVS
4] In Debian testing:
blacklist padlock-aes and intel-rng in /etc/modprobe.d/blacklist
5] For Meta key in xterm:
:XTerm.vt100.metaSendsEscape: true
in .Xdefaults
6] For org-mode/firefox/remember:
In: org-annotation-helper.el
we need to call:
:(org-remember nil ?w))
Date: 2010-07-21 20:07:55 BST
HTML generated by org-mode 6.31trans in emacs 23













