2010年9月14日 星期二

Turn off wifi power off script

while [ 1 ]
do
iwconfig > /data/powersave.log
cat /data/powersave.log | grep mlan0
if [ $? -ne 0 ] ; then
echo "mlan0 not exist"
else
echo "turn off power saving mode"
iwconfig mlan0 power off
fi
sleep 10
done

2010年8月18日 星期三

bluetooth with UART interface

#rfkill unblock wifi
#insmod mlan.ko
#insmod sdxxx.ko
#rfkill unblock bluetooth
#insmod hci_uart.ko
#hciattach /dev/ttyS0 any 115200
#hciconfig hci0 up

2010年8月17日 星期二

Create image

dd if=/dev/zero of=userdata_ext3.img.large bs=1M seek=149 count=1
mke2fs -j -F -m0 userdata_ext3.img.large

2010年8月11日 星期三

bluetooth

http://bluecove.org/images/stack-diagram.png
http://blog.csdn.net/dinuliang/archive/2010/07/07/5717382.aspx

2010年8月8日 星期日

Tar file

;壓檔案 : tar -cf - otg.sh wifi-bt.sh | gzip --best > ../labtool.tgz
; Only view tar files : tar -tvf labtool.tgz

壓檔案
tar -cf /tmp/a.tar bin/11 bin/22 etc/33.bin
就可以呀你想要壓的檔案到同一個tar檔

檢測
tar -tvf a.tar

Using rx tool to transfer file

;Step 1:
; Target board
; # mount -o remount,rw /dev/block/mtdblock2 /system
; # rx a.tgz
;Step 2:
; PC->tera term ->File-> Transfer->XMODEM->Send
;Step 3:
; Target board
; #tar -xvf a.tgz



mount -o remount,rw /dev/block/mtdblock2 /system;dmesg -n1 ; rx a.tgz ;tar -C /system/tmp/ -xvf a.tgz ; rm a.tgz ;mount -o remount,ro /dev/block/mtdblock2 /system