2009/06/03

Bluetooth - GPSlim236 GPS (2)

1. Scan if any bluetooth device here ... # hcitool scan Scanning ... 00:0B:0D:6C:36:0B HOLUX GPSlim236 2. Bind the RFCOMM device to the remote bluetooth device. # rfcomm bind /dev/rfcomm0 00:0B:0D:6C:36:0B 3. Check the RFCOMM device is created or not. # ls -al /dev/rfcomm0 crw-rw---- 1 root root 216, 0 2009-06-03 21:19 /dev/rfcomm0 4. Check current RFCOMM device informaion. # rfcomm -a rfcomm0: 00:0B:0D:6C:36:0B channel 1 closed 5. Check if we can read data from my GPS in other terminal ... # cat /dev/rfcomm0 $GPGGA,143236.991,2459.7755,N,12128.0203,E,0,00,,32.1,M,15.2,M,,0000*46 $GPRMC,143236.991,V,2459.7755,N,12128.0203,E,,,030609,,,N*79 $GPVTG,,T,,M,,N,,K,N*2C $GPGGA,143237.991,2459.7755,N,12128.0203,E,0,00,,32.1,M,15.2,M,,0000*47 $GPGSA,A,1,,,,,,,,,,,,,,,*1E $GPGSV,3,1,12,11,85,202,,07,76,233,,25,58,195,,08,48,328,17*7D $GPGSV,3,2,12,19,31,022,,17,16,257,,28,14,321,,03,13,047,*7D $GPGSV,3,3,12,32,07,130,,13,07,214,,22,05,042,,20,04,156,*7B : : WoW...It really works :) 6. Check RFCOMM device information again. # rfcomm -a rfcomm0: 00:0B:0D:6C:36:0B channel 1 connected [tty-attached] 7. Remember Bluetooth Icon in system tray, select Preference Setting, a connected icon is shown. You may stop receive data from GPS by click the disconnect button ! The cat /dev/rfcomm0 will stop then. .

沒有留言: