Blog

War Driving on the Wifi Pineapple: Post One!

Wardriving With The Wifi Pineapple mark V

You can skip this part if you like

If it wasn’t clear to anyone that I make things up as I go, I pretty much don’t know what I’m doing. But I do it anyway because it means that

  1. I learn something new
  2. I’m never bored because I’m always
  3. Challenging myself.

Background

This morning I was looking at gps units because I’m trying to get my Wifi Pineapple to do stuff. In my last post, I mentioned my intent to return the gps unit because I thought it was defective. Thing is, its not defective, per-say. I just don’t know what I’m doing. I think. I’ve seen posts about running the same GPS stick under linux with no issues on the amazon website as well as this post for hooking everything up to the rasberry pi. It seems to be linux compatible for all that I can see.

This trouble occurs after I’ve plugged the gps chip into my computer and gotten everything working from there. I’ll have to write a separate blog post about how to actually get the thing to run.

The problem is that gpsd is being temperamental, which seems to be par for the course. GPSD isn’t outputting any debug information when I use it. Apparently. Because there’s no output when everything is working or debug information to say what is not working. So, I don’t know for sure that gpsd is or is not working.

The solution of course is to use something other then gpsd. Kismet_server does provide a way to directly access a GPS device though. So let’s use that. The problem with that is it also doesn’t seem to output any errors. Which may mean everything is working perfectly. Or not. At least with kismet_server managing the GPS tracking you don’t get an error saying GPSD has been unresponsive for the last 15 minutes and kismet_server needs to reconnect.

Hardware

The core is the wifi pineapple from hak5. Next up is some parts from sparkfun: a usb power cable and a lion battery pack. Alternately I have a usb charger for the cigarette letter that provides much longer lasting power. Then I have a leftover 2gb microSD card that I usually leave in the pineapple. The final part is the gps dongle.

Software

Software side, its still pretty easy. To get kismet_server on the pineapple you’ll need it connected to the wifi somehow. Then you’ll run:
opkg update
opkg install kismet_server

I wouldn’t bother with installing gpsd. It doesn’t seem to work, and its one more layer to go wrong.

You could use kismet_drone but then you have to connect it to a kismet_server. It might be nice if you had an army of drones that you wanted to connect back to a single server so that multiple people could connect to it, but I can’t see any purpose to it in my application.

Conf Files

