Let’s see memory

Upgraded portions of the code to display available RAM on the swarm member process and the length of time as a member in the swarm. Was able to test this by resetting the member and watching memory and time change. Seems to be working ok. Display is simple but it’s a start. The Address16 value is unique to the network and will be the hash key used to monitor memory usage. Another row here will be a monitor of the currently running pattern.

I’m hoping the new Arduino comes tomorrow so that I can monitor 2 at once. Once that is complete I’ll start working on sending commands from the controller.

Today I found some other data on batteries and options for the RGB led strips. LiPo may be the way to go for power. Rechargeable, small and relatively powerful. Need to scope these out. Here is the link to the somewhat cheaper LEDs:http://www.adafruit.com/products/306

A little work

Worked on finishing iPhone jailbreak. Installed Terminal app from Cydia and was able to navigate the filesystem.

Also continued working on the controller object. Mostly implemented the activeMembers map and have a single client up and running. Need to spend a little time upgrading the Arduino code from prototype to something more reasonable (and source controlled).

The jailbreak

Bunch of stuff today so far. Finally got the iPhone jailbroken and was able to get the proper applications installed that allowed me to SSH into the phone. Very exciting to see the root access. Was able to enable the serial port and I’m looking forward to playing around with that. ohscope to the rescue: http://www.ohscope.com/2009/02/24/serial-port-on-iphone-with-minicom/

More towards software development now that I’ve implemented the C++ links between the router and coordinator. Starting to get fun that way. Lots of refactoring and reorganizing to get what I want. We need to start talking about what to do about enclosures and housing for the electronics.

For the iPhone setup I installed: Minicom, ToggleSSH and openSSH. I had to enable Hacker mode in Cydia in order to be able to find Minicom. Followed the instructions from ohscope to enable the serial port. Since I have 4.2.1, I cannot use the default Cydia MobileTerminal app. I added this source http://cydia.xsellize.com to find a version of MobileTerminal that works for this iOS version.

Goodbye Android

Ok, gave up on Android. I’ve decided to go with iPhone and openFrameworks. I’ve tested out the implementation on the 3G and 4. It works great. So I’ve downloaded the iOS and OSX versions and checked into SVN. Working on migrating the code I wrote in Processing over to openFrameworks. Much C++ to learn. The benefits are manyfold. Don’t have to buy a new phone, it’s debuggable, source controlled and I can use XCode. Fewer new technologies and moving parts is much better than what we’d have to do for the Android solution (which isn’t trivial from the research that I’ve been doing).

I’ve updated the XBee Arduino API to be able to use the ofSerial object. Minor changes but was able to get it working. Was able to send an ATSH message and getting the proper result. Will work on expanding the test cases but this is really good news.

I’ve tried really hard to get the iPhone jailbroken to no avail. Have resorted to finding someone to help me with this. I’ve ordered the breakout boards to be able to use the iPhone serial connection. Wish us luck.

XBee on Eclipse

Eclipse finally working with the XBee API library. My biggest issues were with getting the environment set up. Importing all of the needed JARs, etc. I ported the work that I’d done in Processing. I had to comment out the out the UI code in order to get it to work and I’ll need to put that back in but it’s working! Need to add an event loop and UI presentation.

So one thing that I needed to add was the /var/lock directory and open up permissions to it. I found out about it athttp://processing.org/discourse/yabb2/YaBB.pl?board=Electronics;action=display;num=1193459849.

Android conniptions

Started diving into the controller phone portion of the project. Lots of ups and downs. The Processing path (which I have some code working already for) is not going to work. There are too many unknowns here as far as the integration of the environment in Android and its use of the serial port. I was under the impression that there was much more serial port development out there for Android and I was seriously mistaken.

So the path takes the form of another interface board that was recently released. IOIO. I think this will work but will take some development work. Someone is already working on a port of the XBee API api to be able to be used with IOIO and I’ve contacted him to get an update.

In the meantime, I’ve gotten the Android SDK loaded and starting the run process of building Android apps in Eclipse. Hello World is done. I’m going to start porting all of the java code I wrote in Processing over to this path.

To API or not

Worked a bit on the processing sketch to get data decoded. I noticed that the serial data sent from the router was broken up. I would get a ‘1’ and then ’23’. I believe that this will be resolved with the API setting on the router. I was able to ensure that the remote addressing was correct.

I was able to get the router running off the USB connecter used for programming. This is useful and should be helpful in the future when remote uploading.

Next step is to use the ATDB to get RSSI data for the last RF packet. I also need to build up another router to test with a bigger network (after getting the router to run under API). Also need to properly decode the ATND result. That will take a little work.

Let’s start this up

Able to get Coordinator API and Router AT working together. The signal strength display was not updating properly. I think it’s due to the code to extract address and RSSI data from the message. The Serial callback was being called at the correct cycle so I’ll need to look at that.

I was not able to get a good connection with the Router in API mode. That needs to be done.

One trick with Coordinator hooking up to Processing was that it needed to be in AP mode 2. This was in the documentation. This makes me think that there is a related setting in the Router setup that needs to be researched. I found this which may be useful (ATAP2): http://beaststwo.org/xbee_api/index.shtml

Another issue is with power consumption. The 9V battery appeared to run out pretty quickly. That needs to be measured.

Found that there is a possibility of doing remote code uploads. That would be unbelievably cool and will need to research. Having to program by disconnecting the hardware serial lines is a pain.