This weekend was the first
57N Stupid Shit No One Needs Hackathon
. I tried
this weekend to perform serial comms over a string and cup using the msp430
based TI Launchpad.
I had the tone generation working really quickly and then spent 15 hours trying
to demod and tones and find a byte stream using a microphone. I had no chance,
it didn't work at all.
I was able to transmit the tone a long the string over 3 meters of room. So the
core idea does work. I think I will try this project again after reading some
more dsp.
Hibby and I were happy to announce the first
57N Stupid Shit No One Needs
Hackathon
this week. It isn't often that you come across a
strange
link
in your search history and it turns into an awesome event, we seem
to have beaten the odds.
The first Stupid hackathon I read about produced some of the coolest ideas for
pointless things I have ever seen. The best one to make the event clear has to
be
endless.horse
.
So what are you going to do Tom?
Of the many terrible ideas I have each day, only a few are worth spending 48
hours polishing to death. This coming weekend I have decided to take two
technologies I have been gradually learning, mirco controllers and DSP, and
build the most terrifyingly bad things I can think of.
So tomorrow prepare yourself to see the start of a paper cup and string
telegraph being forged in 57North Hacklab.
Just before I left work yesterday I built one of the gimme boards I got earlier
this week and connected it up to a
goodfet
. I had to do a little source editing
to let the goodfet run and connect to the correct serial port. If you need to
change the serial port from the default it is a quick grep through the source
tree to find literal string "/dev/ttyU0" to change.
I followed the instructions on the
git repo for the specan code
. The first
time I ran the flasher the IM-ME booted into the stock firmware again. I
erased the flash, tried again and it all worked. I am not sure how long the
flashing took, but if you will be holding gimmme expect it to be a few minutes.
To flash the IM-ME I did:
$ goodfet.cc erase
$ goodfet.cc flash specan.hex
This turned out to be a lot easier than I expected, everything seems to be well
documented. If you can get an IM-ME and want to flash it with a goodfet and a
gimme, send me an email and I will send you one of my spare(partially
assembled) boards.
My
Yardstick One
appeared yesterday, time to set up RFCat.
RFCat has not yet been packaged on FreeBSD so I had to install it manually. I
pulled the
RFCat source from bitbucket
which includes both the firmware
and the client tools. To play with the stock firmware on the YSO I just had to
install the client tools.
The client tools depends on
libusb-1.0
, which ships in FreeBSD and on
pyusb
. Pyusb is offered by the py27-usb port.
$ sudo pkg install py27-usb
Then I built the rfcat client tools:
$ cd code
$ hg clone ssh://hg@bitbucket.org/atlas0fd00m/rfcat
$ cd rfcat
$ sudo python setup.py install
I had to set up devfs rules to access the usb devices, with my account in the
usb group I have the following:
# /etc/devfs.rules
[localrules=10]
add path 'usb/*' mode 0660 group usb
#/etc/rc.conf
devfs_system_ruleset="localrules"
devd_enable="YES"
With that all set up I can now try the rfcat tools
$ rfcat -r
'RfCat, the greatest thing since Frequency Hopping!'
Research Mode: enjoy the raw power of rflib
currently your environment has an object called "d" for dongle. this is how
you interact with the rfcat dongle:
>>> d.ping()
>>> d.setFreq(433000000)
>>> d.setMdmModulation(MOD_ASK_OOK)
>>> d.makePktFLEN(250)
>>> d.RFxmit("HALLO")
>>> d.RFrecv()
>>> print d.reprRadioConfig()
The r flag tells the client to throw me into the research prompt and I get left
in something that looks sufficiently like ipython. To test that everything was
working I decided to transmit some bytes in a loop in the ism 433 band.
In [1]: d.setFreq(433920000)
In [2]: d.setMdmModulation(MOD_ASK_OOK)
In [3]: d.makePktFLEN(4)
In [4]: d.setMdmDRate(4800)
In [5]: for i in range(0,15):d.RFxmit('\xDE\xAD\xBE\xEF');
In [6]: for i in range(0,15):d.RFxmit('\xDE\xAD\xBE\xEF');
In [7]: quit()
I used an rtlsdr dongle and
sdrtouch
on my phone to get a quick demod of
the spectrum and to see a waterfall. I tried this a few times, but I wasn't
seeing the expected signal. Right off to the far right edge of the screen I was
seeing a jump in strength, tuning around a bit while transmitting I eventually
caught my burst packet. It seems that my rtl dongle is about 400KHz off the
actual observed frequency.
With the launch of the
yardstick one
I remembered the
im-me
I bought
earlier this year. Not wanting to risk destroying one of the last available
im-me's in the world I decided to get pcbs made of Michael Ossmann's
gimme
.
I found
a link to the OSH Park
board page an ordered a small batch(3
boards) for less than £10. They came in about 3 weeks and seem to be reasonable
quality, I will try them when my goodfet appears this week.