How can I use the console for input of pin code instead of the window "/usr/bin/bluez-pin"?
"许赵云" <[email protected]>
| Newsgroups | gmane.linux.bluez.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
when we use "hcitool cc [mac]",
a windows "/usr/bin/bluez-pin" pops up , and requires us to input pin code
for paring.
Now I want to use console for input of pin code, because I want to use it in
embedded system which has no GUI.
So I debugged the code to find out which sentence pops up
/usr/bin/bluez-pin.
It turned out to be this sentence in bluez-lib-3.30:
hci.c
int hci_send_cmd(int dd, uint16_t ogf, uint16_t ocf, uint8_t plen, void
*param)
{
.........
/*****************************here pops up
/usr/bin/bluez-pin***********************************************/
while (writev(dd, iv, ivn) < 0) {
if (errno == EAGAIN || errno == EINTR)
continue;
return -1;
}
return 0;
}
I don't know why it is this sentence that pops up /usr/bin/bluez-pin.
Can anyone tell me the reason?
And how should I change source codes so that I can use the console for input
of pin code?
Thanks!
Proteus
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel