星期四, 9月 30, 2004

記帳

長榮 3100

油錢 1000
比非多 20
土拖魚羹 95
lab聚餐 1000
ORO coffee 300

dinner 640

關子嶺溫泉旅館 2640
水火洞 lunch 270
筍乾 200
芭樂50
舒跑 20
芭樂 110
油錢 1010

集集 coffee 180
park 60
梅子 800+150+200
香腸 50
販賣機 17
香油錢 100

清水 150

過路費 560

星期二, 9月 28, 2004

唉,別多事了,
既然人家不喜歡,就做好自己的事就好,
做自己喜歡的事,其他人,也不關你的事,
算了吧!

星期五, 9月 24, 2004

二高

關廟出口,往歸仁.....

Sign..

要討論細節,又不准人家把程式寫好。。

那不就還是規格討論。

台灣網路危機處理暨協調中心

http://www.cert.org.tw/news/

Log\Auth.log

scanned from 218.58.67.47 with SSH-1.0-SSH_Version_Mapper. Don't panic.

星期四, 9月 23, 2004

LAB聚餐地點

餐廳:永上海鮮餐廳
地址:金華路四段45號 藥師廟對面,協進國小旁
電話:06-2206691

如何使用Emule同時保障自身安全

★ [教學] 如何使用Emule同時保障自身安全?
「哎!我被學校抓到,網路禁用一個月…」
「你這算什麼,我被學校記一隻大過耶!」
可怕嗎? 這是有辦法避免的!
作者:佚名

[適用版本]
官方版 eMule 0.27 以上版本
以官方版 eMule 0.27 以上版本修改的 eMule MODs
應該都有支援eDonkey、cDonkey、MLdonkey、xMule、
OverNet、Shareaza 我沒用過不確定
將 IpFilter.dat 內的資料加入防火牆亦可以達到同樣效果

[使用方法]
1. 舊版 eMule:放置於 eMule 安裝目錄下,或覆蓋檔案
 新版 eMule:覆蓋 config 目錄下原本的檔案
2. 設定 → 防護 → 勾選 [過濾伺服器] or [過濾壞的IP]
or [IP過濾器]←依版本不同,會有不同翻譯,請自行確認

[檔案連結] 請將檔名改為 IpFilter.dat
IpFilter

[簡介]
IPfilter是過濾不良ip
所謂的不良,就是對自己有害
所以像是國外的好萊X公司或其它電影、軟體等會抓人的
大公司的ip就可以擋掉。

強烈建議大家使用(尤其是學網的人)

疾風病毒

如何判斷已中毒:
1.網路變的很慢,或是沒有網路動作但網路卡卻不停閃爍。
2.電腦出現RPC錯誤訊息並警告將於 60 秒後自動關機。
3.執行 [工作管理員] 點選 [處理程序] 查看是否有下列程式正在執行
msblast.exe若有發現此檔名則是中了"疾風病毒"
4. Windows 2000作業系統
C:\> cd \winnt\system32\winsC:\> dir
dllhost.exe
svchost.exe (若出現此兩個檔案即已中了"疾風變種病毒")
5. Windows XP作業系統
C:\> cd \windows\system32\winsC:\> dir
dllhost.exe
svchost.exe (若出現此兩個檔案即已中了"疾風變種病毒")
請將dllhost.exe及svchost.exe2個檔案刪除

星期三, 9月 22, 2004

Notes : problems on Alice's .. (uclinux)

1.在副程式call vfork造成parent process hang.
2./usr內程式太多造成boot時core dump - single user mode

NB 無線往卡

apt-get install wireless-tools

設定網路組態,並重新啟動網路!
# vi /etc/network/interfaces
加入 "iface wlan0 inet dhcp"
(如果您的IP並非dhcp取得,請自行修改符合設定)
# /etc/init.d/networking restart
# ifconfig eth0 down
重新啟動網路!並讓無線網路裝置生效!


編譯並安裝驅動模組:

  為了要編譯驅動模組,我們必須安裝 kernel-package 及 debhelper 這兩個套件:

代碼:
apt-get install kernel-package debhelper

  然後,進入 Kernel Header 的目錄中,並進行編譯:
  (如果是 Kernel 2.4.x,則進入 Kernel-Source 目錄,並進行編譯。)
代碼:
cd /usr/src/kernel-headers-2.6.7-1-386/
make-kpkg modules_image


Intruder's log...

以下在 /var/log/auth.log..

Sep 21 20:07:55 debian sshd[909]: Illegal user test from 218.104.55.15
Sep 21 20:07:56 debian sshd[911]: Illegal user guest from 218.104.55.15
Sep 21 20:07:58 debian sshd[913]: Illegal user admin from 218.104.55.15
Sep 21 20:07:59 debian sshd[915]: Illegal user admin from 218.104.55.15
Sep 21 20:08:00 debian sshd[917]: Illegal user user from 218.104.55.15
Sep 21 20:08:05 debian sshd[925]: Illegal user test from 218.104.55.15


poor QNX

QNX真是可憐,
最初的時候,他做PC的OS,做得比DOS好太多了,
可惜,因為價錢(賣得太貴),所以IBM PC用DOS,
造成DOS成為標準的PC OS(其實這也要靠盜版的幫忙)。
沒關係,QNX就專攻embed市場(market就小得多了)。
可憐,最近embeded市場雖然變大,但是linux是free的,
雖然QNX的performance和方便都比linux好,
但是還是因為price,使用linux的人還是比較多。

現在,QNX要推出roylty free的version。
可憐,如果他當初就這樣,
QNX可能是現在的MS吧。
現在可能不會有Windows,因為QNX比DOS好很多(當初)。

TODOS - today

1.WuJian - hyperterminal 2.6_2
2.Notes : last night's meeting with Ed on Web.
3.Notes : Cxu modification flow.
4.Alice : vfork (do) hang.
5.請假 - SAT.

星期二, 9月 21, 2004

果然....

正如Jary所預測,SUNDAY的行程就是”鳥獸散”。
因為突然有3人有事要先走,先到。
所以....

目前考慮行程有
1.走馬賴
2.高雄
3.曾文水庫

usb cf reader on NB : OK

apt-get install hotplug

就這個command,然後

mount /dev/sd1 /mnt/usbcfreader <--是自己create的

就OK。

不知道為什麼Server卻不行(不過Server是Try eBay cf disk)。

星期一, 9月 20, 2004

debian cd image

TODOS - today

1.Modify HydrofanFail protocol.
2.NFS on win2k
3.Debian unstable.
4.Bill - Credit card. Loan.
5.uClinux driver - DIO : wrong initcode

6.Ask if Thu 7:30 could arriver at Threater -.. Movie Preview.

