Re: [Gpsbabel-misc] WBT-201: Initializing bluetooth connection
Brought to you by:
robertl
From: Al B. <gps...@ml...> - 2010-06-12 17:11:02
|
Am Samstag 12 Juni 2010 17:40:07 schrieb Jonathan Hudson: Hi Jonathan, > > > I think, I have to execute some commands in my bash script before, so > > > gpsbabel > > > finds the WBT-201. Could you help please? > You need to create the BT serial port first, then gpsbabel works just > fine with BT on this device. The application "gtk-g-rays2" > <http://www.daria.co.uk/gps> provides a GTK interface to manage the > WBT-201 and uses the following helper script to instantiate the BT > serial port. "gtk-g-rays2" uses gpsbabel to download logged tracks > etc from the device. > > #!/bin/sh > > ### g-rays2-rfcomm.sh #### > > rf_start () > { > DEV=$1 > ADDR=$(hcitool scan | \ > { > ADDR= > while read ADDR NAME > do > if [ "$NAME" = "G-Rays2" ] ; then > sudo rfcomm bind $DEV $ADDR > echo $ADDR > exit > fi > done > } > ) > [ -n "$ADDR" ] > } > > DEV=${2:-/dev/rfcomm0} > > case $1 in > start) > [ -c $DEV ] || rf_start $DEV > ;; > > stop) > [ -c $DEV ] && sudo rfcomm release $DEV > ;; > esac > > I have /etc/sudoers set to allow authorised uses (me!) run rfcomm > without a password. > > e.g. > > $ g-rays2-rfcomm.sh start > $ gpsbabel ..... > $ g-rays2-rfcomm.sh stop > > AFAIK, all versions of gpsbabel from 1.33 work fine with the WBT-201. Great, that's what I was looking for! Thanks a lot! It looks like there is a problem, if 2 queries are made quickly. gpsbabel -t -w -i wbt -f /dev/rfcomm0 -o gpx -F "$GPXFILE" gpsbabel -t -w -i wbt -f /dev/rfcomm0 -o kml,units=m -F "$KMLFILE" $GPXFILE is always ok, $KMLFILE cannot be created most times, but sometimes. The device is not found. I think I will stay with USB, because I need USB anyway for recharging the battery. Al |