Here’s my kismet.conf for kismet server.

			#http://soliloquyforthefallen.net/blog/2014/04/12/wardriving-with-the-wifi-pineapple-mark-v
			# Kismet config file
			# Most of the "static" configs have been moved to here -- the command line
			# config was getting way too crowded and cryptic.  We want functionality,
			# not continually reading --help!

			# Version of Kismet config
			version=2009-newcore

			# Name of server (Purely for organizational purposes)
			servername=Kismet_2009

			# Prefix of where we log (as used in the logtemplate later)
			logprefix=/mnt/test/kismet/logs

			# Do we process the contents of data frames?  If this is enabled, data
			# frames will be truncated to the headers only immediately after frame type
			# detection.  This will disable IP detection, etc, however it is likely
			# safer (and definitely more polite) if monitoring networks you do not own.
			# hidedata=true

			# Do we allow plugins to be used?  This will load plugins from the system
			# and user plugin directiories when set to true (See the README for the default
			# plugin locations).
			allowplugins=true

			# See the README for full information on the new source format
			# ncsource=interface:options
			# for example:
			ncsource=wlan1
			# ncsource=wifi0:type=madwifi
			# ncsource=wlan0:name=intel,hop=false,channel=11

			# Comma-separated list of sources to enable.  This is only needed if you defined
			# multiple sources and only want to enable some of them.  By default, all defined
			# sources are enabled.
			# For example, if sources with name=prismsource and name=ciscosource are defined,
			# and you only want to enable those two:
			# enablesources=prismsource,ciscosource

			# Control which channels we like to spend more time on.  By default, the list
			# of channels is pulled from the driver automatically.  By setting preferred channels,
			# if they are present in the channel list, they'll be set with a timing delay so that
			# more time is spent on them.  Since 1, 6, 11 are the common default channels, it makes
			# sense to spend more time monitoring them.
			# For finer control, see further down in the config for the channellist= directives.
			preferredchannels=1,6,11

			# How many channels per second do we hop?  (1-10)
			channelvelocity=3

			# By setting the dwell time for channel hopping we override the channelvelocity
			# setting above and dwell on each channel for the given number of seconds.
			#channeldwell=10

			# Channels are defined as:
			# channellist=name:ch1,ch2,ch3
			# or
			# channellist=name:range-start-end-width-offset,ch,range,ch,...
			#
			# Channels may be a numeric channel or a frequency
			#
			# Channels may specify an additional wait period.  For common default channels,
			# an additional wait period can be useful.  Wait periods delay for that number
			# of times per second - so a configuration hopping 10 times per second with a
			# channel of 6:3 would delay 3/10ths of a second on channel 6.
			#
			# Channel lists may have up to 256 channels and ranges (combined).  For power
			# users scanning more than 256 channels with a single card, ranges must be used.
			#
			# Ranges are meant for "power users" who wish to define a very large number of
			# channels.  A range may specify channels or frequencies, and will automatically
			# sort themselves to cover channels in a non-overlapping fashion.  An example
			# range for the normal 802.11b/g spectrum would be:
			#
			# range-1-11-3-1
			#
			# which indicates starting at 1, ending at 11, a channel width of 3 channels,
			# incrementing by one.  A frequency based definition would be:
			#
			# range-2412-2462-22-5
			#
			# since 11g channels are 22 mhz wide and 5 mhz apart.
			#
			# Ranges have the flaw that they cannot be shared between sources in a non-overlapping
			# way, so multiple sources using the same range may hop in lockstep with each other
			# and duplicate the coverage.
			#
			# channellist=demo:1:3,6:3,11:3,range-5000-6000-20-10

			# Default channel lists
			# These channel lists MUST BE PRESENT for Kismet to work properly.  While it is
			# possible to change these, it is not recommended.  These are used when the supported
			# channel list can not be found for the source; to force using these instead of
			# the detected supported channels, override with channellist= in the source defintion
			#
			# IN GENERAL, if you think you want to modify these, what you REALLY want to do is
			# copy them and use channellist= in the packet source.
			channellist=IEEE80211b:1:3,6:3,11:3,2,7,3,8,4,9,5,10
			channellist=IEEE80211a:36,40,44,48,52,56,60,64,149,153,157,161,165
			channellist=IEEE80211ab:1:3,6:3,11:3,2,7,3,8,4,9,5,10,36,40,44,48,52,56,60,64,149,153,157,161,165

			# Client/server listen config
			listen=tcp://0.0.0.0:2501
			# People allowed to connect, comma seperated IP addresses or network/mask
			# blocks.  Netmasks can be expressed as dotted quad (/255.255.255.0) or as
			# numbers (/24)
			allowedhosts=172.16.42.0/24

			# Maximum number of concurrent GUI's
			maxclients=5
			# Maximum backlog before we start throwing out or killing clients.  The
			# bigger this number, the more memory and the more power it will use.
			maxbacklog=5000

			# Server + Drone config options.  To have a Kismet server export live packets
			# as if it were a drone, uncomment these.
			# dronelisten=tcp://127.0.0.1:3501
			# droneallowedhosts=127.0.0.1
			# dronemaxclients=5
			# droneringlen=65535

			# OUI file, expected format 00:11:22manufname
			# IEEE OUI file used to look up manufacturer info.  We default to the
			# wireshark one since most people have that.
			ouifile=/etc/manuf
			ouifile=/usr/share/wireshark/wireshark/manuf
			ouifile=/usr/share/wireshark/manuf

			# Do we have a GPS?
			gps=true
			# Do we use a locally serial attached GPS, or use a gpsd server?
			# (Pick only one)
			#gpstype=gpsd
			 gpstype=serial
			# What serial device do we look for the GPS on?
			gpsdevice=/dev/ttyUSB0
			# Host:port that GPSD is running on.  This can be localhost OR remote!
			#gpshost=localhost:2947
			# Do we lock the mode?  This overrides coordinates of lock "0", which will
			# generate some bad information until you get a GPS lock, but it will
			# fix problems with GPS units with broken NMEA that report lock 0
			gpsmodelock=false
			# Do we try to reconnect if we lose our link to the GPS, or do we just
			# let it die and be disabled?
			gpsreconnect=true

			# Do we export packets over tun/tap virtual interfaces?
			tuntap_export=false
			# What virtual interface do we use
			tuntap_device=kistap0

			# Packet filtering options:
			# filter_tracker - Packets filtered from the tracker are not processed or
			#                  recorded in any way.
			# filter_export  - Controls what packets influence the exported CSV, network,
			#                  xml, gps, etc files.
			# All filtering options take arguments containing the type of address and
			# addresses to be filtered.  Valid address types are 'ANY', 'BSSID',
			# 'SOURCE', and 'DEST'.  Filtering can be inverted by the use of '!' before
			# the address.  For example,
			# filter_tracker=ANY(!"00:00:DE:AD:BE:EF")
			# has the same effect as the previous mac_filter config file option.
			# filter_tracker=...
			# filter_dump=...
			# filter_export=...
			# filter_netclient=...

			# Alerts to be reported and the throttling rates.
			# alert=name,throttle/unit,burst
			# The throttle/unit describes the number of alerts of this type that are
			# sent per time unit.  Valid time units are second, minute, hour, and day.
			# Burst describes the number of alerts sent before throttling takes place.
			# For example:
			# alert=FOO,10/min,5
			# Would allow 5 alerts through before throttling is enabled, and will then
			# limit the number of alerts to 10 per minute.
			# A throttle rate of 0 disables throttling of the alert.
			# See the README for a list of alert types.
			alert=ADHOCCONFLICT,5/min,1/sec
			alert=AIRJACKSSID,5/min,1/sec
			alert=APSPOOF,10/min,1/sec
			alert=BCASTDISCON,5/min,2/sec
			alert=BSSTIMESTAMP,5/min,1/sec
			alert=CHANCHANGE,5/min,1/sec
			alert=CRYPTODROP,5/min,1/sec
			alert=DISASSOCTRAFFIC,10/min,1/sec
			alert=DEAUTHFLOOD,5/min,2/sec
			alert=DEAUTHCODEINVALID,5/min,1/sec
			alert=DISCONCODEINVALID,5/min,1/sec
			alert=DHCPNAMECHANGE,5/min,1/sec
			alert=DHCPOSCHANGE,5/min,1/sec
			alert=DHCPCLIENTID,5/min,1/sec
			alert=DHCPCONFLICT,10/min,1/sec
			alert=NETSTUMBLER,5/min,1/sec
			alert=LUCENTTEST,5/min,1/sec
			alert=LONGSSID,5/min,1/sec
			alert=MSFBCOMSSID,5/min,1/sec
			alert=MSFDLINKRATE,5/min,1/sec
			alert=MSFNETGEARBEACON,5/min,1/sec
			alert=NULLPROBERESP,5/min,1/sec
			#alert=PROBENOJOIN,5/min,1/sec

			# Controls behavior of the APSPOOF alert.  SSID may be a literal match (ssid=) or
			# a regex (ssidregex=) if PCRE was available when kismet was built.  The allowed
			# MAC list must be comma-separated and enclosed in quotes if there are multiple
			# MAC addresses allowed.  MAC address masks are allowed.
			apspoof=Foo1:ssidregex="(?i:foobar)",validmacs=00:11:22:33:44:55
			apspoof=Foo2:ssid="Foobar",validmacs="00:11:22:33:44:55,aa:bb:cc:dd:ee:ff"

			# Known WEP keys to decrypt, bssid,hexkey.  This is only for networks where
			# the keys are already known, and it may impact throughput on slower hardware.
			# Multiple wepkey lines may be used for multiple BSSIDs.
			# wepkey=00:DE:AD:C0:DE:00,FEEDFACEDEADBEEF01020304050607080900

			# Is transmission of the keys to the client allowed?  This may be a security
			# risk for some.  If you disable this, you will not be able to query keys from
			# a client.
			allowkeytransmit=true

			# How often (in seconds) do we write all our data files (0 to disable)
			writeinterval=300

			# Do we use sound?
			# Not to be confused with GUI sound parameter, this controls wether or not the
			# server itself will play sound.  Primarily for headless or automated systems.
			enablesound=false
			# Path to sound player
			soundbin=play

			sound=newnet,true
			sound=newcryptnet,true
			sound=packet,true
			sound=gpslock,true
			sound=gpslost,true
			sound=alert,true

			# Does the server have speech? (Again, not to be confused with the GUI's speech)
			enablespeech=false
			# Binary used for speech (if not in path, full path must be specified)
			speechbin=flite
			# Specify raw or festival; Flite (and anything else that doesn't need formatting
			# around the string to speak) is 'raw', festival requires the string be wrapped in
			# SayText("...")
			speechtype=raw

			# How do we speak?  Valid options:
			# speech    Normal speech
			# nato      NATO spellings (alpha, bravo, charlie)
			# spell     Spell the letters out (aye, bee, sea)
			speechencoding=nato

			speech=new,"New network detected s.s.i.d. %1 channel %2"
			speech=alert,"Alert %1"
			speech=gpslost,"G.P.S. signal lost"
			speech=gpslock,"G.P.S. signal O.K."

			# How many alerts do we backlog for new clients?  Only change this if you have
			# a -very- low memory system and need those extra bytes, or if you have a high
			# memory system and a huge number of alert conditions.
			alertbacklog=50

			# File types to log, comma seperated.  Built-in log file types:
			# alert				Text file of alerts
			# gpsxml			XML per-packet GPS log
			# nettxt			Networks in text format
			# netxml			Networks in XML format
			# pcapdump			tcpdump/wireshark compatible pcap log file
			# string			All strings seen (increases CPU load)
			logtypes=pcapdump,gpsxml,netxml,nettxt,alert

			# Format of the pcap dump (PPI or 80211)
			pcapdumpformat=ppi
			# pcapdumpformat=80211

			# Default log title
			logdefault=Kismet

			# logtemplate - Filename logging template.
			# This is, at first glance, really nasty and ugly, but you'll hardly ever
			# have to touch it so don't complain too much.
			#
			# %p is replaced by the logging prefix + '/'
			# %n is replaced by the logging instance name
			# %d is replaced by the starting date as Mon-DD-YYYY
			# %D is replaced by the current date as YYYYMMDD
			# %t is replaced by the starting time as HH-MM-SS
			# %i is replaced by the increment log in the case of multiple logs
			# %l is replaced by the log type (pcapdump, strings, etc)
			# %h is replaced by the home directory

			logtemplate=%p%n-%D-%t-%i.%l

			# Where state info, etc, is stored.  You shouldnt ever need to change this.
			# This is a directory.
			configdir=%h/.kismet/
		

