Biobug.org

Projects, notes, etc by Will O’Brien

Entries


My WishList
Resume
Want My Coffee?

Production

Photo Gallery
Articles
Podcasting
News

Amusements

Audio
Brewing
Cigars
Coffee
GPS/GeoCaching
Hacks
Home Theater
Kayak
Machine Shop
Photography
Recipes
SCUBA Diving

Research

CNC
CAD
Scripts
VR Interface
Environment
KarKomp
KarKompV2
MythTV

Reference

OWLNet
Quit Soda
Mac
Linux
Tech Ref
Panasonic Toughbook
Dreamhost hosting

Communication

Blackberry
T-mobile MDA
Danger Sidekick
WRT54G(s)

Transport

Land Rover
4Runner
Beetle
Jeeps
Motorcycles
EV Motorcycle
About
Links
Search

SMS remote start usability update

17 December, 2011 (14:51) | hardware, SMSresponder | 3 comments

Ok, so it’s been a week since I installed the SMS interface. I took the car out to Winter Park for a week of sliding down the mountain and gave the system a real world test. (Tried it from my hotel room while the car was outside) and it worked!

I just gave it another test run and the car started perfectly. Now that the system has stayed working, I’m planning to develop the backend code a bit more. In addition, I have some more tricks up my sleeve… :)

SMSresponder interface schematic

17 December, 2011 (14:42) | hardware, SMSresponder | 9 comments

I whipped up a clean schematic for my current version of the SMS responder. I left out the iphone dock connector because I used a breakout board – and really, it’s easier that way, you can cable over to the iphone. Click to view the entire schematic – my blog trims the images (I don’t like scaling them!)

SMS Remote Start – working prototype

11 December, 2011 (19:01) | hardware, iPhone, News, SMSresponder | 4,398 comments

A quick update on the SMS remote start using my old iPhone… It works! I can now start my Subaru outback via SMS command from wherever I am.

I used an older Arduino simply because I wanted a quick and dirty 3.3v source for the iphone to arduino serial interface. The perfboard has a tip120 to drive the remote start, all the interface wiring for the car, power supply and the iphone interface. I tossed in a .01 cap at the power source just for extra filtering. The power supply is a switching charger from a broken iphone car charger. Efficient and free!

This is my quick build schematic. (Click to see the entire thing) The voltage divider on the left is so that the arduino can report the system voltage. it’s made of 3 10k resistors since I always have those on hand. The result is 1/3 of the 12-14v DC that the car has. From this, we can infer the state of the car: >13 is started. I plan to toss in a ds180 1 wire temp sensor later on as well. The pink highlighter was used as I wired things up.

Important: There’s an error in the schematic – I fixed it on my board but forgot to update it! The diode should connect on the other side of the resistor that connects the iphone serial RX and the Arduino 3.3v source. If you connect it this way, you won’t get any serial input on the iphone. It’s not lethal, just important!

(update 2: You can get the clean version of the schematic here: )

Requirements:

