♩About myself♪

我的相片
永遠的藍星
怠惰是一種病,偷懶是種藉口

Panda dog?

2008年10月13日 星期一

簡易GPS接收IN 270XP

開機結束後插入USB藍芽DEVICE顯示以下訊息

/$pxa-ohci pxa-ohci: wakeupusb 1-1: new full speed USB device using address 2

輸入下面的指令,會有訊息出現(輸入指令都會有/$這個開頭)

/$hciconfighci0: Type: USB BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0 DOWN RX bytes:0 acl:0 sco:0 events:0 errors:0 TX bytes:0 acl:0 sco:0 commands:0 errors:0
啟用上面所插入的藍芽裝置GPS 打開

/$hciconfig hci0 up

掃描GPS裝置位址

/$hcitool scanScanning ...

00:1D:28:1F:A1:3B ......P1i

00:0B:0D:85:13:53 HOLUX GPSlim236<--收到GPS所傳過來的資訊

00:12:D1:81:E9:71 WM_Administrat1

Ping一下看看: (指令為l2ping,l是小寫的L而不是數字1) )

/$l2ping 00:0E:07:1C:AE:1D

聯結裝置

/$rfcomm bind /dev/rfcomm0 00:0B:0D:85:13:53 0

觀看檔案內容

/$cat /dev/rfcomm0

2008年9月11日 星期四

忘記MYSQL ROOT的密碼時!

1.先停掉mysql

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

2.以--skip-grant-table 的參數啟動mysql

# safe_mysql --skip-grant-table&

3. 更改root 密碼
# mysql mysql
mysql> UPDATE user SET password=password('newpassword')
WHERE user='root';
mysql> FLUSH PRIVILEGES;
mysql> exit

4.停掉mysql再重跑
# mysqladmin -uroot -p shutdown
Enter password: //輸入新設定的密碼

# /etc/rc.d/init.d/mysql start

2008年9月10日 星期三

Apache [forbidden 403]錯誤解決

1、常規的配置:
添加用户web:
adduser web

passwd web

web用户目録下建立public_html目録,并將權限設置為755:
mkdir public_html
chmod 755 public_html -R

修改/etc/http/httpd.conf:
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid. This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
#

#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disable
#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
UserDir public_html

2、測試、問題出現:
http://127.0.0.1/~web
================================

Forbidden
You don't have permission to access /~web on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


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

Apache/2.0.54 (Fedora) Server at 127.0.0.1 Port 80

一般出現這個問題,直觀地會想到的目録的存取權限問題,查了很久,調了很久也没有解决問題。其間曾想到是否Selinux的問題,進去看了一圈,没有發現什麽要改的地方。(後來的事實證明,有時候直覺是很准的,能否找到答案,區彆往往是:是否在直覺上走的更深入)。

3、問題的解决
GoogleApache 403搜了好一會,終于在一個博客裏看到,作者遇到和我完全相同的問題:Apache、目録的配置都没問題,但就是不能顯示頁面。而解决方法恰恰就是修改Selinuxpublic_html的訪問控制。
用以下命令修改文件夾安全屬性
chcon -R -t httpd_user_content_t public_html/

4、關聯知識的總結:

Fedora Core 5 SELinux FAQ
http://fedora.redhat.com/docs/selinux-faq-fc5/#faq-entry-public_html Q: How do I make a user public_html directory work under SELinux?


專題預期

以溫度計模組加強網頁的顯示,增加甘特圖,以JAVA嵌入HTML,gps暫定無用,藍芽接收ok哩,心電圖方面未測試。再來是php+mysql,以上課的課程來了解php的運作吧,在+專題啦=~=。

2008年8月23日 星期六