A few highlights on that conf file!

If you’ve copy pasted my config, then you don’t need to worry about this stuff. Still, you should read it over.

  • To be able to connect to a kismet server remotely, there are **two** lines that you need to edit to allow remote connections. They are:

    listen=tcp://0.0.0.0:2501
    allowedhosts=172.16.42.0/24

    Most websites are covering the old kismet conf file so they won’t mention that. You need to change the listen line to tcp://0.0.0.0:2501 so it will answer all connections. Set the allowed hosts to 172.16.42.0/24 so that at least people have to be connected to your router to do anything.

  • You’ll also need to edit your config to make kismet server aware that is needs to manage your gps device.
    gpstype=serial
    # What serial device do we look for the GPS on?
    gpsdevice=/dev/ttyUSB0

  • This expects to log in /mnt/test/kismet/logs. If you don’t have that directory set up, kismet_server will fail to start. Silently.

Dip Switches

One of the features of the Pineapple Mark V is the boot mode switches. I have a wardrive mode, and my command string is this:
ifconfig wlan1 down && iwconfig wlan1 mode monitor && ifconfig wlan1 up && mount /dev/sda1 /mnt/test && kismet_server -f /mnt/test/kismet/kismet.conf 2>&1 >> /mnt/test/kismet/errors.log
You’ll need to ssh into the pineapple and mkdir the /mnt/test directory first.

