Skip to contentSkip to conversation

Patch to add a --dailup option to dund, needed to make TomTomGo navigators connect to linux

Bluez-devel Arjan van de Ven 2 participants 2 messages Jan 17, 2006 1 message not in the archive Bluetooth drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 3 lines

nice patch, but do you mind redoing it and change "dailup" into "dialup" for some nicer English ;)

oh woops

see below

dund/dund.h +1 -0
diff -purN bluez-utils-org/dund/dund.h bluez-utils-2.22/dund/dund.h
@@ -33,6 +33,7 @@
 #define LANACCESS	0
 #define MROUTER		1
 #define ACTIVESYNC	2
+#define DIALUP		3
 
 /* DUN functions */
 int dun_init(void);
dund/main.c +8 -1
diff -purN bluez-utils-org/dund/main.c bluez-utils-2.22/dund/main.c
@@ -398,10 +398,11 @@ static struct option main_lopts[] = {
 	{ "msdun",	2, 0, 'X' },
 	{ "activesync",	0, 0, 'a' },
 	{ "mrouter",	1, 0, 'm' },
+	{ "dialup",	1, 0, 'u' },
 	{ 0, 0, 0, 0 }
 };
 
-static char main_sopts[] = "hsc:k:Kr:i:lnp::DQ::AESMP:C::P:Xa";
+static char main_sopts[] = "hsc:k:Kr:i:lnp::DQ::AESMP:C::P:Xam:u";
 
 static char main_help[] = 
 	"Bluetooth LAP (LAN Access over PPP) daemon version " VERSION " \n"
@@ -412,6 +413,7 @@ static char main_help[] = 
 	"\t--listen -s               Listen for LAP connections\n"
 	"\t--connect -c <bdaddr>     Create LAP connection\n"
 	"\t--mrouter -m <bdaddr>     Create mRouter connection\n"
+	"\t--dialup -u               Pretend to be a dialup/telephone\n"
 	"\t--search -Q[duration]     Search and connect\n"
 	"\t--kill -k <bdaddr>        Kill LAP connection\n"
 	"\t--killall -K              Kill all LAP connections\n"
@@ -539,6 +541,11 @@ int main(int argc, char **argv)
 			type = MROUTER;
 			break;
 
+		case 'u':
+			mode = LISTEN;
+			type = DIALUP;
+			break;
+
 		case 'h':
 		default:
 			printf(main_help);
dund/sdp.c +7 -1
diff -purN bluez-utils-org/dund/sdp.c bluez-utils-2.22/dund/sdp.c
@@ -98,6 +98,9 @@ int dun_sdp_register(bdaddr_t *device, u
 	case ACTIVESYNC:
 		sdp_uuid128_create(&dun, (void *) async_uuid);
 		break;
+	case DIALUP:
+		sdp_uuid16_create(&dun, DIALUP_NET_SVCLASS_ID);
+		break;
 	default:
 		sdp_uuid16_create(&dun, LAN_ACCESS_SVCLASS_ID);
 		break;
@@ -106,7 +109,7 @@ int dun_sdp_register(bdaddr_t *device, u
 	svclass = sdp_list_append(NULL, &dun);
 	sdp_set_service_classes(record, svclass);
 
-	if (type == LANACCESS) {
+	if (type == LANACCESS || type == DIALUP) {
 		sdp_uuid16_create(&profile[0].uuid, LAN_ACCESS_PROFILE_ID);
 		profile[0].version = 0x0100;
 		pfseq = sdp_list_append(NULL, &profile[0]);
@@ -120,6 +123,9 @@ int dun_sdp_register(bdaddr_t *device, u
 	case ACTIVESYNC:
 		sdp_set_info_attr(record, "ActiveSync", NULL, NULL);
 		break;
+	case DIALUP:
+		sdp_set_info_attr(record, "Dialup Networking", NULL, NULL);
+		break;
 	default:
 		sdp_set_info_attr(record, "LAN Access Point", NULL, NULL);
 		break;

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#2 lore raw

Hi Arjan,

Quoted 4 lines
Quoted 2 lines

nice patch, but do you mind redoing it and change "dailup" into "dialup" for some nicer English ;)

oh woops

and you forgot the manual page, but I fixed that. Patch is in the CVS now. Thanks.

Regards

Marcel

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel