My First Open Source Software at Lawrence Berkeley Lab(1986)

I was writing my PhD thesis in Berkeley in the 1985-86 period. When Mac was released in 1984 and they came for a demo to Lawrence Berkeley Laboratory (LBL), many scientists loved the idea of Mac and they placed orders then and there. I offered to set up the first Mac that arrived in my group. Once I did that, I had to do that for each of the subsequent Macs that arrived in the group.

Continue reading “My First Open Source Software at Lawrence Berkeley Lab(1986)”

Android bluetooth link to Tata Indigo Manza Car

About one year back, I had purchased a TATA Indigo Manza Elan car. This has a feature to allow bluetooth based phone to connect to sound system in the car. This makes one handle hands-free phone call, while driving. I have a LG P500 Optimus Android based phone. Initially when I linked Bluetooth, it worked after I learned to connect the device. Some time back I upgraded my Android version to 2.3 from 2.2. After this I noticed that bluetooth link would connect but calls would not be handled properly. I could not hear incoming call etc.
I have been now able to solve this problem by adding an app named “Bluetooth Manager”, available from https://play.google.com/store/apps/details?id=com.mdsoftware.bluetoothpowermanager&hl=en. Now if I connect the car bluetooth system through this application, my phone call is handled properly. I do not know why it was not working otherwise but shared this here in case some one else has a similar problem.

Use of ICT and Sensor Network Technology in Agriculture in Bihar

Bihar Govt has rightly recognized the potential of agriculture in growth of Bihar. For this purpose a separate “Agriculture Cabinet” has been formed. Road map for agriculture for next 10 years with a massive outlay has been planned as well.

In November and December 2011, I made two visits to Bihar and interacted with Agricultural Research Institute, Farmers and some young Social Entrepreneurs focusing on agriculture. I have also noticed the fact that some of the farmers in Bihar have done world record production of paddy and this encourages me to write this brief note.

In 2011, on behalf of IIT Alumni (Gujarat Chapter) I signed an MOU with Gujarat Govt to “Improve Agricultural Yield using Technology”. I feel that some of the points mentioned in that MOU are also relevant to Bihar. I am willing to work together with Bihar Govt to develop these technologies. The technologies that I am talking about are not part of standard agricultural technologies being covered but are more recent and are under development worldwide. While I would have hesitated to discuss such technologies in Bihar earlier since they would only be beneficial after farmers have started utilizing existing technologies. However now that I have noticed Bihar making fast progress in agriculture, I feel that time is ripe to take up research and development, which would take Bihar to next level and keep it ahead in Nation and World. I would mention these as follows:

Precision farming using sensor network– using the localized sensors linked with wireless communication system to provide real time feedback on various parameters which affect crop yield. As compared to the developed countries, our farm sizes are very small hence we need to develop low cost solutions based on latest advancements in MEMS sensors, micro radio transceivers and processing systems. This would allow us to monitor the spatial variation in moisture, soil properties, hardpan, nutritional status etc. on a much smaller scale.
This kind of technology would allow us to improve the quality of our fruits and vegetables as well as products being developed in green houses. While the basic concept is not new, it is critical to develop such technology at very low cost to make it economical to farmers in Bihar.

Use of Space Technology through Hyper Spectral Imaging– Using the advances in Communication and Remote sensing to create a systematic natural resources database and also to research in the advance area of Hyper Spectral remote sensing to compliment the Soil Health Card Program at ground level.
Soil health card system uses ground level periodic monitoring of soil related information(e.g. every 6 months) based on mobile soil labs to farmers in the villages. This measurement can be supplemented by Hyper Spectral Imaging already available in public domain to provide much greater spatial information and complements the information provided by “Soil Health Card”.

Low cost non-invasive sorting systems – It has now become possible to develop low cost sorting non-invasive machine based on advances in CMOS image sensors and LED light source to sort the agricultural yield based on their attributes such as their quality, size and maturity stage. This would allow farmers to get a better price in the market and would also make it easier for them to access the export market.

Traceability systems development – Traceability is a very important factor in today’s fresh produce industry. With more and more export market coming up with rules for food traceability, it is important to develop low cost technology to meet the needs of food traceability from “seed to plate”.

Traditional systems are very expensive and we need to develop low cost system so that farmers in Bihar are able to export their product in International market, which is going to be crucial for Bihar in next few years.

GIS based planning : Today it has become possible to collect information through remote sensing as well as ground survey using Mobile phones (e.g. Android based systems) regarding crop, water resources, soil condition, weather and all other parameters and add them to a Geographical Information System (GIS) to allow easy access to information and use them in planning. Some of this data can be made available on real time basis through wireless sensor network such as Agro-Weather Sensor Network. It would give a big boost to the way we manage and plan our agriculture.

Embedded Systems through Arduino in Patna

As a way to promote innovation based on ICT, I am planning to organize a 2-day workshop around Feb 20 in Patna. This would focus on “Embedded Systems development using Arduino”. An Aruduino kit would be given part of the registration fee of Rs 3000. This would permit the participant to continue working with the kit at their own and create all kind of things including robots. This would be very useful to college going students, specially Engg students but can be useful to anyone with some knowledge of simple programming. Arduino has been making waves all over the world by bringing benefit of embedded system to non-technical people like Artist/Designers/Musicians … It would be very useful for projects of Engineering students, who can not only use this to make working prototype but also start companies around it. Most of my research projects are done using embedded systems.

If this workshop is successful, I can do more advanced level workshop since I teach 4 semester course on related topics. This can lead to a plan to setup an “Innovation Lab” in Bihar to bring benefit of this to all students and young professionals including school students. In many other parts of India, specially south India, many commercial organizations have flourished around projects but in somewhat unethical manner. We do not plan to take that path but provide knowledge and training to individuals and make available facilities that they can avail of to realize their thoughts and bring innovation in focus.

How Japanese got hooked on to Indian technology!

(For those, not aware, Tokamak is a device used to confine very high temperature plasma to produce energy using controlled nuclear fusion. As of now these are not in commercial use but at research stage. But we are getting close, like we have been saying for last 60 years !!!)
When SINP Tokamak installation was going on, Japanese Engineers from Toshiba came to install the machine as it was manufactured by Toshiba in Japan.
Continue reading “How Japanese got hooked on to Indian technology!”

meshprog failure on Fedora 13/14

While using meshprog on recent distributions of Fedora (13 or 14), I found two issues:

1. One issue is related to gpsd daemon trying to grab the device based on USB-UART converter (e.g. FT232 or cp210x). This is discussed in my earlier post at

Meshprog – USB device opening failure on Fedora 11/12

2. Second issue is related to blocking read used in meshprog code. I found that by making the USB device read non-blocking, it starts to work fine. I am not sure if this is the right way to do it. Here are the specific details:

Go near line 115 in meshprog.c file and change the line to open USB device in non-blocking mode:
// f = open(devicename,O_RDWR);
f = open(devicename,O_RDWR|O_NONBLOCK);

After recompilation, it seems to work fine. I have informed the author of the code.

TinyOS-2.x zigbit serial communication

As mentioned in the previous post, due to the fact that we were downloading the Motorola S-record file ‘main.srec’ via Serial Bootloader (using meshprog on Linux), fuse bits were not getting updated. If we had used JTAG interface (e.g using DRAGON Kit) and aurdude, this would have happened. S-record can have application code as well as fuse bit setting, unlike Intel Hex format.

This meant that the default TinyOS setting of 8 MHz for clock rate was not appropriate for this since Meshbeans are set for 4 MHz by default. So to get the Serial Communication working, we had to make the following changes:

1. Check the following  in

tinyos-2.x/tos/platforms/meshbean/hardware.h

=> change clock rate to 4 MHz by

#define MHZ  4

=> Change here the default baud rate, if you need – 57600 works fine for me

#define PLATFORM_BAUDRATE 57600L

2. make sure that:

“The file chips/atm128/Atm128Uart.h contained some wrong constants, which produce  strange results. The correct ones can be found in the ATmega 1281 datasheet and are:
ATM128_38400_BAUD_8MHZ_2X = 25
ATM128_57600_BAUD_8MHZ_2X = 16”

This change would not have effect on 4 MHz clock that we are using but its best to correct them anyway. Anyother Baud Rate combination can also be added.

I must add here that give a choice use a crystal which gives less errors  – e.g. 3.6864 MHz instead of 4 MHz , similarly 7.3728 MHz instead of 8 MHz. (See the ATMega128a manual).

3. With these changes done, now one can try TestPrintf utility. Do read this README file :

http://www.tinyos.net/tinyos-2.x/apps/tests/TestPrintf/

I was first looking at serial data using MiniCom – this was producing some unprintable characters including what is expected. One has to use the Jave client to get the proper message displayed as output of Printf command. I used the following command to get the data displayed right:
java  net.tinyos.tools.PrintfClient  -comm serial@/dev/ttyUSB3:57600

Here /dev/ttyUSB3 is the port to which my meshbean module was connected vis USB port.

This would give the this  output in a loop:

Hi I am writing to you from my TinyOS application!!
Here is a uint8: 123
Here is a uint16: 12345
Here is a uint32: 1234567890