You could, if battery life was a true concern and you didn’t want to do any monitoring whatsover via a wireless interface add in an ifconfig wlan0 down but eh.

In Conclusion

Does this home rolled crazy ass solution work? Mostly. I’ve done some successful testing with it locally. I know it usually streams GPS data. But I don’t know that I trust it on large scale yet. On the other hand, there’s a trip to DC608 coming up at the end of the month. Its a two hour trip to Madison. And I have half a month to finish testing everything.

Its madness, it really is.


War Driving on the Wifi Pineapple: GlobalSat ND-100S USB GPS Dongle

Its been along time since I’ve posted here.  I was busy.  Now I’m not.  Don’t ask.

I recently ordered a GlobalSat ND-100S USB GPS Dongle from Amazon.  I’m returning it because it failed me on a recent war drive.  It appears to be unwilling to talk to Linux in a usable format on a consistent basis.  I had to shift it into GWS 3.0 & 3.1 via an extra piece of software.  And it did starting flashing on my trip indicating a GPS lock.

My hardware/software setup was to use the Hak5 Pineapple MarkV and set one radio into monitor mode.  Then I would use GPSD to feed back GPS coordinates from the ND-100S.  GPSD would give me a semi-constant

 ERROR: No update from GPSD in 15 seconds or more, attempting to reconnect message