亂搞一通的論壇~感覺我是神?(想太多

http://hi.site40.net/iday-dream/index.php
班級的專用網頁~無心插柳阿~^^不過有個好的開始就ok啦

接下來要玩的網站~o~亂亂來~嘿

2008年8月19日 星期二

Bluetooth Programming

http://people.csail.mit.edu/albert/bluez-intro/index.html
gcc3 -Wall -I /usr/local/arm/3.4.1/include -L /usr/local/arm/3.4.1/lib -o simplescan simplescan.c -lbluetooth
亂搞一通,終於給我編譯過了。

2008年8月14日 星期四

Linux bluetooth基本操作

支持 usb_hci rfcomm 協定軟體 bluez 載入hci_usb、 rfcomm模組# modprobe hci_usb # modprobe rfcomm 插入usb receriver # hciconfig hci0 up 指令啟動裝置
查詢usb receriver狀態 # hciconfig -a
hci0: Type: USB BD Address: 00:10:60:A3:68:9F ACL MTU: 192:8 SCO MTU: 64:8 UP RUNNING PSCAN ISCAN RX bytes:1860 acl:10 sco:0 events:88 errors:0 TX bytes:1432 acl:10 sco:0 commands:52 errors:0 Features: 0xff 0xff 0x0f 0x00 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: HOLD SNIFF PARK Link mode: SLAVE ACCEPT Name: 'Debian' Class: 0x000100 Service Classes: Unspecified Device Class: Computer, Uncategorized HCI Ver: 1.1 (0x1) HCI Rev: 0x20d LMP Ver: 1.1 (0x1) LMP Subver: 0x20d Manufacturer: Cambridge Silicon Radio (10)
掃瞄周圍藍牙設備:
# hcitool scan Scanning ... 00:0B:0D:85:13:53 HOLUX GPSlim236 00:11:94:02:1A:84 MPx220 00:19:2D:E0:33:77 628...............i love it 00:18:0F:CE:2B:4B ...........................
Ping一下看看: (指令為l2ping,l是小寫的L而不是數字1) )
# l2ping 00:0E:07:1C:AE:1D
Ping: 00:0B:0D:85:13:53 from 00:10:60:E3:7D:E0 (data size 44) ... 0 bytes from 00:0B:0D:85:13:53 id 0 time 10.83ms 0 bytes from 00:0B:0D:85:13:53 id 1 time 6.42ms 0 bytes from 00:0B:0D:85:13:53 id 2 time 6.36ms 0 bytes from 00:0B:0D:85:13:53 id 3 time 6.28ms 0 bytes from 00:0B:0D:85:13:53 id 4 time 6.07ms 0 bytes from 00:0B:0D:85:13:53 id 5 time 5.22ms 0 bytes from 00:0B:0D:85:13:53 id 6 time 6.18ms 0 bytes from 00:0B:0D:85:13:53 id 7 time 5.09ms 0 bytes from 00:0B:0D:85:13:53 id 8 time 11.07ms 0 bytes from 00:0B:0D:85:13:53 id 9 time 7.03ms 10 sent, 10 received, 0% loss #O#有反應
本地主機配置文件(主機名等參數): /etc/bluetooth/hcid.conf
....
# Default link mode
# none - no specific policy
# accept - always accept incoming connections
# master - become master on incoming connections,
# deny role switch on outgoing connections
#lm accept; #改成註解 lm accept,master #這邊設定為伺服模式 ....
PIN配對碼所在文件: /etc/bluetooth/pin 我設在/bin/bluepin
內容
#!/bin/sh echo
"PIN:0000"
加載配置文件: #hcid -f /etc/bluetooth/hcid.conf
透過rfcomm連線 #rfcomm connect /dev/rfcomm0 00:0E:07:1C:AE:1D ﹍(參數設定通道) Connected /dev/rfcomm0 to 00:0B:0D:85:13:53 on channel 1 Press CTRL-C for hangup 用串口查看裝置傳輸內容 #minicom -s set
┌───────────────────────┐
│ A - Serial Device : /dev/rfcomm0
│ B - Lockfile Location : /var/lock
│ C - Callin Program :
│ D - Callout Program :
│ E - Bps/Par/Bits : 115200 8N1
│ F - Hardware Flow Control : Yes
│ G - Software Flow Control : No │
│ Change which setting?
└───────────────────────┘
儲存設定後esc就可以看到以下數據:$GPGGA,062721.764,2459.7236,N,12127.1011,E,0,00,,46.4,M,15.2,M,,0000*4A $GPRMC,062721.764,V,2459.7236,N,12127.1011,E,,,150808,,,N*7B $GPVTG,,T,,M,,N,,K,N*2C $GPGGA,062722.761,2459.7236,N,12127.1011,E,0,00,,46.4,M,15.2,M,,0000*4C $GPGSA,A,1,,,,,,,,,,,,,,,*1E $GPGSV,3,1,11,16,47,019,,06,84,102,,03,74,212,,23,47,291,*77 $GPGSV,3,2,11,19,41,204,19,31,41,100,,13,21,317,18,25,14,317,*77 $GPGSV,3,3,11,21,11,068,,32,06,216,,20,04,236,*47 $GPRMC,062722.761,V,2459.7236,N,12127.1011,E,,,150808,,,N*7D $GPVTG,,T,,M,,N,,K,N*2C 由GPS接收器收到的訊號

2008年8月13日 星期三

Picasa2 測試




Picasa2 測試

Posted by Picasa

Bluez-移植問題

