Litle HowTo prepare Boost and RCF on Mac!
My work environment is Mac OS X Snow Leopard 10.6.6 and Xcode 3.2.5
Boost version is 1.45.0 and RCF version is 1.3

What is Boost and RCF?
Boost is a powerful and portable C++ library.
RCF is a Remote Call Framework something like RPC.

The two libraries written in C++ seems to be Cross Platform and Cross Compiler also 64 bit.
From RCF documentation only one thing must be done.
Use of the typedef’s in “boost/cstdint.hpp” for portability.

Now boost library is compiled and ready. Next step is RCF framework.
The Official site is http://deltavsoft.com/
Download and extract RCF-1.3 to your working directory.

Create a new command-line project with Xcode.
Don’t forget to select “C++ stdc++” in Type box!

Go to “Project” menu and select “Edit project Settings” then select “Build” tag. Search for “Header Search Paths” settings and append RCF and Boost include path in the list. Search for Preprocessor Macro and add “RCF_USE_BOOST_ASIO”. Set also “Library Search Path” to “boost_1_45_0/stage/lib”.

Finally in the main window go to “Source” select and right-click, select “Add”, then “Existing Files”, navigate to “RCF-1.3/src/RCF”, find and add “RCF.cpp” file. Also go to “Targets” -> “Link Binary With Libraries” and add “libboost_system.a” and others “.a” files from the “boost_1_45_0/stage/lib” directory.

Some time ago I wrote script for Hacking Fonera Access Point. This script move root file system to USB device and permit any kind of installation and easily revert any changes to original state without stress for internal flash drive. In fact it’s stress USB device but it’s better than damage the internal flash!

How it works:
First time the script copy entire Fonera root file system to USB device, next time everything except kernel is loaded from external USB. If no valid USB drive/partition is detected it’s automatically load internal root file system after about 20s.

Preparing USB drive:
Create on USB device one or more partition with ext2 or ext3 file system. Finally add an empty file named “usbrootfsready” on the root of partition.

Preparing Fonera:
We need to gain access to Fonera shell and create file named “/sbin/usbrootfs” with this contents.

The wiring is so trivial. Start from data sheet we need 4 pins: GND, VCC, TX, RX.
Sensor operating voltage is from 2.5V to 5.5V and the current is about 2mA, then we can get power from serial port DTR or RTS pins. Look at this explanation. ATTENTION! RS-232 specification says that tension can be 25V. You can simply BURN the sonar, computer, house and more… Don’t do anything if you don’t know what are you doing.

In my case I am using USB to RS-232 converter. Output voltage is 5V so I don’t need additional circuitry, just simple pin to pin wiring.