So I decided to let Kismet handle talking to the GPS chip.  A quick check at home showed that Kismet recognized that it needed to manage the GPS dongle, and would in fact use it.

However, I couldn’t get it to actually locate anything for me.  I’ve read various reviews stating that it did work with Kismet, however in my case I couldn’t get it to behave.  I confess that this may be due to my inexperience with GPS dongles, a bad software configuration, or many other things.  With GPSD not returning error messages and Kismet seeming to be fine, frankly I’m flying in the dark.  There’s not much to be gathered from the internet on the error message.

So, back it goes to amazon and I’ll have to find a different GPS dongle to use.


The Voice of God

I originally wrote this to be a two minute speech. It was out of scope of the prompt for the organization that I wrote it for, as well as quickly becoming to lengthy. But rather then letting it languish on a harddrive and disappear I thought I would let it have a life on the internet. The ideas I present and the language I use aren’t simple. But the concept that I present is deceiving as to its simplicity. Have a gander, and maybe leave a comment below.

I recently saw an image stating “I don’t need a religion, I have a conscience.” The idea behind this says that religion is an antiquated method that has as its sole purpose instilling moral and ethical guidelines within a person. As transcendent or enlightened individuals we no longer have need of a religion to create these values because our conscience should suffice as that authority. The ability for our conscious to determine this is part of an all inclusive worldview – or the totality of our beliefs about reality. It can be hard to test a worldview in its entirety. But if we determine the foundations of a worldview and then test those we can quickly determine the stability of the worldview as a whole.

Conscience is defined as “an inner feeling or voice viewed as acting as a guide to the rightness or wrongness of one’s behaviour.” So what happens when you allow your conscience to guide your actions? Let’s look to the Central African Republic, the ‘CAR,’ where Christians are actively engaged in the ethnic cleansing of Muslims. If you ask the Christian members of the CAR, as has the BBC, they can very easily justify their actions with socio-economic reasoning. So is this ethnic cleansing morally right? If you were to ask their conscience, and we allow our conscience to what define right and wrong, then yes the ethnic cleansing is morally acceptable.

But the near universal condemnation of the global community for the cleansing, however, would disagree. But on what grounds? In the 3 news articles that I read, it was never explained why the ethnic cleansing is wrong. Most of the articles, in fact, avoid calling the cleansing wrong and call it many things designed to make you subconsciously embrace their conscience’s decision that this ethnic cleansing is in fact wrong but with no justification. It is a decision of their conscience that you should not kill another person and that it is more terrible should you do so based on whatever religion that person embraces.

See, the practical out flowing of the idea “I don’t need religion, I have a conscious” is that everyone is allowed to make up their own moral and ethical guidelines. And those guidelines cannot be questioned because they are guided by that transcendent and infallible inner voice. At the very worst, the conscience of the CAR is childlike – and needs to be guided to a transcendent state by the global community. But the Christians of the CAR still aren’t wrong- their conscience says so.

So here is a war of two competing consciences. Who wins? The one with the means to force the other to embrace their worldview. But if a religion is just a framework for moral and ethical guidelines and the conscience can set the same guidelines with as much or more authority then an age old religion, as our quote implies, then wouldn’t fighting a war to force another to accept the views of our conscience not become paramount to an ethnic cleansing? If we apply thought and extrapolate to the end consequences of allowing our conscience to to become the final authority for what is morally right and ethically wrong in our lives, we can easily see the outcome of this worldview. That outcome is a world where everyone does what is right in their own eyes and there can be no consequences for when someone’s right is our wrong.

So what about religion? Do we need it? If we’ve just shown that using conscience as a moral authority gives way to the ability to create differing worldviews of what is right or wrong. One could posit that something external is needed. So does a religion fill that void of an external source? I would say no. Again, our quote “I don’t need religion, I have a conscience” implies that religion provides a required framework for what is right or wrong much like a conscience but that a religion includes the unnecessary weight of rituals and tributes to appease some god with the intent of gaining reward instead of punishment.

So we don’t need either a conscience or human defined religion to determine what is right in our world. The fluidity of moral and ethical truth that results damns their ability to maintain that authority. The Christians in the CAR have allowed their conscience to redefine the morals taught within Christianity to create a pocket exception that allows them to continue with their ethnic cleansing.

