From owner-freebsd-bluetooth@FreeBSD.ORG Thu Dec 18 23:01:27 2008 Return-Path: Delivered-To: freebsd-bluetooth@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC2521065674 for ; Thu, 18 Dec 2008 23:01:27 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 60D198FC0C for ; Thu, 18 Dec 2008 23:01:27 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id mBIN1P4j062022; Fri, 19 Dec 2008 00:01:25 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id mBIN1PGs062021; Fri, 19 Dec 2008 00:01:25 +0100 (CET) (envelope-from olli) Date: Fri, 19 Dec 2008 00:01:25 +0100 (CET) Message-Id: <200812182301.mBIN1PGs062021@lurza.secnetix.de> From: Oliver Fromme To: freebsd-bluetooth@FreeBSD.ORG X-Newsgroups: list.freebsd-bluetooth User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Fri, 19 Dec 2008 00:01:25 +0100 (CET) Cc: Subject: Bluetooth socket timeout, device pairing X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2008 23:01:27 -0000 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