An old jailbroken iPhone, an Arduino, iphone breakout board (I used a PodBreakout Mini) 4x 10k resistors, 1x TIP120, a 5 volt switching supply cell charger (easier than building one), some wiring ability and a general understanding of unix/perl/arduino. (See the packages on my dev phone in this post.

The code:

You can get the code to make it all work here. (SMSresponder.pl, com.SMSresponder.startup.plist and

SMSresponder is a perl script that runs in a loop. Every 30 seconds it checks for a new message since the last time it ran. place it in /var/root/bin/ (you’ll need to create that directory) as this is where the startup system looks for it. You can put it somewhere else, just edit the plist to match.

Make it work all the time:

Copy com.SMSresponder.startup.plist to /System/Library/LaunchDaemons on the phone. This will start the script at boot.

The Arduino:

RemoteStartController.pde is a quick program that I wrote based on all sorts of other source I already had on hand. Notably, most of the code was adapted from Motokomp. I’ve added hooks for additional commands, but haven’t updated the iPhone perl script to do anything with the output.

How it works in real life:

I send a text message from my phone with the phrase: “Start 1234″ (1234 would be the password in the phone script). The phone gets the text then tells the arduino via serial interface to start. The arduino grounds the wire to the remote start that activates it. Meanwhile, the phone sends back a SMS saying ‘Executed’ to let me know that it got the message and is acting on it. In the future it’ll send back a message confirming that the start was executed as opposed to the I told him to do it method.

Project comments:

This thing works very well. I can probably get away with reducing the polling time on the iPhone, but I wanted to conserve resources. I spent two weeks testing the SMSresponder script running on the phone with perfect results every time. I still need to add some handshaking between the iphone and arduino, (iPhone: start dude. Arduino: OK!, iPhone: great let me sms that back to the man in charge.) Right now, the iphone sends the command and prays that the arduino got the message.

The remote start I’m using is an Avatal 3117 purchased via Amazon. (There are additional things added to make the subaru’s computer happy about missing the key) the main reason I bought this remote start is that it has an input wire for starting! When you ground it, the remote start will start the car. If you ground it again, the car will turn off. That’s how the arduino activates the remote start. In reality, there’s also a serial interface on most RS units today, but getting documentation on them seemed difficult. Besides, who wants to implement a new protocol just for a one-off build?

I’m seriously considering building a kit version of this hardware. It would include the iphone dock connector, programmed atmega, etc: it would tie all the prototype hardware into a single build – and maybe add a nice box and harness to make it work. (I used extra wiring bits from my remote start install to add a nice modular connector to the prototype)

iPhone dev: SMSresponder

28 November, 2011 (10:44) | iPhone, Projects, SMSresponder | 31 comments

I’ve built a perl script to enable SMS remote start of my car. The script checks the SMS database for new messages and if the message meets the criteria, it will send a command out the serial port, log the event and send a reply sms for confirmation.

Everything is done in perl! My script directly reads the SQLite sms database, writes to the serial port via Serial::Device, sends confirmation SMS messages via sendSMS and logs to a log file with a quick and dirty file write routine. I’d like to add a serial port logger for convenient data logging from my hardware interface as well as some feedback info for the reply sms: cabin temperature will be the easiest to add…

First, the phone needed some packages. Here’s my current install list:

iPhone:/var/log root# dpkg --get-selections
adv-cmds                    install
apr-lib                        install
apt7                        install
apt7-key                    install
apt7-lib                    install
apt7-ssl                    install
base                        install
bash                        install
berkeleydb                    install
bzip2                        install
ch.ringwald.springboardaccess            install
com.saurik.iphone.ske                install
com.saurik.substrate.safemode            install
coreutils-bin                    install
curl                        install
cy+cpu.arm                    install
cy+kernel.darwin                install
cy+lib.corefoundation                install
cy+model.iphone                    install
cy+os.ios                    install
cydia                        install
cydia-lproj                    install
darwintools                    install
debianutils                    install
diffutils                    install
diskdev-cmds                    install
dpkg                        install
essential                    install
expat                        install
findutils                    install
firmware                    install
firmware-sbin                    install
gcrypt                        install
git                        install
gnupg                        install
grep                        install
gsc.accelerometer                install
gsc.all-features                install
gsc.any-telephony                install
gsc.app-store                    install
gsc.application-installation            install
gsc.armv6                    install
gsc.bluetooth                    install
gsc.cellular-data                install
gsc.contains-cellular-radio            install
gsc.gps                        install
gsc.hw-encode-snapshots                install
gsc.hw-snapshots-need-purplegfx            install
gsc.international-settings            install
gsc.location-services                install
gsc.microphone                    install
gsc.mms                        install
gsc.music-store                    install
gsc.not-green-tea                install
gsc.opengles-1                    install
gsc.peer-peer                    install
gsc.proximity-sensor                install
gsc.ringer-switch                install
gsc.sms                        install
gsc.stand-alone-contacts            install
gsc.still-camera                install
gsc.telephony                    install
gsc.telephony-maximum-generation        install
gsc.unified-ipod                install
gsc.voip                    install
gsc.volume-buttons                install
gsc.wifi                    install
gsc.youtube                    install
gsc.youtube-plugin                install
gzip                        install
jp.ashikase.mousesupport            install
jpeg                        install
libgpg-error                    install
libstatusbar                    install
libvncserver                    install
lzma                        install
minicom                        install
mobilesubstrate                    install
ncurses                        install
openssh                        install
openssl                        install
org.thebigboss.repo.icons            install
p5-archive-extract                install
p5-archive-tar                    install
p5-archive-zip                    install
p5-attribute-handlers                install
p5-autodie                    install
p5-autoloader                    install
p5-b-debug                    install
p5-b-lint                    install
p5-bignum                    install
p5-cgi.pm                    install
p5-class-isa                    install
p5-compress-bzip2                install
p5-compress-raw-bzip2                install
p5-compress-raw-zlib                install
p5-constant                    install
p5-cpan                        install
p5-cpan-checksums                install
p5-cpan-meta-yaml                install
p5-cpanplus                    install
p5-cpanplus-dist-build                install
p5-data-compare                    install
p5-data-dumper                    install
p5-db-file                    install
p5-dbd-sqlite                    install
p5-dbi                        install
p5-devel-ppport                    install
p5-device-serialport                install
p5-digest                    install
p5-digest-md5                    install
p5-digest-sha                    install
p5-encode                    install
p5-encode-locale                install
p5-encoding-warnings                install
p5-exporter                    install
p5-extutils-cbuilder                install
p5-extutils-command                install
p5-extutils-install                install
p5-extutils-makemaker                install
p5-extutils-manifest                install
p5-extutils-parsexs                install
p5-fcgi                        install
p5-file-fetch                    install
p5-file-find-rule                install
p5-file-homedir                    install
p5-file-listing                    install
p5-file-path                    install
p5-file-remove                    install
p5-file-temp                    install
p5-file-which                    install
p5-filter                    install
p5-filter-simple                install
p5-getopt-long                    install
p5-html-parser                    install
p5-html-tagset                    install
p5-http-cookies                    install
p5-http-daemon                    install
p5-http-date                    install
p5-http-message                    install
p5-http-negotiate                install
p5-http-tiny                    install
p5-io                        install
p5-io-compress                    install
p5-io-zlib                    install
p5-ipc-cmd                    install
p5-ipc-run3                    install
p5-ipc-sysv                    install
p5-json                        install
p5-json-pp                    install
p5-lib                        install
p5-libnet                    install
p5-libwww-perl                    install
p5-locale-codes                    install
p5-locale-maketext                install
p5-locale-maketext-simple            install
p5-log-message                    install
p5-log-message-simple                install
p5-lwp-mediatypes                install
p5-math-bigint                    install
p5-math-bigint-fastcalc                install
p5-math-bigrat                    install
p5-math-complex                    install
p5-mime-base64                    install
p5-module-build                    install
p5-module-corelist                install
p5-module-install                install
p5-module-load                    install
p5-module-load-conditional            install
p5-module-loaded                install
p5-module-pluggable                install
p5-module-scandeps                install
p5-module-signature                install
p5-net-http                    install
p5-next                        install
p5-number-compare                install
p5-object-accessor                install
p5-par-dist                    install
p5-params-check                    install
p5-parse-cpan-meta                install
p5-pathtools                    install
p5-pod-escapes                    install
p5-pod-parser                    install
p5-probe-perl                    install
p5-safe                        install
p5-storable                    install
p5-switch                    install
p5-sys-syslog                    install
p5-term-ansicolor                install
p5-term-ui                    install
p5-test-harness                    install
p5-test-script                    install
p5-test-simple                    install
p5-text-balanced                install
p5-text-glob                    install
p5-tie-refhash                    install
p5-time-local                    install
p5-time-piece                    install
p5-unicode-collate                install
p5-unicode-normalize                install
p5-uri                        install
p5-version                    install
p5-www-robotrules                install
p5-xsloader                    install
p5-yaml                        install
p5-yaml-libyaml                    install
p5-yaml-syck                    install
p5-yaml-tiny                    install
pam                        install
pam-modules                    install
pcre                        install
perl                        install
perl-base-modules                install
preferenceloader                install
profile.d                    install
readline                    install
saurik                        install
sed                        install
sendsms                        install
shell-cmds                    install
system-cmds                    install
tar                        install
top                        install
uikittools                    install
ultrasn0w                    install
veency                        install
vim                        install

I highly reccommend installing apt strict – you can install needed packages via apt-get install bleh on the command line.

I’m still tweaking the script, but the first working version loads on phone startup vi starup plist. So far it seems to be somewhat robust. Testing will tell.

Cheap connectivity for your gsm project.

20 November, 2011 (10:14) | hardware | 1 comment

I tried to get a telemetry sim via the diydrones guys, but they were out! I opted for my old friend, the pay as you go t-mobile setup. I just picked up a $20 phone at walmart, then activated the sim with the iphones imei. You don’t have to do that. You can activate the new phone and update the imei later on. If  you have a questionable project phone, you should activate the new cheap pay as you go phone then move the sim. You need a working phone to get the login to manage the account!

Costs:

$20 phone – I got around $4 in line credit with the phone. Sometimes they include extra minutes in the deal making it even better.

Buy at least $10 for the pay as you go plan. SMS will cost $.10/each. Not the best, but nice for low investment. $10 gets you 100 messages.

However, if you find that you’re using the heck out of it, you can upgrade to a $15/month plan that gives you UNLIMITED TEXT.

iPhone, jailbreak, ssh, car controller

20 November, 2011 (10:00) | networking, Projects, Toys, Uncategorized | 1 comment

I’m working on a new car controller. It’s based on aftermarket remote start, a jailbroken iphone and some open source hardware. This post covers setting up the iPhone for that use. It’s really just a nice, cheap (if you have it) script-able serial telemetry platform.

iPhone jailbreak notes:

I used an iPhone 3g, downloaded 4.2.1 iphone firmware and used pwnageTool_4.2 to build jailbroken firmware.
(then did it all over again to build unlockable firmware – update baseband to 6.10: (add link)
First stop was to configure wireless to talk to my home network.
Then I hit Cydia (the app that’s loaded when jailbroken.) and updated everything it wanted.
Get cell service (you can do this later):
Install ultrasn0w and get a pay as you go t-mobile account activated on it.

Now it’s time for software:

Install openssh via cydia.
ssh onto the phone and change the passwords for the root and mobile users.

I also install veency – it’ll allow you to vnc onto your iphone, making it much easier to do all your work from your computer. Set a password in settings if you like.

We want perl, so add the coredev.nl repo:
download http://coredev.nl/cydia/coredev.pub on your machine. Then scp it to root@yourphonesip:/var/root
ssh to the phone and run: apt-key add coredev.pub
then run: echo ‘deb http://coredev.nl/cydia iphone main’ > /etc/apt/sources.list.d/coredev.nl.list
Now when you load cydia next, you can get perl installed. :)

Use Cydia to install the following packages. Instead of confirm after each, just hit continue queuing and add things to be installed. Then you can go to manage or just hit confirm on the final package you want to install.

minicom
perl
perl-dbd-sqlite(search for dbd::sqlite)
perl device serial (search for device::serial)
vimproved (This is vim, find something else if you don’t do vi.)

Later we’ll want a command line sms sender, but for now I haven’t decided which to use yet.

Set things up:

Set up Minicom:
As root mkdir /usr/etc
Run minicom -s, set serial to /tty.iap, set 9600 N81, turn off flow control
Save config as default.
install vi (or vim for the search to work) (I like vim. deal.)

If you have a serial port dock built, now’s the time to test your port. My first phone had a bad dock connector, so no serial on it. Luckily I had a spare laying around with a bad home button. I swapped the screens and was good to go.

If you’re getting a data plan, it might be nice to ssh into the phone over the nat’d edge/3g/whatever you paid for:

install autossh.
Follow this how-to: http://llemarie.wordpress.com/2009/09/05/tip-connect-to-your-iphone/
install p5-Device-modem (which gets you device::serial)

Congratulations. Now you have the equivalent of a funky linux (yeah, it’s bsd. I know.) box with geolocation, 3g, wifi and a serial port. Muhahah.

Turnigy lipo repair

25 September, 2011 (20:20) | News, Projects | 1 comment

So I bought a 5000mah 6s Lipo from hobbyking earlier this year and finally got around to using it. Shortly after setup I ended up with a slight – and I mean slight short in my motor wiring that resulted in a total failure of my motor/controller/batteries. After some testing I found that the battery pack had lost voltage between cells 4 and 5. After pondering the purchase of new batteries I opened up the battery.

This is what I found. I completely separated solder point inside the battery.

A short solder job later and I repaired the point. I added some wire for stability and it passed subsequent tests with motor load and charging.

Say Hello to Powercord Labs

19 September, 2011 (22:26) | News | 1 comment


Powercord labs is a new adventure in Laser engraving (and cutting) in Columbia, MO. Wish us luck! (And get your stuff engraved!)

We’re going open source on this venture, and we’ll be bringing some new products out as soon as we can.

Check out my project at Kickstarter!

2 August, 2011 (21:08) | Uncategorized |

I want to launch a new hardware/software platform for energy monitoring and usage. Check it out: http://www.kickstarter.com/projects/willobrien/microhome-smarter-houses-save-energy
The project site is http://microhome.org

The new karkomp: iphone/ipad video server

3 July, 2011 (08:09) | networking, Projects | 1 comment

Quite a while ago, I spent quite a bit of time messing around with car pc’s. I was never truly happy with what I had. However, on my new car, I’m adding a pair of roof mounted LCDs and an iphone/ipad video cable. NO MORE DVDs in the car!
Since storage space is fairly limited on those devices, I decided that a video server would be a great addition to load up a bunch of movies that I won’t carry around on my devices. (Think Tinkerbell)

For now I’m using what I have on hand: a dual core ATOM Foxconn 45CSX (the network interface is crappy slow on it) I will be upgrading it to something with gig and a core 2 duo at least in the future. That’s stuffed into a case with a 12v power supply. An older 200gb laptop drive will soon become a new 500gb, but it’s not a big deal.
For the server, I decided to use ubuntu linux with the alpha air video server installed. It turns out to be really simple to do, thanks to a custom repository out there. I chose linux because it’s the most stable when you’re dealing with random power outages and it won’t waste the sparse cpu driving an unnecessary GUI.

Thanks to http://blog.frameos.org/2011/02/08/installing-airvideo-linux-server-in-ubuntu/ for the time saving writeup!
More later when I get the install together.

« Older entries

 Newer entries »