Boosting IoT research through effective research testbed setup

The internet of things (IoT) boom (as evident from google trends) is on its peak resulting in an abrupt attention from the research community toward formulating the IoT use cases and solving the problems in the IoT ecosystem.

iot-trends
Internet of Things search trend (courtesy: google)

In order to solve this problem, some researchers go beyond the formal and simulation methods to practically testing the behavior of their problem and its solution in a real or near to real test environments. These test environments are actually the pain in the ass designing, and configuring and deploying the heterogeneous IoT nodes with OS is a troublesome and lengthy process which often consumes a lot of precious time resulting in poor productivity. In order to solve this problem for the research community, I have a suggestion (both for novice and experts) and I have myself utilized it on certain occasions and I felt may be some peoples needing it.

Now, the solution is to utilize a plain standard Android phone (what do you think?).  I have very strong reasons for suggesting it and the reasons are:

  1.  The android phones are equipped with a facility known as USB on the go (OTG) for details google it. Now using this feature one can theoretically use any kind of device on the mobile device using the OTG  feature provided the mobile device has the appropriate drivers to handle the connecting devices common devices such as keyboard/mouse are I think plug-n-play due to the availability of drivers.
  2.  Now with custom design IoT nodes, there are two problems first the availability and deployment or porting of an OS to the designed IoT node is a difficult task and if the research use case is based on modeling a heterogeneous environment then the problem become threefold. The problem is further intensified when cross compiling drivers and the actual application for the nodes.
  3.  Now keeping in mind point 1 and point 2 let’s take a look at Android OS. Android OS is technically a Linux distribution (as far my knowledge says). So we have a Linux kernel beneath the Android applications life cycle. Now connecting the dots: with the OTG feature, we can connect any type of sensor to the Android device which is equipped with almost a full stack Linux kernel just needing to exploit the Linux kernel and make our IoT magic to work. Now the question arises why we are talking about the kernel why don’t we directly utilizes the Android OS and make our thing work the answer is simple. Android comes with a subset of standard C library called BIONIC custom designed for the resource scarce devices. Working with BIONIC and using the Android NDK also requires specialties and can take a lot of time. Academic researchers are normally equipped with the knowledge of standard C but not the peculiarities of porting and writing code for NDK and making it work on the standard Android ABI.
  4. So the solution is to get Linux environment on the mobile devices having direct access to the kernel and the resources she is managing (I mean no virtualization stuff). Now the question arises how can we get it? We can get it by utilizing the kernel of the Android in a chroot environment which enables us to utilizes a full stack Linux distribution with a more conventional C library and a very standard Linux application life cycle pattern which opens a range of application development for research purposes. Even you can get applications using apt-get and yum.
  5. This testbed concept can be applied to any of the research domain lying under the umbrella of mobile computing.

 

Feel free to update me upon my thinking…

Advertisements

Deploying COMET on Samsung Galaxy S-II (GT-I9100G)

COMET is an application level VM Synchronization solution developed my Mark Gordon and is freely available and hosted on GitHub. As COMET is articulated in 2012 so the direction given by Mark Gordon was correct according to that time and still is with minor changes as I followed Gordon’s direction and I am unable to set it-up working. So I played a little and figured out, how it can be configured. I am sharing the details of changes I did  here, may be I am too direct here and you still need to first check Gordon’s Comet Page and than do these steps if you cannot configure it with Gordon’s directions.

First you need to setup the repo for Android JB using the command:

repo init -u https://github.com/msg555/comet_android -b jellybean

once the repo setup is done than you have to filter out a source code project causing some copyright conflict and removed from the CyanogenMod tree. For that purpose a line in the repo manifest should be removed. So you have to edit the repo default/main manifest xml file. You can use any editor But i used gedit the command looks like this:

gedit source-code-repo-root/.repo/manifests/default.xml

the line that should be removed is for more details see here :

<project path="external/svox" name="CyanogenMod/android_external_svox" />

Once you removed this line than you can sync your repo and will go normally but still it would take time depending upon you internet speed.

Once the source code is successfully downloaded..

than you have to setup the build environment using :

. build/envsetup.sh

or

source build/envsetup.sh

once the build environment is configured, than you have to execute the following command

breakfast i9100g

i9100g was my device name replace this with your device name you can find you device name on the CyanogenMod website.

once that is done now you have to get the prebuilts.

cd vendor/cm
./get-prebuilts

or

vendor/cm/get-prebuilts

once you get the prebuilts. The next step is to get the proprietary blobs.

According to Gordon’s direction you should do this:

./extract-files.sh

But In my case ./extract-files.sh is not working and if in your case it shows the message like  “No such file or directory”. In that case you should try the following:

cd device/samsung/i9100g/
./proprietary-files.sh

or

device/samsung/i9100g/proprietary-files.sh

Well note that here you have also to change two things as my device manufacturer is Samsung so you have to change samsung in the above commands to your device  manufacturer name. Likewise, i9100g is my device name you have to change this to your device name.

Well In mobile cloud computing computational offloading is used to take the advantage of the resourceful desktop or cloud machine and run the program faster in order to investigate this the only open source (to my knowledge) solution which exist is comet developed by Mark Gordon how ever if you want to try comet on your device there are certain things which you should do in order to get it working. I would not write all the steps as it can be seen on the CyanogenMod wiki and comet page but I will write those things which are not listed on those pages and will make problems in setting up.

If ./extract-files.sh is not working on your environment and shows the message like  “No such file or directory”. In that case you should try the following

cd device/samsung/i9100g/
./proprietary-files.sh

or

device/samsung/i9100g/proprietary-files.sh

After this step you are ready to build using:

make -j10 otapackage

Now for Building COMET follow the instructions on the COMET page under the heading of “Building COMET”. Once you have build the comet than you have to build some other comet packages i.e.:

make -j4 tcpmux
make -j4 CometSettings

Than push the vm on the phone using the Gordon’s Instructions.

also to run the server you should run the tcpmux deamon from this directory.

source-code-repo-root/out/target/product/i9100g/system/bin

note that you have to change the device name to your device name.

I hope this will be helpful…