[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bluetooth socket timeout, device pairing



Hello,

My Bluetooth Python module basically works now.
However, I've got one small problem with pairing ...

I have entered an 8-character PIN code in hcsecd.conf.
When I try to open a connection for the first time,
the device (i.e. my Mindstorms NXT brick) asks me to
enter the PIN code.  However, entering the code on
the brick takes some time ...  I have to scroll
through the alphabet and digits which is rather slow.
I can enter at most 4 characters of the PIN code
before the socket() call returns with ECONN
("Connection refused").

For now I'm using a short 4-character PIN code, but
I would really like to use a longer one.  Where is
the timeout defined for that?

Python's socket module has no timeout by default.
I've also searched the net.bluetooth sysctls and
increased all of the timeout values (half a dozen),
but none of them seemed to have an effect on this
particular problem.  So I think this value must be
hardcoded somewhere.  Where do I have to look?

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"If Java had true garbage collection, most programs
would delete themselves upon execution."
        -- Robert Sewell
_______________________________________________
freebsd-bluetooth_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bluetooth
To unsubscribe, send any mail to "freebsd-bluetooth-unsubscribe_(_at_)_freebsd_(_dot_)_org"