* [Bluez-users] Pairing problem with Plantronics headset
@ 2006-08-01 0:12 John Gruenenfelder
2006-08-01 2:20 ` Marcel Holtmann
0 siblings, 1 reply; 5+ messages in thread
From: John Gruenenfelder @ 2006-08-01 0:12 UTC (permalink / raw)
To: bluez-users
I am attempting to use btsco with my Plantronics M2500 headset. I am using
the most recent Debian bluez-utils packages (3.1-3).
The headset's passkey/pin is "0000" which I have set in both
/etc/bluetooth/hcid.conf as:
passkey "0000";
and in /etc/bluetooth/passkeys/default as just "0000".
When I turn on the headset, put it in pairing mode, and then attempt to run
btsco, I get the following from btsco:
-----
./btsco 00:03:89:6E:C9:11
Error: Failed to connect to SDP server: Permission denied
Assuming channel 2
Can't connect RFCOMM channel: Permission denied
-----
In the system logs the only new entries generated are:
Jul 31 19:32:52 Redtail hcid[5743]: pin_code_request (sba=00:16:41:89:98:00, dba=00:03:89:6E:C9:11)
Jul 31 19:32:52 Redtail hcid[5743]: Calling PasskeyAgent.Request: name=:1.5, path=/org/bluez/passkey_agent_5755
Jul 31 19:32:56 Redtail hcid[5743]: pin_code_request (sba=00:16:41:89:98:00, dba=00:03:89:6E:C9:11)
Jul 31 19:32:56 Redtail hcid[5743]: Calling PasskeyAgent.Request: name=:1.5, path=/org/bluez/passkey_agent_5755
To me, these seem to indicate that the PIN is being requested, but perhaps not
being returned properly? I also tried creating a passkey explicitly for this
device as:
/etc/bluetooth/passkeys/00:03:89:6E:C9:11
But the log messages were the same for this instance. What am I doing wrong?
Thanks in advance.
--
--John Gruenenfelder Research Assistant, UMass Amherst student
Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for PalmOS -- http://gutenpalm.sf.net
"This is the most fun I've had without being drenched in the blood
of my enemies!"
--Sam of Sam & Max
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Bluez-users] Pairing problem with Plantronics headset 2006-08-01 0:12 [Bluez-users] Pairing problem with Plantronics headset John Gruenenfelder @ 2006-08-01 2:20 ` Marcel Holtmann 2006-08-01 1:06 ` John Gruenenfelder 2006-08-01 10:50 ` [Bluez-users] Problem developing bluetooth program Mate Soos 0 siblings, 2 replies; 5+ messages in thread From: Marcel Holtmann @ 2006-08-01 2:20 UTC (permalink / raw) To: BlueZ users Hi John, > I am attempting to use btsco with my Plantronics M2500 headset. I am using > the most recent Debian bluez-utils packages (3.1-3). > > The headset's passkey/pin is "0000" which I have set in both > /etc/bluetooth/hcid.conf as: > passkey "0000"; > > and in /etc/bluetooth/passkeys/default as just "0000". > > When I turn on the headset, put it in pairing mode, and then attempt to run > btsco, I get the following from btsco: > > ----- > ./btsco 00:03:89:6E:C9:11 > Error: Failed to connect to SDP server: Permission denied > Assuming channel 2 > > Can't connect RFCOMM channel: Permission denied > ----- > > In the system logs the only new entries generated are: > > Jul 31 19:32:52 Redtail hcid[5743]: pin_code_request (sba=00:16:41:89:98:00, dba=00:03:89:6E:C9:11) > Jul 31 19:32:52 Redtail hcid[5743]: Calling PasskeyAgent.Request: name=:1.5, path=/org/bluez/passkey_agent_5755 > Jul 31 19:32:56 Redtail hcid[5743]: pin_code_request (sba=00:16:41:89:98:00, dba=00:03:89:6E:C9:11) > Jul 31 19:32:56 Redtail hcid[5743]: Calling PasskeyAgent.Request: name=:1.5, path=/org/bluez/passkey_agent_5755 > > To me, these seem to indicate that the PIN is being requested, but perhaps not > being returned properly? I also tried creating a passkey explicitly for this > device as: > /etc/bluetooth/passkeys/00:03:89:6E:C9:11 > > But the log messages were the same for this instance. What am I doing wrong? > Thanks in advance. run "hcidump -X -V" and try again to see what is going on. Regards Marcel ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bluez-users] Pairing problem with Plantronics headset 2006-08-01 2:20 ` Marcel Holtmann @ 2006-08-01 1:06 ` John Gruenenfelder 2006-08-01 10:50 ` [Bluez-users] Problem developing bluetooth program Mate Soos 1 sibling, 0 replies; 5+ messages in thread From: John Gruenenfelder @ 2006-08-01 1:06 UTC (permalink / raw) To: BlueZ users On Tue, Aug 01, 2006 at 04:20:19AM +0200, Marcel Holtmann wrote: >Hi John, > >run "hcidump -X -V" and try again to see what is going on. > >Regards >Marcel Thanks for the quick reply. I ran the above command and saw in the output that the requested pin was being delivered as 0000. But I also noticed that the length was 5 bytes. Looking closer, I see that the pin is actually 0000 plus 0x0A. I had set the pin by: echo "0000" > default But that tacked on a linefeed. Using "echo -n" instead solved the problem and now the headset pairs and I get audio via btsco. Thanks. -- --John Gruenenfelder Research Assistant, UMass Amherst student Systems Manager, MKS Imaging Technology, LLC. Try Weasel Reader for PalmOS -- http://gutenpalm.sf.net "This is the most fun I've had without being drenched in the blood of my enemies!" --Sam of Sam & Max ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bluez-users] Problem developing bluetooth program 2006-08-01 2:20 ` Marcel Holtmann 2006-08-01 1:06 ` John Gruenenfelder @ 2006-08-01 10:50 ` Mate Soos 2006-08-01 14:15 ` manojt ambe 1 sibling, 1 reply; 5+ messages in thread From: Mate Soos @ 2006-08-01 10:50 UTC (permalink / raw) To: BlueZ users Hi! I have been having problems developing a bluetooth program of mine. The problem, simply put: I open an RFCOMM socket with socket(), bind(), connect(), and whatever I do, the connect() will fail with Invalid Argument. I have now made this *extremely simple* program, and I am having the same damn problem: #include <bluetooth/bluetooth.h> #include <bluetooth/rfcomm.h> #include <iostream> #include <errno.h> #include <string.h> #include <sys/socket.h> int main() { int s; int channel=3D40; char addr[40],addr2[40]; strcpy(addr,"00:11:67:39:05:0F"); strcpy(addr2,"00:11:67:39:36:BB"); std::cerr << "RfcommSocket::connectToHost from " << addr2 << " to addr: "<< addr << "," << channel << std::endl; sockaddr_rc rem_addr, loc_addr; if( (s =3D ::socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)) < 0 ) { std::cerr << "Can't create socket" << strerror(errno) << errno << std::endl; return -1; } memset(&loc_addr, 0, sizeof(loc_addr)); loc_addr.rc_family =3D AF_BLUETOOTH; str2ba(addr2,&loc_addr.rc_bdaddr); if (bind(s, (struct sockaddr *) &loc_addr, sizeof(loc_addr)) < 0 ) { std::cerr << "Can't bind socket"<< strerror(errno) << errno << std::endl; return -1; } memset(&rem_addr, 0, sizeof(rem_addr)); rem_addr.rc_family =3D AF_BLUETOOTH; str2ba(addr,&rem_addr.rc_bdaddr); rem_addr.rc_channel =3D channel; if(::connect(s, (struct sockaddr *)&rem_addr, sizeof(rem_addr)) < 0 ){ std::cerr << "Can't connect." << strerror(errno) << errno << std::endl; close(s); return -1; } std::cerr << "Connected." << std::endl; return 0; } Output of program: RfcommSocket::connectToHost from 00:11:67:39:36:BB to addr: 00:11:67:39:05:0F,40 Can't connect.Invalid argument22 Output of hciconf -a: hci0: Type: USB BD Address: 00:11:67:39:36:BB ACL MTU: 678:8 SCO MTU: 48:10 UP RUNNING PSCAN ISCAN INQUIRY RX bytes:418 acl:0 sco:0 events:22 errors:0 TX bytes:339 acl:0 sco:0 commands:22 errors:0 Features: 0xbf 0xfe 0x8d 0x78 0x08 0x18 0x00 0x00 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: Link mode: SLAVE ACCEPT Name: 'masodik' Class: 0x3e0100 Service Classes: Networking, Rendering, Capturing Device Class: Computer, Uncategorized HCI Ver: 1.2 (0x2) HCI Rev: 0x1fe LMP Ver: 1.2 (0x2) LMP Subver: 0x1fe Manufacturer: Integrated System Solution Corp. (57) hci1: Type: USB BD Address: 00:11:67:39:05:0F ACL MTU: 678:8 SCO MTU: 48:10 UP RUNNING PSCAN ISCAN RX bytes:13012 acl:110 sco:0 events:356 errors:0 TX bytes:5061 acl:110 sco:0 commands:102 errors:0 Features: 0xbf 0xfe 0x8d 0x78 0x08 0x18 0x00 0x00 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: Link mode: SLAVE ACCEPT Name: 'elso' Class: 0x3e0100 Service Classes: Networking, Rendering, Capturing Device Class: Computer, Uncategorized HCI Ver: 1.2 (0x2) HCI Rev: 0x1fe LMP Ver: 1.2 (0x2) LMP Subver: 0x1fe Manufacturer: Integrated System Solution Corp. (57) I have *really* read through all the revelant details, I have been reading the libbluetooth sourcecode nonstop(!), I have copy-pasted several examples, no luck. It always gives me this stupid error, and I am totally fed up with it. I have been getting it for the past 1.5 weeks, and I work 4 hours per day on this. Any ideas? I really appreciate all help, M=E1t=E9 So=F3s ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE= VDEV _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bluez-users] Problem developing bluetooth program 2006-08-01 10:50 ` [Bluez-users] Problem developing bluetooth program Mate Soos @ 2006-08-01 14:15 ` manojt ambe 0 siblings, 0 replies; 5+ messages in thread From: manojt ambe @ 2006-08-01 14:15 UTC (permalink / raw) To: BlueZ users Are you sure channel 40 exists on your device. Try sdptool browse <bdaddr> or sdptool records command to find out. Also i think try following to fill in sockaddr_rc. It may remove some unwanted characters. char *bdaddr_str; bdaddr_t bdaddr; struct sockaddr_rc addr; int channel=3D40; bdaddr_str =3D "00:11:67:39:05:0F"; str2ba(bdaddr_str, &bdaddr); memset(&addr, 0, sizeof(addr)); addr.rc_family =3D AF_BLUETOOTH; bacpy(&addr.rc_bdaddr, bdaddr); addr.rc_channel =3D channel; thanks, Manoj --- Mate Soos <msoos@freemail.hu> wrote: > Hi! > = > I have been having problems developing a bluetooth > program of mine. The > problem, simply put: I open an RFCOMM socket with > socket(), bind(), > connect(), and whatever I do, the connect() will > fail with Invalid > Argument. I have now made this *extremely simple* > program, and I am > having the same damn problem: > = > #include <bluetooth/bluetooth.h> > #include <bluetooth/rfcomm.h> > #include <iostream> > #include <errno.h> > #include <string.h> > #include <sys/socket.h> > = > int main() { > int s; > int channel=3D40; > char addr[40],addr2[40]; > strcpy(addr,"00:11:67:39:05:0F"); > strcpy(addr2,"00:11:67:39:36:BB"); > = > = > std::cerr << "RfcommSocket::connectToHost from " > << addr2 << " to > addr: "<< addr << "," << channel << std::endl; > sockaddr_rc rem_addr, loc_addr; > = > if( (s =3D ::socket(PF_BLUETOOTH, SOCK_STREAM, > BTPROTO_RFCOMM)) < 0 ) { > std::cerr << "Can't create socket" << > strerror(errno) << errno > << std::endl; > return -1; > } > = > memset(&loc_addr, 0, sizeof(loc_addr)); > loc_addr.rc_family =3D AF_BLUETOOTH; > str2ba(addr2,&loc_addr.rc_bdaddr); > if (bind(s, (struct sockaddr *) &loc_addr, > sizeof(loc_addr)) < 0 ) { > std::cerr << "Can't bind socket"<< = > strerror(errno) << errno << > std::endl; > return -1; > } > = > memset(&rem_addr, 0, sizeof(rem_addr)); > rem_addr.rc_family =3D AF_BLUETOOTH; > str2ba(addr,&rem_addr.rc_bdaddr); > rem_addr.rc_channel =3D channel; > if(::connect(s, (struct sockaddr *)&rem_addr, > sizeof(rem_addr)) < 0 ){ > std::cerr << "Can't connect." << > strerror(errno) << errno << > std::endl; > close(s); > return -1; > } > std::cerr << "Connected." << std::endl; > return 0; > } > = > Output of program: > = > RfcommSocket::connectToHost from 00:11:67:39:36:BB > to addr: > 00:11:67:39:05:0F,40 > Can't connect.Invalid argument22 > = > Output of hciconf -a: > = > hci0: Type: USB > BD Address: 00:11:67:39:36:BB ACL MTU: 678:8 > SCO MTU: 48:10 > UP RUNNING PSCAN ISCAN INQUIRY > RX bytes:418 acl:0 sco:0 events:22 errors:0 > TX bytes:339 acl:0 sco:0 commands:22 > errors:0 > Features: 0xbf 0xfe 0x8d 0x78 0x08 0x18 0x00 > 0x00 > Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 > HV3 > Link policy: > Link mode: SLAVE ACCEPT > Name: 'masodik' > Class: 0x3e0100 > Service Classes: Networking, Rendering, > Capturing > Device Class: Computer, Uncategorized > HCI Ver: 1.2 (0x2) HCI Rev: 0x1fe LMP Ver: > 1.2 (0x2) LMP Subver: > 0x1fe > Manufacturer: Integrated System Solution > Corp. (57) > = > hci1: Type: USB > BD Address: 00:11:67:39:05:0F ACL MTU: 678:8 > SCO MTU: 48:10 > UP RUNNING PSCAN ISCAN > RX bytes:13012 acl:110 sco:0 events:356 > errors:0 > TX bytes:5061 acl:110 sco:0 commands:102 > errors:0 > Features: 0xbf 0xfe 0x8d 0x78 0x08 0x18 0x00 > 0x00 > Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 > HV3 > Link policy: > Link mode: SLAVE ACCEPT > Name: 'elso' > Class: 0x3e0100 > Service Classes: Networking, Rendering, > Capturing > Device Class: Computer, Uncategorized > HCI Ver: 1.2 (0x2) HCI Rev: 0x1fe LMP Ver: > 1.2 (0x2) LMP Subver: > 0x1fe > Manufacturer: Integrated System Solution > Corp. (57) > = > = > I have *really* read through all the revelant > details, I have been > reading the libbluetooth sourcecode nonstop(!), I > have copy-pasted > several examples, no luck. It always gives me this > stupid error, and I > am totally fed up with it. I have been getting it > for the past 1.5 > weeks, and I work 4 hours per day on this. Any > ideas? > = > I really appreciate all help, > = > M=E1t=E9 So=F3s > = > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get > the chance to share your > opinions on IT & business topics through brief > surveys -- and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE= VDEV > _______________________________________________ > Bluez-users mailing list > Bluez-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bluez-users > = __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around = http://mail.yahoo.com = ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE= VDEV _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-08-01 14:15 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-08-01 0:12 [Bluez-users] Pairing problem with Plantronics headset John Gruenenfelder 2006-08-01 2:20 ` Marcel Holtmann 2006-08-01 1:06 ` John Gruenenfelder 2006-08-01 10:50 ` [Bluez-users] Problem developing bluetooth program Mate Soos 2006-08-01 14:15 ` manojt ambe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox