Date: Sun, 29 Jul 2007 19:17:35 +0200 (CEST) From: Dirk-Willem van Gulik <dirkx@joost.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Dirk-Willem van Gulik <dirkx@webweaving.org> Subject: ports/115012: New port: comms/bluegps BlueGPS is a simple command line tool to download datalogs from the Royaltek RBT-3000 bluetooth GPS receiver (and similar) over a bluetooth link. Based on bluegps-linux. Message-ID: <200707291717.l6THHZGw004065@builld-jv.anywi.com> Resent-Message-ID: <200707291800.l6TI050s076062@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 115012 >Category: ports >Synopsis: New port: comms/bluegps BlueGPS is a simple command line tool to download datalogs from the Royaltek RBT-3000 bluetooth GPS receiver (and similar) over a bluetooth link. Based on bluegps-linux. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sun Jul 29 18:00:05 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Dirk-Willem van Gulik <dirkx@webweaving.org> >Release: FreeBSD 7.0-CURRENT i386 >Organization: private individual >Environment: System: FreeBSD builld-jv.anywi.com 7.0-CURRENT FreeBSD 7.0-CURRENT #3: Sun Jul 15 18:05:41 UTC 2007 root@builld-jv.anywi.com:/usr/obj/usr/src/sys/NEWTANTE i386 # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # bluegps # bluegps/files # bluegps/files/patch-aa # bluegps/files/patch-ab # bluegps/pkg-plist # bluegps/pkg-descr # bluegps/distinfo # bluegps/Makefile # echo c - bluegps mkdir -p bluegps > /dev/null 2>&1 echo c - bluegps/files mkdir -p bluegps/files > /dev/null 2>&1 echo x - bluegps/files/patch-aa sed 's/^X//' >bluegps/files/patch-aa << 'END-of-bluegps/files/patch-aa' X--- bluegps.1 2006-06-04 13:41:03.000000000 +0200 X+++ bluegps.1 2007-07-29 18:53:13.000000000 +0200 X@@ -14,8 +14,9 @@ X .LP X The bluetooth address (bdaddr) of the RBT-3000 to be used has to X be specified on the command line. This bluetooth address can e.g. X-be determined using the \fBhcitool(1)\fP command. X- X+be determined using the \fBhcitool(1)\fP command (linux). Or X+alternatively use the friendly name. (freebsd, see X+\fBbluetooth.hosts(5)\fP). X .SH OPTIONS X .TP X .BI \-d " filename" X@@ -112,6 +113,13 @@ X bluegps -d testlog.nmea 00:02:C7:00:11:22 X .RE X .LP X+On freebsd; if there is an entry in /etc/bluetooth/hosts you can X+also use: X+.LP X+.RS +4 X+bluegps -d testlog.nmea BlueGPS X+.RE X+.LP X If the GPS has been setup to use the password 1234 use the following X command: X .LP X@@ -130,4 +138,5 @@ X accompanies each copy of \fIbluegps\fP. X .SH AUTHORS X Till Harbaum <Till@Harbaum.org>, X-Simon Budig <simon@budig.de> X+Simon Budig <simon@budig.de> and X+some minor changes for FreeBSD by Dirk-Willem van Gulik <dirkx@webweaving.org>. END-of-bluegps/files/patch-aa echo x - bluegps/files/patch-ab sed 's/^X//' >bluegps/files/patch-ab << 'END-of-bluegps/files/patch-ab' X--- bluegps.c 2006-06-26 20:28:31.000000000 +0200 X+++ bluegps.c 2007-07-29 18:54:17.000000000 +0200 X@@ -27,10 +27,21 @@ X #include <stdarg.h> X #include <ctype.h> X X+#ifdef __FreeBSD__ X+#include <string.h> X+#include <sys/types.h> X+#include <sys/socket.h> X+#else X #include <netinet/ip.h> X+#endif X X+ X+#ifdef __FreeBSD__ X+#include <bluetooth.h> X+#else X #include <bluetooth/bluetooth.h> X #include <bluetooth/rfcomm.h> X+#endif X X #include "rbt3000.h" X X@@ -269,19 +280,44 @@ X int X rbt3000_connect (char *device_addr) X { X- X+#ifdef __FreeBSD__ X+ struct sockaddr_rfcomm rem_addr; X+ struct hostent * he; X+ X+ memset(&rem_addr, 0, sizeof(rem_addr)); X+ rem_addr.rfcomm_len = sizeof(rem_addr); X+ rem_addr.rfcomm_family = AF_BLUETOOTH; X+ rem_addr.rfcomm_channel = RFCOMM_CHANNEL; X+ X+ if ((he = bt_gethostbyname(device_addr))) { X+ context->device = *(bdaddr_t *) he->h_addr_list[0]; X+ if (context->messages == MSG_VERBOSE) X+ printf("Actual BT address for '%s': %s\n", X+ device_addr, bt_ntoa(&(context->device),NULL)); X+ } else X+ if (!bt_aton(device_addr, &context->device)) { X+ perror("No such device address"); X+ return 0; X+ } X+ rem_addr.rfcomm_bdaddr = context->device; X+#else X struct sockaddr_rc rem_addr; X X- baswap (&context->device, strtoba (device_addr)); X- X rem_addr.rc_family = AF_BLUETOOTH; X- rem_addr.rc_bdaddr = context->device; X rem_addr.rc_channel = RFCOMM_CHANNEL; X+ baswap (&context->device, strtoba (device_addr)); X+ rem_addr.rc_bdaddr = context->device; X+#endif X X /* bluez connects to BlueClient */ X if ((context->device_fd = socket (PF_BLUETOOTH, X SOCK_STREAM, X- BTPROTO_RFCOMM)) < 0 ) X+#ifdef __FreeBSD__ X+ BLUETOOTH_PROTO_RFCOMM X+#else X+ BTPROTO_RFCOMM X+#endif X+ )) < 0 ) X { X perror ("Can't create socket"); X return 0; END-of-bluegps/files/patch-ab echo x - bluegps/pkg-plist sed 's/^X//' >bluegps/pkg-plist << 'END-of-bluegps/pkg-plist' Xbin/bluegps END-of-bluegps/pkg-plist echo x - bluegps/pkg-descr sed 's/^X//' >bluegps/pkg-descr << 'END-of-bluegps/pkg-descr' XBlueGPS is a simple command line tool to download datalogs from the Royaltek RBT-3000 Xbluetooth GPS receiver over a bluetooth link. X END-of-bluegps/pkg-descr echo x - bluegps/distinfo sed 's/^X//' >bluegps/distinfo << 'END-of-bluegps/distinfo' XMD5 (bluegps-linux-2.0.tgz) = ec1ed56045f76276dce45fabb7d239cd XSHA256 (bluegps-linux-2.0.tgz) = a4a6fc141fa3b8f65d66f416d220a8baf4b607783cba4b3456a34e20a29ed4d0 XSIZE (bluegps-linux-2.0.tgz) = 8508 END-of-bluegps/distinfo echo x - bluegps/Makefile sed 's/^X//' >bluegps/Makefile << 'END-of-bluegps/Makefile' X# New ports collection makefile for: bluegps X# Date created: 29 July 2007 X# Whom: dirkx@webweaving.org X# X# $FreeBSD$ X# X XPORTNAME= bluegps-linux X#DISTNAME= bluegps-linux-2.0 XEXTRACT_SUFX= .tgz XPORTVERSION= 2.0 XCATEGORIES= comms XMASTER_SITES= http://www.harbaum.org/till/bluegps/ X XMAINTAINER= dirkx@joost.com XCOMMENT= BlueGPS is a simple command line tool to download datalogs from the Royaltek RBT-3000 bluetooth GPS receiver over a bluetooth link. X XMAN1= bluegps.1 X X.include <bsd.port.mk> END-of-bluegps/Makefile exit >Description: >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707291717.l6THHZGw004065>