星期日, 9月 19, 2004

from greenfly : usb storage driver for linux

How to set up a removable USB Drive





Be sure the check out the 2004-04-22 update at the bottom of the page!

For my birthday this last year, I received a USB laptop drive enclosure. Once I upgraded my hard drive in my P2110, I had its 20Gb hard drive to use in it. I decided to set up a FAT32 partition on it, spanning the full 20Gb, and now have set up hotplug and autofs to automatically mount the usb drive when I insert and access it (and umount it when it's idle).


Getting information and setting hotplug up

So, first thing, is for hotplug to be installed. In Debian it was as simple as running apt-get install hotplug. Hotplug isn't necessarily easy to configure, but following some tips on the 'net, I was able to figure it all out. The first step, is to plug in the USB drive, and scan through the logs to make sure it works. Hotplug recognized that it was a usb hard drive, and made sure my usb-storage module was already loaded.


Jan 19 15:46:27 clover kernel: hub.c: new USB device 00:02.0-1, assigned address 4
Jan 19 15:46:27 clover kernel: WARNING: USB Mass Storage data integrity not assured
Jan 19 15:46:27 clover kernel: USB Mass Storage device found at 4
Jan 19 15:46:31 clover usb.agent[10819]: kernel driver usb-storage already loaded


USB drives work as regular scsi hard drives as far as we are concerned (and requires sd_mod to be loaded). And we could just mount the device that is created (/dev/sda1 for me) and be done with it. I wanted it to automatically mount when I plugged it in, and umount when I unplugged it. To do this, first we need some information from /proc:

/proc/bus/usb/devices will show information about the various usb devices on the system. For instance, here is a snip from the file when my usb drive is plugged in:



T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0

D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1

P: Vendor=05e3 ProdID=0702 Rev= 0.02


S: Product=USB TO IDE

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 96mA

I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms


Yeah, it's a lot of gibberish, but there's useful information in there for setting up hotplug. I have highlighted the parts that are of interest to us. You can configure hotplug to do certain things when certain devices are plugged in. It already has its own scripts set to run when it detects generic usb-storage devices, but I wanted something specific. To do this, you need to edit the /etc/hotplug/usb.usermap file:


# usb.usermap file
# This is autogenerated by update-usb.usermap program
# Note: you may use /etc/hotplug/usb/*.usermap
# usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass
#bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
usb-storage 0x00f 0x05e3 0x0702 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00


In the line I added above, there are only 3 fields of interest, the match_flags, idVendor, and idProduct. I noticed from the usb.distmap file that the match_flags field for usb-storage was 0x00f. Now, the idVendor value I got from that /proc file I listed above. It says "Vendor=05e3" so I put in 0x05e3 in the second field. Likewise I took the "ProdID=0702" and put in 0x0702 in the idProduct field. The rest doesn't matter (the first three fields are enough to match this device) so I just put in 0x00 for those.

This line in usb.usermap tells hotplug to run the /etc/hotplug/usb/usb-storage script whenever it sees that this device is plugged in. That script can then load modules, or run other programs (including setting up programs to run when the drive is removed). I found some examples on the net and created my own that would automount the drive:



#!/bin/sh
case "$PRODUCT" in
5e3/702/2) # FireXpress usb hard drive
/bin/mount /mnt/usbdrive
# set up what to do when you remove the drive
echo -e '#!/bin/sh\n/bin/umount /mnt/usbdrive' > $REMOVER
chmod a+x $REMOVER
;;
esac


If you want to see what kind of enviroment variables are present when this script is run, you can insert a "set >> /tmp/settings" line above the case statement. Reading through that file, you can see what $PRODUCT is set to for your product. In my case it was set to "5e3/702/2". I then set up the case statement to mount this usbdrive when that device is actually plugged in (my fstab entry established the mounting of a /dev/sda1 vfat partition on /mnt/usbdrive). There is another environment variable, $REMOVER, that specifies the name of a script that is run after the device is removed. This script is empty by default, so I echoed in the umount command I wanted to use when I removed the drive.

I then ran chmod a+x /etc/hotplug/usb/usb-storage to make the script executable. Once I restarted the hotplug service with /etc/init.d/hotplug restart I then could plug in the drive and see that /mnt/usbdrive had been mounted by running df. When I unplugged the drive, the drive would then be umounted.

Not the best solution

Now, there are some problems for this. Namely, the drive isn't being umounted until it is already removed. This could result in filesystem corruption over time. The solution is to use autofs to mount the device on demand, and then umount when idle.

Autofs saves the day

First, I installed autofs with apt-get install autofs. Then I modified /etc/auto.master and added an entry for my removable drive:


# $Id: auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(5).
/var/autofs/misc /etc/auto.misc
/var/autofs/net /etc/auto.net
/var/autofs/removable /etc/auto.removable --timeout=2


That last line tells autofs to mount any of the removable devices I will specify in /etc/auto.removable under /var/autofs/removable, and to umount them after 2 seconds of idling. I then created the /etc/auto.removable file:


usbdrive -fstype=vfat,uid=1002,gid=1002,umask=002 :/dev/sda1


This file sets up a mount point which will end up being /var/autofs/removable/usbdrive, the mounting options to use, and which device to mount. Now, all of this happens outside of /etc/fstab, so I removed my entry for my usbdrive from /etc/fstab, and also removed the /mnt/usbdrive directory. I decided what I would do instead is have my hotplug script create a symlink to the autofs mountpoint when the drive is inserted, and remove the symlink when the drive is removed. That way, I will only deal with /mnt/usbdrive and not worry about any /var/autofs directories. The new and improved /etc/hotplug/usb/usb-storage is the following:


#!/bin/sh
case "$PRODUCT" in
5e3/702/2) # FireXpress usb hard drive
ln -s /var/autofs/removable/usbdrive /mnt/usbdrive
# set up what to do when you remove the drive
echo -e '#!/bin/sh\nrm /mnt/usbdrive' > $REMOVER
chmod a+x $REMOVER
;;
esac


Now, I can plug in my drive, and see that /mnt/usbdrive is created. After 2 seconds, autofs will umount the drive. You can monitor /var/log/syslog to watch this happening:


Jan 19 16:24:35 clover automount[14059]: mount(generic): calling mkdir_path /var/autofs/removable/usbdrive
Jan 19 16:24:35 clover automount[14059]: mount(generic): calling mount -t vfat -s -o uid=1002,gid=1002,umask=002
/dev/sda1 /var/autofs/removable/usbdrive
Jan 19 16:24:36 clover automount[14059]: mount(generic): mounted /dev/sda1 type vfat
on /var/autofs/removable/usbdrive
Jan 19 16:24:39 clover automount[14066]: running expiration on path
/var/autofs/removable/usbdrive
Jan 19 16:24:39 clover automount[14066]: expired /var/autofs/removable/usbdrive


