---
apps/obex_test/obex_test.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/apps/obex_test/obex_test.c b/apps/obex_test/obex_test.c
index 6d11b0f..85fd9d8 100644
--- a/apps/obex_test/obex_test.c
+++ b/apps/obex_test/obex_test.c
@@ -167,9 +167,9 @@ int main (int argc, char *argv[])
struct context global_context = {0};
#ifdef HAVE_BLUETOOTH
- int btobex = FALSE;
+ int btobex = 0;
bdaddr_t bdaddr;
- uint8_t channel = 0;
+ uint16_t channel = 0;
#endif
#ifdef HAVE_USB
int usbobex = FALSE;
@@ -192,6 +192,7 @@ int main (int argc, char *argv[])
#endif
#ifdef HAVE_BLUETOOTH
" -b [addr] [chan] Use bluetooth RFCOMM transport\n"
+ " -B [addr] [psm] Use bluetooth L2CAP transport\n"
#endif
#ifdef HAVE_USB
" -u [interface] Use USB transport\n"
@@ -214,7 +215,9 @@ int main (int argc, char *argv[])
#endif
#ifdef HAVE_BLUETOOTH
if (argc >= 2 && strcmp(argv[1], "-b") == 0)
- btobex = TRUE;
+ btobex = 1;
+ if (argc >= 2 && strcmp(argv[1], "-B") == 0)
+ btobex = 2;
#endif
#ifdef HAVE_USB
if (argc >= 2 && strcmp(argv[1], "-u") == 0)
@@ -281,7 +284,7 @@ int main (int argc, char *argv[])
}
switch (btobex) {
- case TRUE:
+ case 1:
printf("Using Bluetooth RFCOMM transport\n");
handle = OBEX_Init(OBEX_TRANS_BLUETOOTH, obex_event, 0);
if (channel_arg)
@@ -289,6 +292,14 @@ int main (int argc, char *argv[])
else
channel = BT_CHANNEL;
break;
+
+ case 2:
+ printf("Using Bluetooth L2CAP transport\n");
+ handle = OBEX_Init(OBEX_TRANS_BT_L2CAP, obex_event, 0);
+ if (channel_arg)
+ channel = atoi(channel_arg);
+ channel = (channel | 0x1001) & 0xFFFF;
+ break;
}
if (!handle) {
--
1.7.5.3
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users