---
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 93838f8..17d83c1 100644
--- a/apps/obex_test/obex_test.c
+++ b/apps/obex_test/obex_test.c
@@ -165,9 +165,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;
@@ -190,6 +190,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"
@@ -212,7 +213,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 ) )
@@ -280,7 +283,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)
@@ -288,6 +291,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.4.1
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users