Kismet

From Stu2
Jump to navigation Jump to search

Using Kismet on a PC Engines WRAP board

I installed voyage-0.5.0 from scratch on a PC Engines WRAP board. Then I installed:

apt-get update
apt-get install dialog apt-utils 
apt-get install kismet
apt-get install nano
apt-get install telnet

Edit /etc/kismet.conf file and change the source line (assuming midfi driver and atheros based):

source=madwifi_g,wifi0,wifi0
...
allowedhosts=127.0.0.1,192.168.1.0/24
#bindaddress=127.0.0.1 -> comment out to bind to all addresses

Create /etc/hosts and add:

127.0.0.1  localhost

Start kismet: kismet

Kismet-SN

Set of perl scripts to plot Signal Strength from a remote Kismet sensor.


Connect the Rotor Over a Nework

This bit of magic allowed me to control a rotor from Ham Radio Deluxe over the local area network. I connected a PC WRAP board to my G6LVB rotor controller. Then, using HRD, I configured WispDDE to use a local serial port that was mapped to the remote serial port. Here are my notes.

Get the serial port back from getty. Edit /etc/inittab and comment out the line which makes /dev/ttyS0 a console port.

  • com2tcp - links a COM port to a TCP port (Note this comes from the com0com project page. It is not the com2tcp batch file, nor is the com2tcp program advertised for telescopes.
  • N8VB COM Driver - connects virtual COM Ports together (I use com0com now, but it amounts to the same thing.)
  • socat - link any tcp port to serial port (Linux)

After patching together COM3 with COM25 using N8VB's Virtual COM Driver, set up socat on the linux box:

socat tcp-l:2525,reuseaddr,fork /dev/ttyS0,raw,b9600,echo=0,ocrnl=1

On the Windows box, link COM25 to the remote socat session:

com2tcp --baud 9600 --ignore-dsr \\.\COM25 192.168.10.56 2525

You should see messages about InOutM> START, DSR is OFF, etc. on the windows box. Now, COM3 on the Windows computer can be used to send/receive commands from the remote serial port (/dev/ttyS0.)

More socat

I used this set options to connect a serial port on a windows computer to pseudo terminal on a linux computer. The idea is that /dev/tty1 will connect to /dev/pts/1 on the linux computer.

socat pty,link=/dev/tty1,nonblock,raw,echo=0,ocrnl=1 tcp-l:2525,reuseaddr,fork 

On the Windows box, link COM25 to the remote socat session:

com2tcp --baud 9600 --ignore-dsr \\.\COM25 192.168.10.56 2525

Getting GPS Data over the Network

Link the GPS data over the network so we have something like this:

GPS -> /dev/ttyS0 -> gpspipe -> WRAP -> network -> Laptop socket -> vmware (COM2)

On the Laptop, set up a serial port, using a named pipe, e.g. /tmp/serialPipe. This end is the server the other end is the client. When you connect the serial port, it should create the file /tmp/serialPipe.

srwxr-xr-x 1 stu     stu        0 2008-05-04 20:44 serialPipe

Then start socat on the laptop like this:

[email protected]:/tmp$ socat unix-connect:/tmp/serialPipe tcp4-listen:2525,reuseaddr,fork

We now have a socket, /tmp/serialPipe listening on port 2525 of the laptop. On the WRAP, connect gpsd via gpspipe and a tcp connection like this:

tick:/var/lib/ntp# socat exec:'gpspipe -r' tcp4:192.168.102.153:2525

Now, back under vmware, make sure serial 2 is connected (e.g. with vmware tools within windows VM machine.) And use U-Center, COM2, 9600 baud, n, 8, 1 to display the satellite data. This is only one way because 'gpspipe' is one way. I suppose you could forward /dev/ttyS0, but I'm using gpsd to feed ntpd. Very cool!