What we need is an external being with the authority to define moral absolutes. Christianity puts forth a God who is infinite, almighty, and the Creator of the Universe. If He created the universe, would that not give Him the authority to define what is right or wrong? At that point, Christianity is no longer a religion with rituals and tributes – it becomes a set of truths that impact everyday life and eternity. And part of those truths are whether or not ethic cleansing have pocket exceptions or not. And the finally, the most important truth is that when ethnic cleansing is condemned as a result of the Word of God it is not a debate of consciences. It is a debate of what God says is right or wrong and in the end there is that is no debate at all.

In the end, neither religion neither conscience nor religion can determine the moral absolutes of a worldview which is a summation of the reality in which we live. The Triune God who sent Himself as His Only Son to pay the penalty for the very sins which broke our communion with Him and who Lives within us and speaks to us the Holy Spirit.


Karma On The Fon: Serial Interface Mod

Does that plug belong there? Or not? I hope it looks like it does.

Does that plug belong there?  Or not?  I hope it looks like it does.

This is a 2 piece addition to the fonera so that you can more easily access the serial interface of the device. I’ve found that it makes talking to the fonera via serial so much more stable versus connecting with the cables onto the board.

I’m a big fan of sparkfun. I’ve always been treated well, shipping is fair, and they are more then willing to lend a hand with your problems. I source what I can from them. They have a device similar to the FTDIfriend from adafruit – but I have not used it so I can’t recommend it to you.

Note that in my experience sometimes the fonera is willing to boot with a seriel cable connected, and other times it is not. This precludes just mounting the FTDFriend inside of the fonera (plus its quite hard to convince everything to fit). Using a jack system like this allows you to plug into system just after powering on so you don’t have to worry about whether or not the fonera is happy today.

  1. The same adafruit usb to serial converter I advised earlier.
  2. A 3.5 mm panel mount stereo audio jack
  3. a 3.5 mm stereo audio plug
  4. shrink wrap
  5. Soldering iron
  6. Optional: The Heaterizer XL 3000. The instructions are the best part, and it works better then a lighter.
  7. Drill, drill bit the size of the 3.5 mm audio jack. (What? you don’t have a caliper?)

Installing the Fonera Side

  1. I drilled my hole between the ethernet jack and the antenna port.
  2. Install the stereo audio jack, taking care to make sure that you don’t let the metal of the jack contact any of the components or contacts in the circuit board. Do not glue the jack or anything like that, just finger tighten it.
  3. Cull 3 wires from the connector that came with ftdifriend.
  4. On one end of all three wires, bend the contacts so that just after the bit that a header pin fits into.
  5. Fit them onto the appropriate header pins on the fonera motherboard and loop them over to the audio jack and cut them to length.  Reference this page by digininja for the fonera pinout.  Be conservative – you are going to use the bits that you cut off again for the serial converter adaptor so you will need these.
  6. Shrink wrap the female header pin receptacles so that if they wiggle they can’t bump and mess with data transmission. You could possibly just solder them on, but I didn’t like that idea at the time.
  7. Remove the audio plug, remember how I said finger tight?
  8. Strip and solder the other ends of the cables to the audio jack.
  9. Reinstall the audio jack.  This time go ahead and tighten it up with a pair of pliers.  I didn’t strip the threads but other sparkfun customers have reported that these have a tendency to strip if you put much torque on it.  Be wary.
This is where you connect the female header pins to.  Note the shrink wrap to keep them from shorting each other out.

This is where you connect the female header pins to. Note the shrink wrap to keep them from shorting each other out.

See how the wires run up to the audio jack?

See how the wires run up to the audio jack?

The Serial converter side

  1. Remove the female headers from their pins on the fonera.  Use a continuity tester to figure out which pin on the audio jack goes to the Tx, Rx, and Ground wires.
  2. Flip the Tx and Rx pin connections.  Solder the three leads that you saved to the audio plug.
  3. Plug the other end into the respective female header pins so that you can connect it to the ftdi friend.

The Serial Converter Side

The End

Connect everything back up, double checking your connections are right. Then button up the case. I use GTKTerm on linux. Go ahead and fire that up (maybe as root). Boot up the fonera, plug in the ftdifriend to both the fonera and the computer. Soothe your fonera. You’re finished.


Notes on Fedora 17 (In the context of an Asus 1015PED-MU17)

So, recently I started having trouble with the broadcom-wl driver that I was using. For those that don’t feel like searching, I will briefly summarize.

OliverK@Firefly|10.13.37.21|~ α lspci | grep Network
02:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)

The Asus 1015PED features the Broadcom 4313 wireless adaptor which until now required the use of the broadcom-wl driver. Except about a month ago my system began kernel panicking, which is a little bit like Windows bluescreening. What to do? Searching for the error revealed nothing of interest so I chose to do a fresh install of Fedora 17.

This has actually fixed my problem, but not due to the broadcom-wl module being wrongly configured. It now appears that the brcmsmac module is now the preferred driver for this wireless card. I presume that you can install this with something like yum remove akmods-wl and then yum install brcmsmac. But like I said, I did a clean install so I am not sure.

Another thing of note is that in Fedora 17 “support” for using joysticks has been removed. Thanks to this post. Bleh.

$ sudo -c "yum install kernel-modules-extra joystick"

I’m still busy rebuilding my system, but I’ll post if I find anything of note.

Also of note:
OliverK@Firefly|10.13.37.21|~ α iw list <snip>
Supported interface modes:
* managed
* monitor

Maybe we now have native monitor mode? I don’t know since I have the alfa adaptors.


Splicing MP3’s in Linux

It really shouldn’t be that difficult. As it turns out, it is.

Here’s how I pulled it off:
cat *.mp3 > output.mp3
audacity output.mp3

Re-export and smooth out your id3 tags and such.

There’s really no good way to do this under linux. Everything screws up some fiddly bit that turns out to be important to something that’s not fault tolerant.

So screw it up! cat everything together in the true spirit of linux! Hack shit together until it works.

Just use audacity to smooth everything out. People will thankyou.


Pretty Documentation

This is pretty much a direct follow-up to my last post. This is for how I’m generating the documentation for my camera trigger project. I’m making more progress on the documentation then the actual project, so I’m just like the big companies.

Markdown

I’m writing the documentation in markdown. This means learning markdown. Here’s what you need to learn markdown: https://github.com/ahrencode/Miscellaneous/raw/master/markdown-cheatsheet.png. Its not very hard.

The reason for using markdown is because github doesn’t support HTML for markdown. I think it I figured out why, but its still kind of annoying. (I believe it has to do with the proper tags for starting an html project, css styles, etc.).

HTML

Who doesn’t love HTML? It lets you make things look pretty. So does latex, etc. but I’m not wanting to learn that right now. I’m using pandoc to generate my html. You can use the original daring fireball markdown generator if you would like. But using pandoc allows you specify a style sheet for you to make the html render from. The command I’m using is
pandoc file-name -c stylesheet.css --html5 --output=file-name.html --to=html --from=markdown

I actually just have a function in my bashrc:
function markdowntoprettyhtml() { pandoc $1 -c stylesheet.css --html5 --output=$1.html --to=html --from=markdown ;}

PDF

The other pretty much standard documentation format is PDF. I’m generating that from my HTML file using wkhtmltopdf. To build I cloned the repository, then did git checkout 0.9.6 && qmake-qt4 && make && cp wkhtmltopdf to ~/compiled. The ~/compiled folder is in my path. I would have liked to done a symbolic link but I couldn’t execute wkhtmltopdf after I did that.

Now, I’m using this command wkhtmltopdf input-file outputfile.pdf.

The reason I’m using this is because although pandoc has its own pdf converter, I don’t want to use the pandoc styling, I want to use the styling in the HTML file. And I’m not writing another template when I already have the styling done in css.

You can checkout (literally!) the results on the beta branch for my camera trigger.

And . . .

A few one liners to tie it all together:

function markdownview ( ) { perl ~/compiled/Markdown.pl --html4tags $1 ;}
function markdowntohtml ( ) { pandoc $1 -c stylesheet.css --html5 --output=$1.html --to=html --from=markdown ;}
function markdowntopdf ( ) { pandoc $1 -c stylesheet.css --html5 --output $1.html.generate --to=html --from=markdown && wkhtmltopdf $1.html.generate $1.pdf && rm $1.html.gernerate ;}
function make-documentation () { markdowntohtml $1 && markdowntopdf $1; }

Enjoy!

One other note: If you open the HTML in firefox you’ll see that I’ve got some @font-face love going on. You’ll see I’m also pulling them from my website as well. What you might not notice is that if you to do this yourself without some setup, it fails. It has to to with Cross Origin Response Sharing and the way firefox implements it. You can check this page for a succent explanation of why. Its under “Firefox overview.” The easiest way to fix this problem is to create a .htacces file with the following line: Header set Access-Control-Allow-Origin * to the folder containg your webfonts.


Documentation