As you can see, the drive unmounted seconds after the command finished, since it had been idling. It would now be safe to remove.

For the future, I am planning on setting up a similar system for my digital camera (which appears as a normal usb storage device as well) to not only automatically mount the camera, but also sync up any photos on it.

iPod-specific configuration

First of all, a caveat. I don't actually own an iPod (if you want to remedy that, email me) so all of this is based on a 3rd generation iPod configuration I helped a friend, whiprush, set up.

The configuration is really just about the same, with a few distinct changes. For one, the Product ID is different on the iPod, so /etc/hotplug/usb/usb-storage would look something like:



#!/bin/sh
set >> /tmp/settings
case "$PRODUCT" in
5ac/1201/0) # Apple iPod
sleep 5
ln -s /var/autofs/removable/ipod /mnt/ipod
# set up what to do when you remove the drive
echo -e '#!/bin/sh\nrm /mnt/ipod' > $REMOVER
chmod a+x $REMOVER
;;
esac


Make sure to make this script executable. As you can see, the main thing that changed from the previous usb-storage script is the value of $PRODUCT. Also added was a sleep 5, as the iPod seemed to take a bit longer to initialize than my regular usb drive. If this script doesn't work for your iPod, look through /tmp/settings and see what PRODUCT= is set to.

This script will create a symlink, /mnt/ipod, to the autofs directory that you will then set up. When you unplug the iPod, the symlink will be deleted.

Now to edit autofs settings. First add the following line to /etc/auto.master:


/var/autofs/removable /etc/auto.removable --timeout=2


Now edit /etc/auto.removable:


ipod -fstype=vfat,uid=1000,gid=1000 :/dev/sdc2


If your iPod partition sets itself up as something other than /dev/sdc2 (check /var/log/syslog or /var/log/messages if you don't know), then simply change the /dev/ entry to match it.


Now, restart autofs and a symlink, /mnt/ipod, should be created that then links to the autofs directory. When you access that directory, your iPod should become mounted. It will then umount after 2 seconds of idle time.

IEEE1394 Support

If you have a IEEE1394 card in your Linux system, you can add some extra configuration so that it will work the same as when you plug it in USB.

First you need to create an /etc/hotplug/ieee1394 directory. The iPod registers as an sdp2 device, and you will need to create a script at /etc/hotplug/ieee1394/sdp2 to handle the device:


#!/bin/sh
set >> /tmp/settings
case "$GUID" in
000a27000252a1ee) # Apple iPod
sleep 5
ln -s /var/autofs/removable/ipod /mnt/ipod
# set up what to do when you remove the drive
echo -e '#!/bin/sh\nrm /mnt/ipod' > $REMOVER
chmod a+x $REMOVER
;;
esac


Unlike the usb-storage script, the iPod as an ieee1394 device doesn't have a PRODUCT environment variable. Instead we use GUID to identify it. Now restart hotplug, and try plugging in your iPod to your IEEE1394 port. The /mnt/ipod symlink should be created, and accessing it should mount your iPod.

UPDATE 2004-04-22

I have modified this hotplug script rather heavily since I got started, and thought I might share some of the updates on this page.

I realize that hard-coding the scsi device doesn't work for anyone who might use multiple usb devices at once. The difficulty in generating the scsi device on the fly is that the kernel doesn't directly provide access to determine which scsi hard drive a certain GUID was assigned. Really the only way to do so required a hack that would read certain /proc entries along with /var/log/syslog. I call these pair of hacks usbguid2sd and sd2usbguid. As the names suggest, these scripts convert between a usb GUID and a scsi drive, and back again.


Using these scripts I can create a default autofs setup for sda1, sdb1, sdc1 and sdd1 and then map new usb-storage devices on the fly. The following hotplug script will use usbguid2sd and do special things for recognized usb drives, and otherwise create a /mnt/ symlink:


#!/bin/sh
DEVICE=`/usr/local/sbin/usbguid2sd $PRODUCT`
set > /tmp/settings
case "$PRODUCT" in
# FireXpress usb hard drive
5e3/702/2)
ln -s /var/autofs/usb/$DEVICE /mnt/firexpress
# set up what to do when you remove the drive
echo -e '#!/bin/sh\nrm /mnt/firexpress' > $REMOVER
chmod a+x $REMOVER
;;
# Olympus C750 camera
7b4/105/1)
ln -s /var/autofs/usb/$DEVICE/dcim/100olymp /mnt/camera
echo -e '#!/bin/sh\nrm /mnt/camera' > $REMOVER
chmod a+x $REMOVER
export DISPLAY=":0.0"
su greenfly -c /home/greenfly/bin/eterm_camera_sync
;;
# Attache usb key drive
ea0/6828/110)
ln -s /var/autofs/usb/$DEVICE /mnt/attache
ATTACHE=`diff /home/greenfly/.gnupg/secring.gpg /mnt/attache/.gnupg/secring.gpg`
if [ "$ATTACHE" = "" ]
then
killall xlock
echo -e '#!/bin/sh\nrm /mnt/attache\nsu greenfly -c "/usr/bin/X11/xlock -display :0.0 -mode blank"' > $REMOVER
else
echo -e '#!/bin/sh\nrm /mnt/attache' > $REMOVER
fi
# set up what to do when you remove the drive
chmod a+x $REMOVER
;;
# default
* )
ln -s /var/autofs/usb/$DEVICE /mnt/$DEVICE
# set up what to do when you remove the drive
echo -e "#!/bin/sh\nrm /mnt/$DEVICE" > $REMOVER
chmod a+x $REMOVER
;;
esac



You might notice I did something extra to the attache device. It is a usb keychain drive I carry around and I thought it might be slick if it killed xlock when I inserted it, and started xlock when I removed it. That section of the script compares the gpg secret keyring on the device with the one on the laptop (a crude form of authentication) and then if they match, it kills xlock. This way someone can't just plug in any attache drive and unlock my screen.



有關水火箭的飛遠比賽`...

全部都在推力和輕量化作文章,
我想”滑翔”的能力也是很重要的,
如果能夠加強滑翔力,要”滑”過100m應該是很容易的事,

適當配重,飛高,增加翼展,

usb disk

usb-storage
ide-core
hotplug

from Moto

花了一些時間追蹤 USB 裝置的 hotplug 流程, 將其記錄下來

以下是 USB Storage 的掛載流程:
1. kernel 偵測到新的 USB 裝置, 依據 /proc/sys/kernel/hotplug 內容呼叫 應用程式 /sbin/hotplug, 參數一為 usb, 參數二為 usb.agent 參數

2. hotplug 呼叫 /etc/hotplug/usb.agent

3. usb.agent 會依據 $MODULE_DIR/modules.usbmap 作 USB 裝置參數設定

然後 執行兩個 case

add)
載入驅動程式( /etc/hotplug/hotplug.functions, 其中 load_drivers()
最後呼叫 updfstab)

設定 storage device 的 symlinks( man devlabel, /etc/sysconfig/devlabel)

remove)
移除驅動程式
updfstab ( man updfstab, /etc/updfstab.conf )

5. updfstab 會依據 /etc/updfstab.conf 及系統偵測到的裝置, 自動設定

/etc/fstab

由以上流程可知, 若要讓一般使用者能夠 mount 隨身碟,需設定

/etc/updfstab.conf.default, 讓 updfstab 產生 /etc/fstab entry 時, 加上

必要參數, 並且動態產生 /mnt/memstick 掛載點, 目前 updfstab 並無法根據設定

檔設定 mount 參數, 而是寫死在程式碼中

- 預設 usb storage 的 mount 參數為 "noauto,owner,kudzu"

- kudzu 表示這個 entry 是 updfstab 產生

- owner 表示可以讓 console 登入的使用者 mount, unmount, 因為在 console

登入的時, 該 device 擁有者會變成該使用者

- 透過 /etc/security/console.perms

設定 =/mnt/memstick* 讓一般使用者可以直接存取 /mnt/memstick*
由以上流程:

Redhat 9 不需設定就可以偵測 USB 隨身碟, 並設定好 /etc/fstab

一般使用者只要 mount /mnt/memstick 就可以掛載, 並存取 /mnt/memstick

但是因為 updfstab 對於 USB Storage mount 參數是寫死在程式中, 因此對於

中文檔名需要加入 iocharset=cp950 無法藉由設定達成, 因此需修改 updfstab

updfstab 其所屬套件為 kudzu, 編譯 kudzu 需要安裝 newt-devel, dietlibc

加入以下 patch:
------------------------------------------------------------------------------
--- kudzu-0.99.99/updfstab.c.org 2003-02-21 00:48:31.000000000 +0800
+++ kudzu-0.99.99/updfstab.c 2003-09-29 22:13:06.000000000 +0800
@@ -740,7 +740,7 @@
!(strcmp(addition->device->type->name, "cdrom") &&
strcmp(addition->device->type->name, "cdwriter") &&
strcmp(addition->device->type->name, "cdrw")) ?
- "noauto,owner,kudzu,ro" : "noauto,owner,kudzu",
+ "noauto,owner,kudzu,ro" : "noauto,owner,kudzu,iocharset=cp950",
0, 0);
}

------------------------------------------------------------------------------

強制掛載參數 iocharset=cp950, 這個方法非常 dirty ....

reference:

1.http://www.spinics.net/lists/rh-devel/msg00811.html
2.http://connecteduser.com/forum/viewtopic.php?t=111

Linux Question Forume

註冊了....
# lspci -vvv
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.: Unknown device 8180 (rev 20)
Subsystem: Allied Telesyn International: Unknown device c106
Control: I/O Mem BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap 66Mhz- UDF- FastB2B ParErr- DEVSEL=medium TAbort- TAbort- MAbort- SERR- PERR-
Interrupt: pin A routed to IRQ 9
Region 0: I/O ports at 1000 [size=256]
Region 1: Memory at 10800000 (32-bit, non-prefetchable) [size=512]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1 D2 AuxCurrent=375mA PME(D0-,D1 ,D2 ,D3hot ,D3cold )
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

# cardctl ident
Socket 0:
product info: "Realtek", "Rtl8139"
manfid: 0x0000, 0x024c
function: 6 (network)

wli cb b11

# lspci -vvv

01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.: Unknown device 8180 (rev 20)
Subsystem: Allied Telesyn International: Unknown device c106
Control: I/O Mem BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap 66Mhz- UDF- FastB2B ParErr- DEVSEL=medium >TAbort- SERR- Interrupt: pin A routed to IRQ 9
Region 0: I/O ports at 1000 [size=256]
Region 1: Memory at 10800000 (32-bit, non-prefetchable) [size=512]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1 D2 AuxCurrent=375mA PME(D0-,D1 ,D2 ,D3hot ,D3cold )
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

# cardctl ident
Socket 0:
product info: "Realtek", "Rtl8139"
manfid: 0x0000, 0x024c
function: 6 (network)


星期六, 9月 18, 2004

rl8180

  • Unpack the driver and edit the Makefile, make sure your INCLUDEPATH is correct. You will also need to edit line 59 in r8180_pci_init.c. Remember the vendor and device id you saved from watching the kernel log, the first value is the vendor, second is device, change them accordingly. It should look something like this:

    { 0x1186, 0x3300 /*0x8139*/, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },

    Compile the driver, type make at the prompt. Now cross your fingers and do a insmod rtl8180_24x.o. This worked for me and I got the driver to load.

rtl8180 cardbus install

At the shell prompt, type make. The drivers will build themselves. If there are any problems making the drivers, open up the Makefile and check the kernel version settings on the first few lines.

Now open up the wlanup file.

Uncomment line 5 (remove the #) and change the SSID to the SSID of your network.

Uncomment line 8 and set the ssid2scan to your network's SSID. Uncomment line 9 and set the networktype to infra (unless you really are using adhoc). Save your changes.

Now eject the card

cardctl eject
and plug it in again.

From the directory where you unpacked the drivers, type

insmod -f rtl8180_24x.o

You will get a warning - ignore it.

Now run the wlanup script found in the driver package. Your card should now appear when you type ifconfig. You should configure your IP address at this point. If you use DHCP, just type "dhcpd wlan0". Try pinging google.com. You should get replies back. If so, your card is working!

Now copy rtl8180_24x.o to /lib/modules/YOURKERNELNAME, where YORUKERNELNAME is the name of the directory in /lib/modules.

Then copy the wlanup and wlandown scripts to /sbin.

星期五, 9月 17, 2004

1st software preview..

spam source map


這是postini的spam source統計,
看來台灣在這個領域算是名列前矛。

星期四, 9月 16, 2004

TODOS - today

  1. Release 2.7 : hyperterminal document
  2. Release 2.5 : all document
  3. Modify DO driver code, include all the do point.
光是補2.5, 2.7的document就花了一個早上...,

Problem - system hang - uclinux - so far

當機日,uclinux develop到現在,就剩下down機的部分了...
  1. Ad + Usb hang (file lock)
  2. qspi cs pin remove. (M)
  3. file copy hang - core dump (to ramdisk)
  4. web connection hang - core dump (temporary solved by reduce ramdisk to 512)
  5. snmp connection for a period of time, hang - core dump.
附計一些其他的
  1. Hydro No8 Init State
  2. include all DO point in do driver

1st Trial - Lispire (Lindows)

Follow PIL's post, download a trial version Lispire. install it on VPC.
Install process is smooth. just one click, no need to select any package.

Usage:

Similar to Windows, try to avoid using Console (Terminal). try to convince user to use GUI. .. maybe greate for novice, but for linuxers, it's a little bit......

Installation time is short (compare to most other distros), because it install the minimum packages only, only put an icon on the menubar.

It start download and install the package when user 1sttime executing the package.
The download and installtion process is smooth.. just wait, no need to choose anything.

.. So you know it's highly depend on internet access.

And.. this post is input in Lispir's browser.

New Search Engin : A9

新的搜尋引擎,Amazon,蠻有趣的。不過竟然要註冊。
...已經註冊了。

星期三, 9月 15, 2004

TODOS - today

1.Design Guidline for DcDcBreaker. (OK,append on problem.doc)
2. Changes from 2.1 to 2.6 - India want (OK, combined 3 doc)
3. 8 D report for DcDcBreaker
4.Reply Ok on OnGoRegisteration.
5.uClinux Hang on copy massive files.
6.Send hyperX.doc to chad. (OK, include cfg and tools)
7.ATM 3100 (ok:11:40)

星期二, 9月 14, 2004

different concept

兩種不同的觀念:
1.將一件事交給很多人檢查,所以每個人除了要作自己的事,還要做很多檢查其他事情的工作。
2.將事情區分清楚,每一個人負責做好自己的部分。

所以1的話,每個人的事都做不完,也因為事情多,所以檢查的事也就不認真在座,但是因為沒時間,所以自己的事也沒作好。

2的話,每個人都要專注的將自己的工作做好。所以focus的地方少,容易專精,自己工作得時間也多。

那要如何防止人為的意外,疏忽?

1的話就簡單,反正哪裡出問題,就列在表上,要求多一個人檢查,因為"總部可能每個人都錯馬"。

但是2就需要比較好的流程,加入"查核"單位,專注於查核的動作,或是以一關檢查上一關的方式達到檢查的目的。這就需要花腦筋了。

簡單的說1的話就是設計一個表格,找100個人來簽核,這樣不救有100個人做檢查工作?


Sign..

應該要說明原因才對,只有軍隊才是不問原因的(現在好像軍隊也要求合理化了)。
也就是說,要說"我為什麼要",而不是說"我就是要"。
所以當這一句話出現的時候,也就沒有什麼討論的餘地了。

所以基本的技術能力還是最重要的呀...

So different

設計表格的人通常是不需要填表格的人,所以表格的內容通常都很多。
如果他們自己要填,他可能就會一一斟酌每個item是否需要了

真是奇怪的公司

這一邊急著要,那一邊要等一下,另一邊還在懷疑是不是有問題。
她們自己內部沒有溝通的管道?

TODOS - today

1.Modify Modbus according CxT's request.
2.Rail - find TotalNumber and delete unused position.
3.Wujian - analysise SROM data send by Orgxn.Han
4.Write document - 2.1, 2.7, 2.8 difference for DxS India , to Chxd, request by Lxrry

RSS arggregator - blogline

原來用的Feedester在加入?的Feed後竟然無法動作(List all feeds)。
只好設法再找其他的。

原來Blogline比Feedster好,不會出現亂碼,subscribe的方式也容易的多,只要將他blogline提供的subcribe- link bookmark起來,以後看到想要subscribe的site,點選這個bookmark,就會自動取得資料,進入subscribe page。


星期一, 9月 13, 2004

INTERRUPT

早上的忘了,
下午
1:48 - Wu-Jixan, ask about hyperterminal cannot connect to 2.6.
1:55 - same question.
回KxN的mail - write SYSTOOLS document, modify James' parameter config file.
Phone call with CxT, Liao - so many things to modify.

Never Learn...

哪裡錯就改哪裡。

發生過這麼多事,還是一樣學不會。
總是想著 ”怎麼方便,怎麼改”。
這樣一天到晚都在做”補洞”的動作,

TODOS - today

1.HydrogxnFxnFail - Delay confirm (no modify on cxu) - Cancel.
2.CxT Modbus - Error on alarms
3.DxS India - ACSW Index Error
4.1800 - block out Empty Rail Noise message
5.KxN problem -mail
5.1: answer the question.
5.2: write document on SYSTOOLS
5.3: get the 7200 paramters setting.
6.Mail CxU board to CxT

音樂CD線上購物

已經用gmail註冊了

星期五, 9月 10, 2004

又住院了..

今天晚上去看中醫時,接到岳母的電話,岳父又肚子痛了。
我們把他接到忠孝急診,
一樣,是腸沾黏。
不過這次狀況沒上次嚴重。
還好。

今晚雨下得很大,所以急診的人很少,都是酒醉的。

紀錄一下

Max,
Tina
Mon, Tue - Microchip class.

Higher Grade CAN - FlexRay

大概是這樣

FlexRay - High
CAN
LIN - Low

設計上的混亂

因為detection board的功能不乾淨,
我們只做”綜合性”的版子,而不是偵測的資料區分。

所以會有很多detection board偵測相同的信號。
當版子拼在一起,就會發生...
  1. 要使用A的部分,B的部分不使用。
  2. 先用A的,數量多時再用B。
  3. A的這個部分不使用,用B的部分。
  4. A和B的這個部分都要使用。
這樣的問題。
而我們的系統,又很少只有接一個版子。

可以想見各種configuration的混亂狀況。

這就是沒做好系統分析的結果。
可是系統分析會有幫助嗎?
記得當初設計架構的依據是:作一快minimum (basic) requirement的board,所有的系統都要用他。如果有不足,再新增加其他的版子。

但是當不足時,新設計時會有以下情況:
  1. 為了配線,所以basic board的部分就不用了,改用增加的部分。
  2. 因為增加的部分很少,為此新增一塊並不划算(cost),所以新設計一塊,將新需求加進去。
  3. 因為增加的部分很多,所以basic的部分都不使用了,這樣還使用basic的部分,很不划算,所以新設計一大塊,將basic的部分加入。
這樣隨意拼裝的結果,就是所有的版子都不能共用,都不會是剛好match require。
同時造成software configuration的大混亂!

TODOS - today

1.Debug : 2.8_1, Breaker Rail index mass.
2.Pack and Send board to CxT.
3.Test time accuracy of system()
4.Find a useable toolkit for wxWidget (Minor)

Try Translate with the aid of automation...

Go Native

傑夫 和 Miguel 最近評論了 Java的效能 和 Net的輕便,都沒有提到關鍵的缺點在Java 的argument。

9 年前我第一次充滿幻想的執行Java 。現在,我天天,悲哀的工作就是建立Enterprise Java 程式。我想我應該夠資格與當局談談有關Java 的缺點。兩位原文件的作者提出要求' 解答' 。我認為, 所有軟體都是為End User而作, 並且為開發商提出解決方案。開發者迅速地創造可攜式程式的Toolkit是必要要考慮企業和用戶需要。但Kernel並不簡單, UI 不是可攜的, Programmer的工作是為End User撰寫程式。Developer要克制他們的自尊心和自我為客戶著想,做用戶想要的app 。

對 魚Performance的問題, 有哪些User了解轉換到其他VM的意義? 多少系統admins 知道調整kernel/OS 對Java VM會有一點影響? 我不喜歡告訴管理員和用戶, 他們必須設置記憶和Thread參數讓他們的VM 能使用我寫的app 。Windows3.0 為上百個App解決了記憶體管理問題,這應該就是他成功的原因。虛擬記憶體在Mac OS 8.0是固定的, 但是至少Mac 用戶可以有簡單的方法設置記憶體。調整VM 的記憶和螺紋不是僅有毛病的設計, 它的徵兆是障礙對寬收養。少量用戶將選擇正義工作以OS 代替一個要求熟練粗修得到它正確的app 。

Java 的可攜式的UI,Swing, 不是個解決方案。Java 由開發商迅速採取了, 並且這是選擇語言為企業發展。, 1995 年它被譽為桌面軟體的解決方案, 它仍然是在一些圈子(SUN), 但命名一桌面app 嗎? Limewire 是我曾經看了在一名正常用戶的桌面上的唯一的app, 並且那幾乎不是具有影響力的程式。問題是, 開發商應該做app 滿足終端用戶, 並且我認為用戶rejected Java UI 因為這是不好的時作。CHI 專家主張混合UI 規則嗎? 什麼是可能運行在任一個桌面上app 的真實的好處, 如果用戶必須經常停留考慮什麼他或她必須做做app 做某事? 肯定公司可能交換它的用戶從一個桌面到另一個, 並且app 跑同樣, 但那不是共同。生產力更將下跌因為用戶與電腦談判更多規則當工作。

一般的用戶不交換desktops/OSes 。用戶不需要運作得到處的接口。用戶需要運作與他們的桌面的接口。Mac 用戶是臭名遠揚的為這, 但窗口的用戶感覺同樣方式太-- Java 未成功在或者桌面上。用戶想要apps 表現像其它apps 和戲劇很好與桌面。我不意味神色& 不感覺。看起來像一個聯合桌面app 的Java apps 延遲用戶的失望當他們的老鼠、菜單, 或鍵盤行動不工作如同它做以其它apps 。

微軟和蘋果電腦公司 had/have 非常完全當地捆綁, 但平衡他們無法, 一部分, 因為太陽破壞不依照太陽的計劃的所有Java 實施。我有聽見太陽講話地精Java 為創造解答為它是基於地精的Java 桌面。我不批評太陽-- 搖擺接口對它是完善是當地環境, JavaOS 。我是請與單音VM 。它似乎表現很好以我的Linux OS, 但我肯定它將失敗如果定調選擇成為要求跑app 。至於GTK # 捆綁, hurray! 我GTK # apps 是難區分的從我的其它apps 。我不考慮怎樣他們被做了; 他們運作。

如此對單音開發商我說, 不迷路從您的道路, 因為終端用戶是在您的解答中心。對Java 開發商, 二個詞。去當地人。

星期四, 9月 09, 2004

gladw for win32

WIN2000, SP 4, update fail

VPC用online update,安裝SP4。
結果無法copy autochk.exe和xxx.exe。
選掠過,還是無法安裝,只好放棄。

重新開機後,再online update,又重新安裝SP4,但是他以為我已經裝過了,所以重開機後autochk.exe還是找不到,關機時會出線demodialog.exe無法結束的message。

真差。

sign...

別人要做的事,當然可以說些高調。
要是自己要負責,就不會這樣說了。

How much times will it take ?

要做到XXX,OOO,...
但是
要怎麼作,我也不知道,這是要討論的。
所以
先做,再來改。

...1 week pass...

喔,這個要有XXX。那個要加上OOO。還有要分,,
// 但是,這個有點不可行,因為sss...,而且當初你說....
我的意思是...,就像.....。OK?
// 只有回去翻修

... 1 week pass..

repeat above.

結果,做出來的東西也沒什麼用

Virus

今天(應該是昨天晚上開始)。
PcCilline的畫面又跳出來了。
Server和VPC都中毒了,LOVEGATE。
還好自己的pc沒有(why?)。

VPC的很誇張,重新開機後才scan到的,在share的folder被host scane到,
竟然出現一些rar檔,還很大,就是這些自動產生的rar當有讀。

filename是user.rar, Document.rar... etc。

沒辦法,只有山hd,拿以前的backup hd來run。

第一件事:Update。

Proof - not my fault

搞了這麼久,總以為是我的問題,
用另一個485接著monitor,發現是他的問題。
Monitor Log都正常,但是他卻掉字(1200),多字(19200)。
配合示波器更可以證明。
所以說,用VB的都不太可靠。
VB是快速上手,其他,不要太要求。

竟然是VB,為什麼Option不作多一點?
只是拉一些control到form上而已呀,為什麼寫成這樣?

星期二, 9月 07, 2004

作protocol實在是無聊的事

尤其定protocol的一方有點差的時候,
加上提供的測試軟體有點兩光的時候,
加上定的規格有點嚴的時候。

作protocol真是最無聊的事。

蠢呆了的debug方法

真是蠢呆了的debug方法:
眼睛注意著error number,一但增加就按下print screen鍵,
再用小畫家看內容。

天哪,這還是用VB寫的程式呢。

無法移除...

移除軟體之後,uninstall還是出現,而且無法刪除時

登錄編輯器
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
每一個項目都是「新增/移除」中顯示的軟體,
將無法刪除的item刪除,
就會發現到該項已經刪除了。

星期一, 9月 06, 2004

Conclusion - Testing Modbus

19200的問題似乎是在pc端,因為用另一個程式:Modicon測試沒有問題。
發現Protest又是用VB寫的,
VB的232部分又是問題最多的部分。

沒辦法,只好調整自己的程式來符合Protest。

星期日, 9月 05, 2004

Free Chinese Fontt

王漢宗老師的自由字型

headache ..

昨天早上開始,頭痛。
一直到晚上,開始痛得受不了,
頭靠近眼底,鼻子的地方會痛,
要是以前,衝個熱水澡大概會好,
可是現在是停水期,沒辦法,
只好用熱毛巾喜洗臉,比較好了一點,

大概是感冒了吧,前天晚上在中醫苑裡,冷氣很冷,吹了大概1hrs。
當初還好,可能後還就生病了吧,


所以人從感冒的”發病”大概要一個晚上的時間,
如果這時候吃些Vitamine C,大概就不會感冒了吧。

星期五, 9月 03, 2004

TODOS - today

1. Modify 2.8_1, change name to fullname (hydrogen) -OK
2.Test Modbus 19200
3. Attend meeting with India (New Request) PM 1:00.
(Need to measure each Cell Voltage, Define a property Protocol)
4.write instruction on calibration _7200 AC-detection board. (both ACB & CxU) to chad.

理想與現實的差距

當初都照規定寫了proposle請client確認。
現在做完了,
連”顯示名稱”都不同意:

”當初你們都同意了呀!”
”不然呢?你想到時後再重工嗎”

所以還是改了。

所以說,連最簡單的”顯示名稱”都會改,證明這個proposle根本就沒看。

這個”要客戶確認”這一點,應該是作心安的吧!

那我幹麻花時間寫這個無聊的proposle ?

Digest from Scicape.org
==============================================
哥倫比亞太空梭事故調查委員會年前公布了事故調查報告,美國工程界特別檢討了NASA這一年的所作所為,以及將來的走向。提醒大眾回顧調查報告,不要把教 訓束至腦後。從NASA這一年邁向太空梭復飛的蹣飧舋{上,我們見到一個龐大高科技單位如何誠實的處理工程問題;勇於進行組織文化改造;願意找個第三者進 行監督;不再配合時程一昧的趕工;進行組織內部的溝通(白話文就是願意聽聽低層工程師的意見,聽聽其他部門人員的聲音);當然我們也見到工程師的夢魘,預算永遠不足。在DISCOVERY 頻道的特別節目“歸鄉路:太空返航的挑戰”,NASA的高級工程師講了肺腑之言,大意是太空梭之前飛了百次的成孕羺A一連串的奇蹟蒙蔽了工程師的眼睛,所以沒有注意到潛在的危機。這是一種很令人震驚的反省,想想看不少計劃或不少人是經歷了幾次的失敗,不但沒有痛下針砭檢討改進,反而是期待下一次有奇蹟出現。讓我們期待奇蹟吧。
===================================================

Find the cause of 19200 error

預估原因:
自己的問題
1.TX的問題
1.1 送錯 (資料與送出不一致) => 使用485,在送出時copy content,啟動RX比較
1.2 Timing ? => ?
2.RX的問題
2.1 來不及收 => 在ISR中 Error時Errcount+1,在AI中送出
2.2 RX Error =>每個解開都加入Errot Count,在AI中送出

對方的問題
1. RX的問題
1.1 來不及收 => 加裝監聽port ? 改DMA為Queue?分段傳送

星期四, 9月 02, 2004

Zaurus : C7000, swap file on SD

Site http://home.opaopa.org/zaurus/
===============================
ここ を参考にSD上にスワップを作ります.FATだと不安定だそうなので,ext2 でファイルシステムを作っておきます.

# mkfs.ext2 /mnt/card

あとは,/mnt/card/swapfile を作って,それをスワップに使います.

# cd /mnt/card # dd if=/dev/zero of=swapfile count=32768 # mkswap /mnt/card/swapfile # swapon /mnt/card/swapfile

起動時に swap が有効になるように,/etc/fstab に登録して, /etc/rc.d/init.d/swapも作っておきます.

# vi /etc/fstab /mnt/card/swapfile swap swap defaults 0 0 # cd /etc/rc.d/init.d # vi swap # for i in rc3.d rc4.d rc5.d do cd $i ln -s ../init.d/swap S30swap cd .. done # for i in rc0.d rc6.d do cd $i ln -s ../init.d/swap K70swap cd .. done

ついでに,/dev/mmcda1 のマウントオプションに noatime を追加しました.気休めかもしれませんが….

抜く時は,

# swapoff /mnt/card/swapfile

とするか,

# /etc/rc.d/init.d/swap stop

としてくだしさい.
本当は,ツールバーの SD アイコンと対応させられるといいんですけどね.
===============================
http://www.zaurususergroup.com/
===============================
Can I use a CF or SD card as memory, instead of file storage space?

* Set up a 'swap' file on the card

It is not recommended for normal usage (since writing and rewriting to the same area of flash media will wear it out much more quickly than normal usage), or the faint of heart, but creating a 'swap' file (virtual memory) on a card is possible.

Set up a swap file, and more "memory" will be available for programs. (Just remember to remove the swap file before unmounting and removing the card.)

o Open the 'Terminal'
o Create an empty file for use as swap. For example:

dd if=/dev/zero of=/mnt/cf/SwapFile count=32768

("count" is the size of the file in 512-byte blocks, so 32768 is 16MB. "of" specifies the location of the swapfile. In this case, on the mounted CF card.)

o Turn the blank file into a swap file:

mkswap /mnt/cf/SwapFile

o Activate the swapfile:

swapon /mnt/cf/SwapFile

You can see the swap by checking the available memory. Run the command "free".

To turn off the swapfile (you won't be able to eject the card unless you do this first!!!), run the command:

swapoff /mnt/cf/SwapFile

See also: Increasing virtual memory on your 5000D

Source: Howard R. Abbey, Huge Eaves, Rick Spickelmier

Last updated: 2002.Apr.06

======================================================
http://hpcgi2.nifty.com/gary/wiki.cgi?Zaurus
======================================================
dd if=/dev/zero of=/mnt/card/.swap bs=512 count=65536 #32MのswapをSDに作成
mkswap /mnt/card/.swap
su
swapon /mnt/card/.swap # swap有効
swapoff /mnt/card/.swap # swap無効
======================================================
Site : unknown
=======================================================
Site:PIL
=======================================================
相信在幾位前輩的教導下, 大家的 C700 都已成功開好 swap 了. 但是預設的 swap 是使用 vfat 的檔案格式,因為 fat 較不安定,且讀取較頻繁,所以會減少 sd/cf 卡的壽命及使用時間. 在此建議大家改成 Linux 的原生檔案格式 ext2 會更好哦!!
方法如下:

Code:[Copy to clipboard]

# swapoff /mnt/card/swap
# umount /dev/mmcda1
# mkfs.ext2 /dev/mmcda1
# mount -t ext2 /dev/mmcda1 /mnt/card
# dd if=/dev/zero of=/mnt/card/swap count=20000
# mkswap /mnt/card/swap
# swapon /mnt/card/swap

記得還要將 /etc/sdcontrol 開頭的環境變數改一下:以後就都生效嘍!!

Code:[Copy to clipboard]

#FSTYPE="-t vfat"
FSTYPE="-t ext2"
#FATOPTS="-o noatimei,quiet,umask=000,iocharset=utf8"
FATOPTS="-o rw,noatime"

非常感謝心得分享
我的/etc/sdcontrol 是參考這裡的設定
http://club.h14m.org/kenji/diary/?200302a#200302024
FSTYPE="-t ext2" 這行更新後被拿掉了,系統會自動判斷
FATOPTS="-o noatimei,quiet,umask=000,iocharset=utf8" 這行可保留
FATOPTS="-o rw,noatime" 這行要改成EXT2OPTS="-o rw,noatime"
這些設定已經在1.3的升級中修正,如果已經升級的就無須修改
須注意記憶卡格式化成ext2後Win32平台或數位像機會不能存取
如果打算SD卡插上後不會拔了就可以這樣做

=================================================================
And Here
=================================================================
and

建議 sdcontrol 的檔案中加入一些錯誤檢查, 比較保險!!
並把 swapfile 改為 .swapfile (unix 中的隱藏檔) 可防止誤刪!!

改更如下:



Quote:

#!/bin/sh
#
# sdcontrol 1.0 2001/8/8 21:33:19 (Hideki Hayami)
#
# Initialize or shutdown a SD card device
#
# The first argument should be either 'insert' of 'eject'.
#

ACTION=$1
DEVICE=/dev/mmcda1
MOUNT_POINT=/mnt/card
SMB_MOUNT=/home/samba/SD_Card
INSTALL_DIR=Documents/Install_Files
#FSTYPE="-t vfat"
FATOPTS="-o noatimei,quiet,umask=000,iocharset=utf8"

###### for QPE ######
get_pid()
{
echo $1
}

wait_release()
{
count=1
while true
do
umount $MOUNT_POINT
if [ $? = 0 ]; then
#echo umount >> /tmp/sd
return
fi
echo count=$count >> /tmp/sd
if [ `expr $count \>= 500` = 1 ]; then
#echo time out >> /tmp/sd
return
fi
count=`expr $count + 1`
usleep 200000
done
}

kill_task()
{
ps_line=`ps ax | grep -w 'qpe$'`
qpe_pid=`get_pid $ps_line`
#echo qpe_pid = $qpe_pid >> /tmp/sd
target_pids=`fuser -m $DEVICE | cut -d : -f2`
#echo $target_pids >> /tmp/sd
if [ "$target_pids" = "" ]; then
return
fi
is_exist_qpe=`echo $target_pids | fgrep -w $qpe_pid`
if [ "$is_exist_qpe" = "" ]; then
kill -9 $target_pids
#echo kill -9 $target_pids >> /tmp/sd
else
#echo "found qpe!!!" >> /tmp/sd
target_pids=`echo $target_pids | sed -e "s/$qpe_pid//"`
if [ "$target_pids" != "" ]; then
kill -9 $target_pids
#echo kill -9 $target_pids >> /tmp/sd
fi
wait_release
exit 0
fi
}
###### for QPE ######

case "$ACTION" in
'insert')
mount $FSTYPE $FATOPTS $DEVICE $MOUNT_POINT
MOUNT_RES = `mount | grep $DEVICE`
if [ "$MOUNT_RES" = "" ]; then
mount $FSTYPE $DEVICE $MOUNT_POINT
fi
chkmntsh ${MOUNT_POINT}
if [ -d $SMB_MOUNT ] ; then
rm -rf $SMB_MOUNT
fi
ln -s $MOUNT_POINT $SMB_MOUNT
mkdir -p $MOUNT_POINT/$INSTALL_DIR
#echo mount $? >> /tmp/sd
# for card swap support
if [ -f /mnt/card/.swapfile ]; then
swapon /mnt/card/.swapfile
fi
;;
'eject')
# for card swap support
if [ -f /mnt/card/.swapfile ]; then
/sbin/swapoff /mnt/card/.swapfile
fi

fuser -s -m $DEVICE
if [ $? = 1 ]; then
umount $MOUNT_POINT
rm $SMB_MOUNT
else
exit 1
fi
;;
'compeject')
is_mount=`mount | fgrep $DEVICE`
if [ "$is_mount" = "" ]; then
exit 0
fi
kill_task # for QPE
#fuser -k -m $DEVICE > /dev/null
# for card swap support
if [ -f /mnt/card/.swapfile ]; then
/sbin/swapoff /mnt/card/.swapfile
fi
umount $MOUNT_POINT
if [ $? != 0 ]; then
usleep 500000
umount $MOUNT_POINT
#echo umount $? >> /tmp/sd
#else
# echo umount >> /tmp/sd
fi
rm $SMB_MOUNT
;;
'change')
$0 compeject
$0 insert
;;
'*')
exit 1
;;
esac

exit 0

TODOS - today

1.Write down the latest version (HydrxFxnFail), all the new feature. (for DxR).
2.Estimate a rough plane for the limited version DCPMM.
3.Keep testing the Modbus 485 (the Error problem)

星期三, 9月 01, 2004

Site :

大家來學 LaTeX

Modbus Communication OK!

查出不能通的原因是2線式485,我們的232-485轉換器會造成TX端收到自己送出的資料,
所以pc端的測試程式會收到自己的command,誤認為是reply message。
所以不能通。
(在pc程式的reply data窗格可以看到RX和TX一模一樣的data)。

call cxt,說他們是用 485-smart+
這個新機器在做TX時會將RX關掉,所以不會有問題。
公司網站: 浩鼎傳偵

price : 2200.

今天拿到485 smart +後,可以正動作了。

Tablet PC - Compaq - Start Wireless..

就是那一款可以接keyboard的tablet pc,
怎麼弄都沒辦法把wireless打開(可以ap中沒東西)。

後來Mis說要這一款tablet pc要用開關把wireless打開。
開關在screen旁邊,有個Q的按鍵。
按下後會出現一個compaq list,選enable wireless後就可以看到screen旁的wireless led亮起,
再search依次就可以了。

至於xp的設定,keyindex是1 : 不知道是未什麼。

Blogspot just down : cannot create new post

可怕,剛剛沒辦法create new post,
沒辦法login這個控制頁,
出現
Error

還好1 hr後就可以了。

ADSL ... ssh ok

ping還是ping不到,不過用ssh連線成功,
只是非常的慢。

網誌存檔