Skip to main content

Posts

Showing posts from 2013

Embedded Linux Tips and Tricks

No Wireless Extension found in iwconfig  If we face issue if  "no wireless extension found" for iwconfig, iwpriv, iwlist, etc. command when wifi module is connected to any ARM board with Linux.      The solution for this is, By default, the wireless extensions are disabled, and users need to enable the CONFIG_WIRELESS=y, CONFIG_WIRELESS_EXT=y  CONFIG_NET_RADIO  option in the kernel configuration (this is the option which enables the choice of radio interfaces in the network driver list). Version magic Error while loading kernel modules   We do get this error if the kernel module version doesn't matches with required version on host. You can find this version in a generated file after kernel configuration  cat include/generated/utsrelease.h  #define UTS_RELEASE "2.6.35.9-ARCH" This Macro gives the module version which we can edit to match to the required version of host kernel. Just edit this line then the version magic error will be avoided.

Generic Software Debug UART implementation for Microcontrollers.

         In this post I am giving code snippet of software debug uart implementation which can be used for any microcontroller. I did not implemented receive functionality as for debug uart it is rarely required. I will post it soon. Now understand the code details in short. What i did is you need to have start bit, a stop bit and data bits. Start bit is High to low transition for one bit period (1/baud rate) and stop bit is low to high transition for 1 bit period. and you need to shift data bits (LSB first) of a character byte in these two bits over a GPIO. For Tx configure port as Output. You can use almost any port pin for this.I have written and tested below code on atmega8 with maximum 9600 baud rate. You can use this uart for debugging purpose if your code is complicated and lengthy. softuart.h ------------------------------------------------------------------------------------------------------------ /*  * File :softuart.h  * Created on: 21-Jun-2013  * Author: Shrenik S. Shikh

How to switch between java versions in linux?

How to switch between java versions in linux? (older or newer version selection). 1. First check what  is the version is already been installed on your host by issuing command $java -version then you will see something like below OpenJDK Runtime Environment (build 1.6.0-b09) OpenJDK Client VM (build 1.6.0-b09, mixed mode) This gives you the current version of java you are using. 2.If you have more than one java versions installed on host then enter following command $update-alternative --config java this will give you the following output 1. /usr/lib/jvm/jre-1.4.2-gcj/bin/java *+ 2 /usr/lib/jvm/jre-1.6.0-openjdk/bin/java Enter to keep the current selection[+], or type selection number: Here the * indicates currently which java version you are using. you can input selection number to switch between two. Thanks, Shrenik. Have a look on my interview with EEWeb online international community

Zigbee irrigation system

  This is a simple approach to see how to implement zigbee based water irrigation control for irrigation system. This is not a difficult thing to get control over motor and electromagnetic valves using zigbee and MCU. I am not going to provide detailed steps how its implemented as code provided is with lot of comments. The idea is we can control the electromagnetic valves and motor depending on the moister content in the farm area and the water level in the water source (water well). Its somewhat advanced technique which requires PC/laptop for manual control. This system is having both manual and automatic control. For manual control you can control valves and motor from remote place, and for automatic control the simple moister sensor like this can be used. That moister sensor will give digital logic output based on whether soil is wet or dry. If its dry and the water level is good then motor and respective valve will get turned on. Now to setup communication between two zigbee module