http://www.yuanma.org/data/2006/0607/article_699.htm 主要都是由這篇文章,源頭dennis以下是我的問題編譯bluez函式庫(版本:Bluez-libs-3.36)沒有問題,但在下面產生函式庫就出現下面的問題(待解)/usr/local/arm/3.4.1/bin/arm-linux-gcc -o -shared -o libbluetooth.so.1.0.17 bluetooth.o hci.o sdp.oerror:/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: bluetooth.o: Relocations in generic ELF (EM: 3)bluetooth.o: could not read symbols: File in wrong formatcollect2: ld returned 1 exit status
search:http://www.linuxeden.com/forum/thread-159396-1-6.html接下來只要作函式庫連結在放到arm核心中就可以了# ln -s libbluetooth.so.1.0.17 libbluetooth.so# ln -s libbluetooth.so.1.0.17 libbluetooth.so.1
http://www.yuanma.org/data/2006/0607/article_699.htm(參考文章)
在基本核心內已經有包括bluez,hci_usb,rfcomm...等基本模組,再來函式庫及檔案系統中的bin操作測試版本同lib一樣 bluez-utils-3.36
checking for DBUS... noconfigure: error: D-Bus library is required作blue-unit設定時DBUS ERROR
改換版本bluez-utils-2.25+bluez-libs-2.25(都給他試試看)做了以下設定:libs./configure --prefix=/usr --host=armv4l CC=/usr/local/arm/3.4.1/bin/arm-linux-gccmake;make installutils./configure --prefix=/usr/bluetooth --includedir=/usr/include/bluetooth --libdir=/usr/lib --with-bluez=/usr/bluetooth --disable-test --disable-cups --disable-pcmia --host=armv4l CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc CPP=/usr/local/arm/3.4.1/bin/arm-linux-cpp AR=/usr/local/arm/3.4.1/bin/arm-linux-ar STRIP=/usr/local/arm/3.4.1/bin/arm-linux-strip RANLIB=/usr/local/arm/3.4.1/bin/arm-linux-ranlib LD=/usr/local/arm/3.4.1/bin/arm-linux-ldmake;make install在我的/usr/bluetooth裡面就看得到bin及sbin了接下來要丟到機器上試試看~~ 結果沒問題照藍芽的基本操作來設定也是接收的到gps的訊號的! 上面問題就無視了==+
檔案系統預設方面有點問題,在設定device時要etc的rfcomm.conf不能設定初始化,全部用成註解
還有在/.bashrc 的檔案內容新增
ln -sf /dev/bluetooth/rfcomm/0 /dev/rfcomm0
重新啟動, 再照上面操作結果ok!

(ENDLESS)

2008年8月6日 星期三

網頁管理員(測試文章)

它是一個免費的網頁伺服器管理程式,類似微軟的『Internet Information Services』,簡稱『IIS』。
詳細說明請自行到 Apache 官方網站查詢。

以下過程皆經過 Windows XP SP2 測試,其他平台不能肯定會成功。
【安裝 Apache Http Server】
1.下載 Apache Http Server(目前2.0.63版)。
2.為了方便起見,建議到軟體王搜尋下載,或自行上網搜尋 Apache 官網下載。
3.請依照精靈指示安裝 Apache,很簡單,幾乎都是按『下一步』…。

【查看 Apache 是否啟動】(四擇一)
◎執行『services.msc /s』自行查看 Apache 服務是否啟用,亦可控制它啟用與否。
◎開網頁輸入網址『http://localhost』,若看到『安裝 Apache 的測試網頁』網頁畫面,表 Apache 安裝成功。
◎執行『msconfig』,切換到『服務』頁面,查看 Apache 服務是否啟用。
◎檢視桌面右下角的 Apache 常駐程式,雙擊左鍵開啟它,查看 Apache 服務圖示是否為綠燈或顯示為紅燈。

【啟動、停止、重新啟動 Apache 服務】(三擇一)
◎到『開始/所有程式/Apache HTTP Server 2.0/Control Apache Server』,自行選擇 Start、Stop 或 Reset。
◎執行『services.msc /s』自行找到 Apache 服務,進行操作。
◎檢視桌面右下角的 Apache 常駐程式,雙擊左鍵開啟即可對 Apach 網頁伺服器進行操作。

【修改 Apache 網頁伺服器的虛擬目錄】
1.到『開始/所有程式/Apache HTTP Server 2.0/Configure Apache Server』
2.選擇『Edit the Apache httpd.conf Configuration File』。
3.開啟後你會發現『httpd.conf』它是一個文字檔,其中以『#』開頭表示後面的文字都是註解或說明。
3.在文件中搜尋 『DocumentRoot』所指定的目錄。
4.例如學長的目錄是:『DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"』。
5.只要修改兩個雙引號中間的路徑即可完成變更。
6.該目錄下的檔案和子目錄,預設 Apache 會開放存取權限。

如果安裝appserv 要先停止IIS 的服務,不然無法看到WWW內的檔案。

進入COMMAND執行下面的指令

cmd 關閉 IIS 的服務:

net stop "World Wide Web Publishing"
net stop "Simple Mail Transfer Protocol (SMTP)"
net stop "FTP Publishing"
net stop "IIS Admin"

首篇置頂


第一篇在blogger上面發的網誌,待續:編寫日記,心情。
http://gaaan.com 最近看到的bbs 還有ptt.cc 也去加了~好多的字!看的頭昏昏阿
http://us.dl1.yimg.com/download.yahoo.com/dl/aud/tw/base.tw.gamma2.suck.swf

http://fedoraforum.org/forum/archive/index.php/t-155487.html
Timeout error occurred trying to start MySQL Daemon sock mysql 5.0.27 error

1045 Access denied for user 'root@localhost'(using password NO)

http://www.huihoo.org/jfree/jfreechart_start.html

http://www.domino.club.tw/

error:

constructor Applet(java.awt.CardLayout)

Exception in thread "main" java.lang.NoSuchMethodError: main

"cannot be cast to" java.applet.Applet


以上待續