#define NIBBLE_TO_ASCII(c) ((c) < 0x0a ? (c) + 0x30 : (c) + 0x57)
+#define BREDR_DEFAULT_PSM 0x1011
+#define LE_DEFAULT_PSM 0x0080
+
/* Test modes */
enum {
SEND,
/* Default addr and psm and cid */
static bdaddr_t bdaddr;
-static unsigned short psm = 0x1011;
+static unsigned short psm = 0;
static unsigned short cid = 0;
/* Default number of frames to send (-1 = infinite) */
}
}
+ if (!psm) {
+ if (bdaddr_type == BDADDR_BREDR)
+ psm = BREDR_DEFAULT_PSM;
+ else
+ psm = LE_DEFAULT_PSM;
+ }
+
if (need_addr && !(argc - optind)) {
usage();
exit(1);