How to install sun-java6-jdk on Ubuntu / XUbuntu

1. enter Ubuntu Software center

2. Enter Edit->Software Sources->Other Software
Check Parteners Repository
Apply-Close

3. Terminal: sudo apt-get update then sudo apt-get install sun-java6-jdk

4. Uninstall from Software center openJava (optional)

5. sudo update-alternatives –config java
select 2 ( sun java )

6. edit file: ~/.bashrc
sudo gedit ~/.bashrc
add at the end of the file:

export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME

7. reboot (or logout)

Hong Kong Trip

I just got a job offer of a Melbourne company, I will leave for Hong Kong from 29 Nov 2010 till Feb 2011. Going there for new job training and helping them develop ZigBee product. I will try my best to keep this blog alive. but no gurantee… See you Melbourne, I will miss you.

Interface Arduino and Sun SPOT

The Arduino has some functions that Sun SPOT does not have, and Sun SPOT got some functions that Arduino may not have. So we can connect them to make them work together. Take the Sharp dust sensor as an example, Sun SPOT can not generate proper pulse signal to drvie this sensor (maybe it is because KVM is too heavy), but Arduino can.

Both of them have serial communication, so this is our solution.  It is pretty easy to connect:

Sun SPOT

Arduino PRO Mini

D0 Rx
–>
Tx

D1 Tx

–>

Rx

+5 (Optional)

–>

Vcc

GND (Optional[......]

Read More

Sharp Dust Sensor and Arduino

Sharp’s GP2Y1010AU0F is an optical air quality sensor, designed to sense dust particles. An infrared emitting diode and a phototransistor are diagonally arranged into this device, to allow it to detect the reflected light of dust in air. It is especially effective in detecting very fine particles like cigarette smoke, and is commonly used in air purifier systems.

The sensor has a very low current consumption (20mA max, 11mA typical), and can be powered with up to 7VDC. The output of the sensor is an analog voltage proportional to the measured dust density, with a sensitivity of 0.5V/0.1mg[......]

Read More

Experienced a Telit Firmware Bug

Still not sure how I triggered this bug in Telit GM862-GPS module, here below is the strange behavior:

AT
OK
AT+CREG?
+CREG: 0,1

OK
AT+COPS?
+COPS: 0,0,"VODAFONE AUS"

OK
AT+CGMR
07.03.400

OK
AT+CGSN
358278006233159

OK
AT+CMEE=2
OK
AT+CSQ
+CSQ: 20,0

OK
AT#USERID=""
+CME ERROR: operation not supported
AT#USERID?
#USERID: ""

OK
AT#USERID=?
#USERID: (50)

OK
AT#USERID=
OK
AT#PASSW=""
+CME ERROR: operation not supported
AT+CGDCONT=1,"IP","vfinternet.au","0.0.0.0",0,0
OK
AT#GPRS=1[......]

Read More