Please guys, document your projects. Document everything. Document all the things. Or you end up with stuff that’s horribly mangled like gitlab, mumble. Please document. And if you build something and end up with problems, document that and how you fixed it. For one, you’ll always have a place to look if you need to do something over again. For two, it will help other people if they run into the same thing.

Document.

Document all the things.


Fixing Wireless on Fedora 16

[10:58:11] root@SoliloquyBook {/home/OliverK α yum install kmod-wl
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package kmod-wl.i686 0:5.100.82.112-2.fc16.7 will be installed
--> Processing Dependency: kmod-wl-3.2.7-1.fc16.i686 >= 5.100.82.112-2.fc16.7 for package: kmod-wl-5.100.82.112-2.fc16.7.i686
--> Running transaction check
---> Package kmod-wl-3.2.7-1.fc16.i686.i686 0:5.100.82.112-2.fc16.7 will be installed
--> Processing Dependency: kernel-uname-r = 3.2.7-1.fc16.i686 for package: kmod-wl-3.2.7-1.fc16.i686-5.100.82.112-2.fc16.7.i686
--> Processing Dependency: wl-kmod-common >= 5.100.82.112 for package: kmod-wl-3.2.7-1.fc16.i686-5.100.82.112-2.fc16.7.i686
--> Running transaction check
---> Package broadcom-wl.noarch 0:5.100.82.112-2.fc16 will be installed
---> Package kmod-wl-3.2.7-1.fc16.i686.i686 0:5.100.82.112-2.fc16.7 will be installed
--> Processing Dependency: kernel-uname-r = 3.2.7-1.fc16.i686 for package: kmod-wl-3.2.7-1.fc16.i686-5.100.82.112-2.fc16.7.i686
--> Finished Dependency Resolution
Error: Package: kmod-wl-3.2.7-1.fc16.i686-5.100.82.112-2.fc16.7.i686 (rpmfusion-nonfree-updates)
Requires: kernel-uname-r = 3.2.7-1.fc16.i686
Installed: kernel-3.2.6-3.fc16.i686 (@updates)
kernel-uname-r = 3.2.6-3.fc16.i686
Installed: kernel-3.2.9-2.fc16.i686 (@updates)
kernel-uname-r = 3.2.9-2.fc16.i686
Installed: kernel-3.2.10-3.fc16.i686 (@updates)
kernel-uname-r = 3.2.10-3.fc16.i686
Available: kernel-3.1.0-7.fc16.i686 (fedora)
kernel-uname-r = 3.1.0-7.fc16.i686
Available: kernel-PAE-3.1.0-7.fc16.i686 (fedora)
kernel-uname-r = 3.1.0-7.fc16.i686.PAE
Available: kernel-PAE-3.2.10-3.fc16.i686 (updates)
kernel-uname-r = 3.2.10-3.fc16.i686.PAE
Available: kernel-PAEdebug-3.1.0-7.fc16.i686 (fedora)
kernel-uname-r = 3.1.0-7.fc16.i686.PAEdebug
Available: kernel-PAEdebug-3.2.10-3.fc16.i686 (updates)
kernel-uname-r = 3.2.10-3.fc16.i686.PAEdebug
Available: kernel-debug-3.1.0-7.fc16.i686 (fedora)
kernel-uname-r = 3.1.0-7.fc16.i686.debug
Available: kernel-debug-3.2.10-3.fc16.i686 (updates)
kernel-uname-r = 3.2.10-3.fc16.i686.debug
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Oh, by the way, your wireless will be disabled until you fix this. I hope you have another adaptor handy.So, after looking for awhile I found this solution: install akmod. (Thanks fedora project. I’ll quote zcat’s fedora solved which neatly explains what akmods is:

akmods (similar to dkms) is a solution to the problem of some kernel modules depending on specific versions of a kernel. If you want to use a custom kernel, or a test kernel — e.g. from updates-testing or koji — or if there is a very new kernel in the updates repo, then you must either wait for rpmfusion to rebuild binary kmods to match, or you must yumdownload and rpmbuild the source rpm manually. Enter a better way: automatic kmod rebuilding.

The result is: I have internet without my alfa adaptor again.


Another Slingshot

Boredom struck again today so I posted this slingshot I finished earlier last week.

3 sheets of 1/2″ oak plywood glue together, then cut to my own template and sanded like crazy. Stained with a Chardonnay colored stain, and then I’m got about 6 coats of polyurethane on it.

Again, I’m using theraband gold for this, but with longer band so that I can shoot butterfly style like Joerg does – I’m impressed by the power I think this thing has.

Thanks, and bye-bye 😀