From owner-freebsd-bluetooth@FreeBSD.ORG Sun Dec 19 21:33:19 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50F2716A4CE for ; Sun, 19 Dec 2004 21:33:19 +0000 (GMT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA34143D39 for ; Sun, 19 Dec 2004 21:33:17 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.43 (FreeBSD)) id 1Cg8Iu-0000VR-6z; Mon, 20 Dec 2004 00:09:24 +0300 From: Vladimir Grebenschikov To: Maksim Yevmenkin In-Reply-To: <41C32471.2050805@savvis.net> References: <1100552998.1098.5.camel@localhost> <419B8353.7040908@savvis.net> <419B9EF8.2090401@savvis.net> <1103269957.974.7.camel@localhost> <41C32471.2050805@savvis.net> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Mon, 20 Dec 2004 00:09:23 +0300 Message-Id: <1103490563.1721.28.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov cc: bluetooth@freebsd.org Subject: Re: Bluetooth mouse X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vova@fbsd.ru List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 21:33:19 -0000 =F7 =D0=D4, 17/12/2004 =D7 10:24 -0800, Maksim Yevmenkin =D0=C9=DB=C5=D4: > Vladimir, > > Also, I think, it is better to provide usual /dev/*msX interface for > > moused ?=20 >=20 > why? Just because all other mouses use moused as userland programs to get bytes from driver and push them to console. Actually moused do two things 1. "knows" how to work with different mouse hardware 2. "knows" how to adjust mouse settings (rate, buttons mappings, axis, wheels, 3-button emulation, double-click, resolution, etc) And 1. is clearly has nothing to do with bluetooth mouse, but as for 2. - I do not think we want to duplicate all these staff in bthidd. Probably I was not right when talk about one more netgraph module, and better way is to add opened bt socket support to moused and then spawn moused from bthidd when new mouse connected. What you think about this idea ?=20 > > It looks like I need to write ng node which will connect to l2cap node > > one side and create /dev/btmsX on another side ?=20 >=20 > well, actually its much simpler :) most of the work already was done.=20 > take a look at /usr/src/usr.sbin/bluetooth/{bthidcontrol,bthidd}. these=20 > are not yet connected to the build, but you should be able to compile=20 > and run them. Yes, good surprise ! > bthidcontrol(8) is a utility that can query bluetooth hid devices and=20 > create configuration for bthidd(8). >=20 > % nroff -man bthidcontrol.8 | less -- for more information >=20 > bthidd(8) is a bluetooth hid daemon (incomplete but mouse should work).=20 > it will read configuration created by bthidcontrol(8) and talk to=20 > bluetooth hid devices. Unfortunately it does not work for me (I have write details in separate message). So I need first get it work. > whats needs to be done: >=20 > 1) finish and test bthidd(8) and vkbd(4) integration (bluetooth keyboard=20 > support). i've done most of it, but was never able to finish and test it = :( Unfortunately still have not bluetooth keyboard. > 2) better handling of bluetooth mouse events, i.e. detect double clicks=20 > etc. and send appropriate ioctl(2) to /dev/console. double clicks etc.=20 > will work in X, but not in the text mode. Yes, it is what I talk before, all these stuff is already exists in moused. > thanks, > max --=20 Vladimir B. Grebenchikov vova@fbsd.ru From owner-freebsd-bluetooth@FreeBSD.ORG Sun Dec 19 21:33:23 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0305C16A4CE for ; Sun, 19 Dec 2004 21:33:23 +0000 (GMT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id C95A443D39 for ; Sun, 19 Dec 2004 21:33:20 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.43 (FreeBSD)) id 1Cg86n-0000Tr-Ir; Sun, 19 Dec 2004 23:56:53 +0300 From: Vladimir Grebenschikov To: Maksim Yevmenkin In-Reply-To: <41C35B92.7080908@savvis.net> References: <1100552998.1098.5.camel@localhost> <419B8353.7040908@savvis.net> <419B9EF8.2090401@savvis.net> <1103269957.974.7.camel@localhost> <41C32471.2050805@savvis.net> <866530fusa.fsf@kamino.rfc1149.org> <41C35B92.7080908@savvis.net> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Sun, 19 Dec 2004 23:56:53 +0300 Message-Id: <1103489813.1721.14.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov cc: bluetooth@freebsd.org Subject: Re: Bluetooth mouse X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vova@fbsd.ru List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 21:33:23 -0000 =F7 =D0=D4, 17/12/2004 =D7 14:20 -0800, Maksim Yevmenkin =D0=C9=DB=C5=D4:=20 > Arne Schwabe wrote: > > Maksim Yevmenkin writes: > >=20 > >>bthidcontrol(8) is a utility that can query bluetooth hid devices and=20 > >>create configuration for bthidd(8). > >> > >>% nroff -man bthidcontrol.8 | less -- for more information > >> > >>bthidd(8) is a bluetooth hid daemon (incomplete but mouse should work).= =20 > >>it will read configuration created by bthidcontrol(8) and talk to=20 > >>bluetooth hid devices. > >=20 > > I just tried it with my Logitech MX900 mouse, it works! :) >=20 > good. I was not such lucky with mx900. My experience: bthidcontrol works ok: # bthidcontrol -a mouse known 00:07:61:17:9b:27 mouse # bthidcontrol -a mouse query device { bdaddr 00:07:61:17:9b:27; control_psm 0x11; interrupt_psm 0x19; reconnect_initiate true; battery_power true; normally_connectable false; hid_descriptor { 0x05 0x01 0x09 0x02 0xa1 0x01 0x85 0x02=20 0x09 0x01 0xa1 0x00 0x05 0x09 0x19 0x01=20 0x29 0x08 0x15 0x00 0x25 0x01 0x95 0x08=20 0x75 0x01 0x81 0x02 0x05 0x01 0x09 0x30=20 0x09 0x31 0x16 0x01 0xf8 0x26 0xff 0x07=20 0x75 0x0c 0x95 0x02 0x81 0x06 0x09 0x38=20 0x15 0x81 0x25 0x7f 0x75 0x08 0x95 0x01=20 0x81 0x06 0xc0 0xc0 0x06 0x00 0xff 0x09=20 0x01 0xa1 0x01 0x85 0x10 0x75 0x08 0x95=20 0x06 0x15 0x00 0x26 0xff 0x00 0x09 0x01=20 0x81 0x00 0x09 0x01 0x91 0x00 0xc0=20 }; } # bthidcontrol -a mouse dump Collection page=3DGeneric_Desktop usage=3DMouse Collection page=3DGeneric_Desktop usage=3DPointer Input id=3D2 size=3D1 count=3D1 page=3DButton usage=3DButton_1 Variable, = logical range 0..1 Input id=3D2 size=3D1 count=3D1 page=3DButton usage=3DButton_2 Variable, = logical range 0..1 Input id=3D2 size=3D1 count=3D1 page=3DButton usage=3DButton_3 Variable, = logical range 0..1 Input id=3D2 size=3D1 count=3D1 page=3DButton usage=3DButton_4 Variable, = logical range 0..1 Input id=3D2 size=3D1 count=3D1 page=3DButton usage=3DButton_5 Variable, = logical range 0..1 Input id=3D2 size=3D1 count=3D1 page=3DButton usage=3DButton_6 Variable, = logical range 0..1 Input id=3D2 size=3D1 count=3D1 page=3DButton usage=3DButton_7 Variable, = logical range 0..1 Input id=3D2 size=3D1 count=3D1 page=3DButton usage=3DButton_8 Variable, = logical range 0..1 Input id=3D2 size=3D12 count=3D1 page=3DGeneric_Desktop usage=3DX Variabl= e Relative, logical range -2047..2047 Input id=3D2 size=3D12 count=3D1 page=3DGeneric_Desktop usage=3DY Variabl= e Relative, logical range -2047..2047 Input id=3D2 size=3D8 count=3D1 page=3DGeneric_Desktop usage=3DWheel Vari= able Relative, logical range -127..127 End collection End collection Input id=3D16 size=3D8 count=3D6 page=3DMicrosoft usage=3D0x0001, logical= range 0..255 Output id=3D16 size=3D8 count=3D6 page=3DMicrosoft usage=3D0x0001, logical= range 0..255 Collection page=3DMicrosoft usage=3D0x0001 # my configurations files are: # cat /etc/bluetooth/bthidd.conf device { bdaddr 00:07:61:17:9b:27; control_psm 0x11; interrupt_psm 0x19; reconnect_initiate true; battery_power true; normally_connectable false; hid_descriptor { 0x05 0x01 0x09 0x02 0xa1 0x01 0x85 0x02=20 0x09 0x01 0xa1 0x00 0x05 0x09 0x19 0x01=20 0x29 0x08 0x15 0x00 0x25 0x01 0x95 0x08=20 0x75 0x01 0x81 0x02 0x05 0x01 0x09 0x30=20 0x09 0x31 0x16 0x01 0xf8 0x26 0xff 0x07=20 0x75 0x0c 0x95 0x02 0x81 0x06 0x09 0x38=20 0x15 0x81 0x25 0x7f 0x75 0x08 0x95 0x01=20 0x81 0x06 0xc0 0xc0 0x06 0x00 0xff 0x09=20 0x01 0xa1 0x01 0x85 0x10 0x75 0x08 0x95=20 0x06 0x15 0x00 0x26 0xff 0x00 0x09 0x01=20 0x81 0x00 0x09 0x01 0x91 0x00 0xc0=20 }; } # cat /var/db/bthidd.hids 00:07:61:17:9b:27 # When I start bthidd it waits for mouse connection forever, clicking on mous= e connect button does not seems to have any effect, moreover hcidump does not show any traffic. But bthidd listens on /17 and /19 (why not /11 ?) # btsockstat=20 Active raw HCI sockets Socket PCB Flags Recv-Q Send-Q Local address =20 c2e44654 c273b500 000003 0 0 * =20 c1dba288 c2060880 000002 0 0 * =20 Active L2CAP sockets PCB Recv-Q Send-Q Local address/PSM Foreign address CID Stat= e c2fa8700 0 0 * /19 * 0 LIST= EN c2fa9700 0 0 * /17 * 0 LIST= EN c1957200 0 0 * /1 * 0 LIST= EN # If I try to change reconnect_initiative to false bthidd try to connect to m= ouse but gets error: # bthidd -d bthidd[1785]: Opening outbound session for 00:07:61:17:9b:27 (new_device=3D= 0, reconnect_initiate=3D0) bthidd[1785]: Could not connect to 00:07:61:17:9b:27. Socket is not connect= ed (57) while hcidump shows: # hcidump HCIDump - HCI packet analyzer ver 1.5 device: any snap_len: 65535 filter: 0xffffffff < HCI Command: Create Connection(0x01|0x0005) plen 13 > HCI Event: Command Status(0x0f) plen 4 > HCI Event: Connect Complete(0x03) plen 11 < HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4 < ACL data: handle 0x0029 flags 0x02 dlen 12 L2CAP(s): Connect req: psm 17 scid 0x004c > HCI Event: Number of Completed Packets(0x13) plen 5 > HCI Event: Command Complete(0x0e) plen 6 > HCI Event: Page Scan Repetition Mode Change(0x20) plen 7 > ACL data: handle 0x0029 flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x004d scid 0x004c result 1 status 2 > ACL data: handle 0x0029 flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x0000 scid 0x004c result 2 status 0 > HCI Event: QoS Setup Complete(0x0d) plen 21 > HCI Event: Disconn Complete(0x05) plen 4 On mouse I have picture where attaching procedure shown as 1. Click connect on mouse 2. Click connect on USB receiver. Looks like mouse gets passive state and waits for receiver connection after= connect button. Mouse works Ok under winXP with onboard bt. (Is there way with hcidump "listen" traffic between XP and mouse to get clu= e ?) If mouse already connected with USB receiver it do not answer even on l2pin= g. My bluetooth controller: ubt0: ALPS UGX, rev 1.10/7.81, addr 2 ubt0: ALPS UGX, rev 1.10/7.81, addr 2 ubt0: Interface 0 endpoints: interrupt=3D0x81, bulk-in=3D0x82, bulk-out=3D0= x2 ubt0: Interface 1 (alt.config 5) endpoints: isoc-in=3D0x83, isoc-out=3D0x3;= wMaxPacketSize=3D49; nframes=3D6, buffer size=3D294 # ngctl ls There are 7 total nodes: Name: ngctl1850 Type: socket ID: 00000020 Num hooks: 0 Name: ubt0l2cap Type: l2cap ID: 0000001a Num hooks: 3 Name: ubt0hci Type: hci ID: 00000016 Num hooks: 3 Name: btsock_l2c Type: btsock_l2c ID: 00000005 Num hooks: 1 Name: btsock_l2c_raw Type: btsock_l2c_raw ID: 00000004 Num hooks: 1 Name: btsock_hci_raw Type: btsock_hci_raw ID: 00000003 Num hooks: 1 Name: ubt0 Type: ubt ID: 00000002 Num hooks: 1 Any ideas is very appreciated. > > But for _some_ reason, my third and second buttons are swapped. Well I >=20 > the code just parses input hid reports according to the device's hid=20 > descriptor. it hid descriptor says its second button it will be second=20 > button :) >=20 > > hacked it in the hid.c source code %) >=20 > well, you are more then welcome to hack it further. i hope that enough=20 > bluetooth hid users will send me their hacks so i finally will be able=20 > to finish this :) >=20 > thanks, > max --=20 Vladimir B. Grebenchikov vova@fbsd.ru From owner-freebsd-bluetooth@FreeBSD.ORG Mon Dec 20 02:35:08 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C621216A4CE for ; Mon, 20 Dec 2004 02:35:08 +0000 (GMT) Received: from mta9.adelphia.net (mta9.adelphia.net [68.168.78.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A30543D3F for ; Mon, 20 Dec 2004 02:35:08 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [192.168.1.254] (really [70.32.233.78]) by mta9.adelphia.net (InterMail vM.6.01.03.02 201-2131-111-104-20040324) with ESMTP id <20041220023505.EJPJ14945.mta9.adelphia.net@[192.168.1.254]>; Sun, 19 Dec 2004 21:35:05 -0500 Message-ID: <41C63A62.20304@savvis.net> Date: Sun, 19 Dec 2004 18:35:14 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: vova@fbsd.ru References: <1100552998.1098.5.camel@localhost> <419B8353.7040908@savvis.net> <419B9EF8.2090401@savvis.net> <1103269957.974.7.camel@localhost> <41C32471.2050805@savvis.net> <866530fusa.fsf@kamino.rfc1149.org> <41C35B92.7080908@savvis.net> <1103489813.1721.14.camel@localhost> In-Reply-To: <1103489813.1721.14.camel@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: bluetooth@freebsd.org Subject: Re: Bluetooth mouse X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2004 02:35:08 -0000 Vladimir, >>>>bthidcontrol(8) is a utility that can query bluetooth hid devices and >>>>create configuration for bthidd(8). >>>> >>>>% nroff -man bthidcontrol.8 | less -- for more information >>>> >>>>bthidd(8) is a bluetooth hid daemon (incomplete but mouse should work). >>>>it will read configuration created by bthidcontrol(8) and talk to >>>>bluetooth hid devices. >>> >>>I just tried it with my Logitech MX900 mouse, it works! :) >> >>good. > > I was not such lucky with mx900. > > My experience: > > bthidcontrol works ok: [...] good. > my configurations files are: > > # cat /etc/bluetooth/bthidd.conf [...] > # cat /var/db/bthidd.hids > 00:07:61:17:9b:27 hmmm... you did not hand-edit /var/db/bthidd.hids, did you? this file is not supposed to be edited by user. this file contains "hints" for bthidd(8), that is bluetooth hid devices "known" to bthidd(8). > When I start bthidd it waits for mouse connection forever, clicking on mouse connect button does not seems to have any effect, > moreover hcidump does not show any traffic. again if you hand-edited /var/db/bthidd.hids, then this is the correct behavior. the typical behavior of bluetooth hid devices is: the very first time bluetooth hid device needs to be contacted by the host. this is because in its default state bluetooth hid device does not know anything about host, i.e. its bd_addr etc. in its default state the hid device will answer inquiry, etc. the host finds new hid device and initiates bluetooth hid session (opens interrupt and control channels). after the hid device was contacted by the host for the very first time, the hid device will "remember" host bd_addr. after that bluetooth hid device will reject all connection attempts from the different hosts and may even stop responding to inquires. so, the /var/db/bthidd.hids file contains bd_addrs of the bluetooth hid devices that were contacted by the host (bthidd(8)) at least once. in order to get bluetooth hid device in its default state you will need to press reset button (if any) or just disconnect batteries for a few seconds. > But bthidd listens on /17 and /19 (why not /11 ?) 0x11 = 17 and 0x13 = 19 :) [...] > If I try to change reconnect_initiative to false bthidd try to connect to mouse but gets error: > > # bthidd -d > bthidd[1785]: Opening outbound session for 00:07:61:17:9b:27 (new_device=0, reconnect_initiate=0) > bthidd[1785]: Could not connect to 00:07:61:17:9b:27. Socket is not connected (57) that will not work. what you put into /etc/bluetooth/bthidd.conf (output of bthidcontrol(8)) is what devices tells us to do. that is a locally cached copy of bluetooth hid descriptor. "reconnect_initiate = true" and "normally_connectable = false" tells the host that device will initiate reconnect and host should not try to attempt to contact it. [...] > On mouse I have picture where attaching procedure shown as > 1. Click connect on mouse > 2. Click connect on USB receiver. > > Looks like mouse gets passive state and waits for receiver connection after connect button. 0) run hcidump -w mouse.dump as root 1) make sure bthidd(8) is NOT running 2) reset the mouse (press reset button or disconnect batteries for a few seconds) 3) use bthidcontrol(8) to query the mouse 4) put output of the bthidcontrol(8) in the /etc/bluetooth/bthidd.conf 5) make sure mouse bd_addr IS *NOT* in the /var/db/bthidd.hids 6) (OPTIONAL) *if* your mouse requests authentication then edit /etc/bluetooth/hcsecd.conf file and add pin code or link key. the pin code can be obtained from the mouse documentation. after that run hcsecd(8) 7) start bthidd(8) if you did everything right the mouse should work. NOTE: the mouse will shutdown itself after some period of inactivity. to bring it back just move it and/or press the buttons. you do *NOT* need to fiddle with bthidd(8) and or bthidcontrol(8) anymore. if you done everything above and it still does not work then send me hcidump output. NOTE: if your have reset your mouse or replaced batteries you all you need to do is: use 'bthidcontrol forget' command and restart bthidd(8). > Mouse works Ok under winXP with onboard bt. > (Is there way with hcidump "listen" traffic between XP and mouse to get clue ?) bluetooth is a point-to-point link. i do not know a way to put bluetooth device in promiscuous mode, and, thus sniff traffic between another pair of devices. > If mouse already connected with USB receiver it do not answer even on l2ping. see above thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Mon Dec 20 03:15:52 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0488A16A4D3 for ; Mon, 20 Dec 2004 03:15:51 +0000 (GMT) Received: from mta11.adelphia.net (mta11.adelphia.net [68.168.78.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E28D43D54 for ; Mon, 20 Dec 2004 03:15:51 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [192.168.1.254] (really [70.32.233.78]) by mta11.adelphia.net (InterMail vM.6.01.03.02 201-2131-111-104-20040324) with ESMTP id <20041220031548.WPRL1403.mta11.adelphia.net@[192.168.1.254]>; Sun, 19 Dec 2004 22:15:48 -0500 Message-ID: <41C643EC.3060405@savvis.net> Date: Sun, 19 Dec 2004 19:15:56 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: vova@fbsd.ru References: <1100552998.1098.5.camel@localhost> <419B8353.7040908@savvis.net> <419B9EF8.2090401@savvis.net> <1103269957.974.7.camel@localhost> <41C32471.2050805@savvis.net> <1103490563.1721.28.camel@localhost> In-Reply-To: <1103490563.1721.28.camel@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: bluetooth@freebsd.org Subject: Re: Bluetooth mouse X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2004 03:15:52 -0000 Vladimir, >>>Also, I think, it is better to provide usual /dev/*msX interface for >>>moused ? >> >>why? > > Just because all other mouses use moused as userland programs to get > bytes from driver and push them to console. > > Actually moused do two things > 1. "knows" how to work with different mouse hardware moused(8) only knows about the particular hardware, because someone extend moused(8) to support this particular hardware. there is no universal protocol that will work for every hardware. > 2. "knows" how to adjust mouse settings (rate, buttons mappings, axis, > wheels, 3-button emulation, double-click, resolution, etc) i'm not sure what settings are you talking about. button mapping is so trivial that i would never consider to pipe the data through bthidd(8) + moused(8). i do not think that 3-button emulation and double-click are good enough reasons to involve moused(8). if we are worried about code duplication then this code could be moved into a separate file (so bthidd(8) can use it too) or even separate library. > And 1. is clearly has nothing to do with bluetooth mouse, but as for 2. > - I do not think we want to duplicate all these staff in bthidd. correct. i do not think you can even adjust anything in bluetooth mouse. > Probably I was not right when talk about one more netgraph module, and > better way is to add opened bt socket support to moused and then spawn > moused from bthidd when new mouse connected. > > What you think about this idea ? see above. do not forget that bluetooth hid sessions are come and go. bluetooth mouse, for example, will put itself to sleep after few seconds of inactivity. this means bthidd(8) would probably have to manage all moused(8) processes it had created. do not forget that at the end moused(8) just does exactly what bthidd(8) does - feeds events via /dev/console ioctl(2) call. one could argue that it is possible to extend moused(8) to support bluetooth hid devices natively. after all bluetooth is only used to pipe usb hid reports, so from moused(8) point of view bluetooth mouse is no different from a usb mouse. the only problem is that you need device's hid descriptor to parse hid report. that is what ums(4) driver does - it parses hid reports and converts them into something moused(8) can work with. in bluetooth case bthidd(8) can convert hid reports into moused(8) format, but why? if it has already done 2/3rd of the job why use moused(8) to do remaining 1/3rd? if we really want to use moused(8) then i'd suggest we teach moused(8) about bluetooth mice and drop mouse support in bthidd(8) altogether. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Mon Dec 20 07:22:37 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55EF816A4CE for ; Mon, 20 Dec 2004 07:22:37 +0000 (GMT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AB7643D55 for ; Mon, 20 Dec 2004 07:22:34 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.43 (FreeBSD)) id 1CgHsE-0000QJ-1v; Mon, 20 Dec 2004 10:22:30 +0300 From: Vladimir Grebenschikov To: Maksim Yevmenkin In-Reply-To: <41C63A62.20304@savvis.net> References: <1100552998.1098.5.camel@localhost> <419B8353.7040908@savvis.net> <419B9EF8.2090401@savvis.net> <1103269957.974.7.camel@localhost> <41C32471.2050805@savvis.net> <866530fusa.fsf@kamino.rfc1149.org> <41C35B92.7080908@savvis.net> <1103489813.1721.14.camel@localhost> <41C63A62.20304@savvis.net> Content-Type: multipart/mixed; boundary="=-jxyyzihfbX3R7i+5jj7B" Organization: SWsoft Date: Mon, 20 Dec 2004 10:22:29 +0300 Message-Id: <1103527349.1024.18.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov cc: bluetooth@freebsd.org Subject: Re: Bluetooth mouse X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vova@fbsd.ru List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2004 07:22:37 -0000 --=-jxyyzihfbX3R7i+5jj7B Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable =F7 =D7=D3, 19/12/2004 =D7 18:35 -0800, Maksim Yevmenkin =D0=C9=DB=C5=D4: > Vladimir, > > # cat /var/db/bthidd.hids > > 00:07:61:17:9b:27 >=20 > hmmm... you did not hand-edit /var/db/bthidd.hids, did you? this file is=20 > not supposed to be edited by user. this file contains "hints" for=20 > bthidd(8), that is bluetooth hid devices "known" to bthidd(8). Yes, I did. I've edited it while tried to make mouse works. > > When I start bthidd it waits for mouse connection forever, clicking on = mouse connect button does not seems to have any effect, > > moreover hcidump does not show any traffic. >=20 > again if you hand-edited /var/db/bthidd.hids, then this is the correct=20 > behavior. the typical behavior of bluetooth hid devices is: the very=20 > first time bluetooth hid device needs to be contacted by the host. this=20 > is because in its default state bluetooth hid device does not know=20 > anything about host, i.e. its bd_addr etc. in its default state the hid=20 > device will answer inquiry, etc. the host finds new hid device and=20 > initiates bluetooth hid session (opens interrupt and control channels).=20 > after the hid device was contacted by the host for the very first time,=20 > the hid device will "remember" host bd_addr. after that bluetooth hid=20 > device will reject all connection attempts from the different hosts and=20 > may even stop responding to inquires. I see. > 0) run hcidump -w mouse.dump as root >=20 > 1) make sure bthidd(8) is NOT running >=20 > 2) reset the mouse (press reset button or disconnect batteries for a few=20 > seconds) >=20 > 3) use bthidcontrol(8) to query the mouse >=20 > 4) put output of the bthidcontrol(8) in the /etc/bluetooth/bthidd.conf >=20 > 5) make sure mouse bd_addr IS *NOT* in the /var/db/bthidd.hids >=20 > 6) (OPTIONAL) *if* your mouse requests authentication then edit=20 > /etc/bluetooth/hcsecd.conf file and add pin code or link key. the pin=20 > code can be obtained from the mouse documentation. after that run hcsecd(= 8) looks like it does not require key or pin, also winXP connects only without= pin. > 7) start bthidd(8) >=20 > if you did everything right the mouse should work. Still no luck, but this time there is attempt to connect from host to mouse= on bthidd start: # bthidd -d bthidd[1398]: Opening outbound session for 00:07:61:17:9b:27 (new_device=3D= 1, reconnect_initiate=3D1) bthidd[1398]: Could not connect to 00:07:61:17:9b:27. Socket is not connect= ed (57) There hcidump output while bthidd connection attempt # hcidump -r mouse.dump HCIDump - HCI packet analyzer ver 1.5 < HCI Command: Create Connection(0x01|0x0005) plen 13 > HCI Event: Command Status(0x0f) plen 4 > HCI Event: Connect Complete(0x03) plen 11 < HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4 < ACL data: handle 0x002a flags 0x02 dlen 12 L2CAP(s): Connect req: psm 17 scid 0x0060 > HCI Event: Number of Completed Packets(0x13) plen 5 > HCI Event: Command Complete(0x0e) plen 6 > ACL data: handle 0x002a flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x005c scid 0x0060 result 1 status 2 > ACL data: handle 0x002a flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0060 result 2 status 0 > HCI Event: QoS Setup Complete(0x0d) plen 21 > HCI Event: Disconn Complete(0x05) plen 4 # mouse.dump itself in attachment also, after hardware reset by batteries, /var/db/bthidd.hids get address of mouse, but do not write anything new to output and mouse still does not work. bthidd[1610]: Opening outbound session for 00:07:61:17:9b:27 (new_device=3D1, reconnect_initiate=3D1) bthidd[1610]: Could not connect to 00:07:61:17:9b:27. Socket is not connected (57) hcidump while this is: < HCI Command: Create Connection(0x01|0x0005) plen 13 > HCI Event: Command Status(0x0f) plen 4 > HCI Event: Connect Complete(0x03) plen 11 < HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4 < ACL data: handle 0x0029 flags 0x02 dlen 12 L2CAP(s): Connect req: psm 17 scid 0x006d > HCI Event: Number of Completed Packets(0x13) plen 5 > HCI Event: Command Complete(0x0e) plen 6 > ACL data: handle 0x0029 flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x0042 scid 0x006d result 1 status 2 > ACL data: handle 0x0029 flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x0042 scid 0x006d result 0 status 0 < ACL data: handle 0x0029 flags 0x02 dlen 12 L2CAP(s): Config req: dcid 0x0042 flags 0x0000 clen 0 > HCI Event: Number of Completed Packets(0x13) plen 5 > HCI Event: QoS Setup Complete(0x0d) plen 21 > ACL data: handle 0x0029 flags 0x02 dlen 14 L2CAP(s): Config rsp: scid 0x006d flags 0x0000 result 0 clen 0 > ACL data: handle 0x0029 flags 0x02 dlen 27 > ACL data: handle 0x0029 flags 0x01 dlen 13 L2CAP(s): Config req: dcid 0x006d flags 0x0000 clen 28 MTU 48 Unknown (type 03, len 22)=20 < ACL data: handle 0x0029 flags 0x02 dlen 14 L2CAP(s): Config rsp: scid 0x0042 flags 0x0000 result 0 clen 0 < ACL data: handle 0x0029 flags 0x02 dlen 12 L2CAP(s): Connect req: psm 25 scid 0x006e > HCI Event: Number of Completed Packets(0x13) plen 5 > HCI Event: Number of Completed Packets(0x13) plen 5 > ACL data: handle 0x0029 flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x0000 scid 0x006e result 2 status 0 < ACL data: handle 0x0029 flags 0x02 dlen 12 L2CAP(s): Disconn req: dcid 0x0042 scid 0x006d > HCI Event: Number of Completed Packets(0x13) plen 5 > ACL data: handle 0x0029 flags 0x02 dlen 12 L2CAP(s): Disconn rsp: dcid 0x0042 scid 0x006d < HCI Command: Disconnect(0x01|0x0006) plen 3 > HCI Event: Command Status(0x0f) plen 4 > HCI Event: Disconn Complete(0x05) plen 4 It happens when I disconnect/connect batteries and then press connect button. Even after that mouse does not moved. if I restart bthidd - it does not connects and mouse does not send any traffic. > NOTE: the mouse will shutdown itself after some period of inactivity. to=20 > bring it back just move it and/or press the buttons. you do *NOT* need=20 > to fiddle with bthidd(8) and or bthidcontrol(8) anymore. if you done=20 > everything above and it still does not work then send me hcidump output. >=20 > NOTE: if your have reset your mouse or replaced batteries you all you=20 > need to do is: use 'bthidcontrol forget' command and restart bthidd(8). > thanks, > max --=20 Vladimir B. Grebenchikov vova@fbsd.ru --=-jxyyzihfbX3R7i+5jj7B Content-Disposition: attachment; filename=mouse.dump Content-Type: application/octet-stream; name=mouse.dump Content-Transfer-Encoding: base64 EQAAANB3xkEiSAAAAQUEDSebF2EHABjMAQAAAAEHAAEA0HfGQf5fAAAEDwQAAQUEDgABANF3xkEC oAoABAMLACoAJ5sXYQcAAQAIAAAA0XfGQQugCgABDQgEKgAPABEAAADRd8ZBDqAKAAIqIAwACAAB AAIBBAARAGAACAABANF3xkEutwoABBMFASoAAQAJAAEA0XfGQcbGCgAEDgYBDQgAKgAVAAEA0XfG QfZDCwACKiAQAAwAAQADAQgAXABgAAEAAgAVAAEA0XfGQdTICwACKiAQAAwAAQADAQgAAABgAAIA AAAYAAEA0XfGQbVFDAAEDRUAKgAAAQAAAAAAAAAA8isAAP////8HAAEA0nfGQRtwAQAEBQQAKgAT --=-jxyyzihfbX3R7i+5jj7B-- From owner-freebsd-bluetooth@FreeBSD.ORG Mon Dec 20 19:41:21 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B68E216A4CE for ; Mon, 20 Dec 2004 19:41:21 +0000 (GMT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C86F43D2D for ; Mon, 20 Dec 2004 19:41:21 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from out001.email.savvis.net (out001.apptix.savvis.net [216.91.32.44])iBKJegfX027251; Mon, 20 Dec 2004 13:40:42 -0600 Received: from s228130hz1ew17.apptix-01.savvis.net ([10.146.4.29]) by out001.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Mon, 20 Dec 2004 13:40:21 -0600 Received: from [10.254.186.111] ([66.35.239.94]) by s228130hz1ew17.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Mon, 20 Dec 2004 13:40:08 -0600 Message-ID: <41C72A9B.6090405@savvis.net> Date: Mon, 20 Dec 2004 11:40:11 -0800 From: Maksim Yevmenkin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040822 X-Accept-Language: en-us, en MIME-Version: 1.0 To: vova@fbsd.ru References: <1100552998.1098.5.camel@localhost> <419B8353.7040908@savvis.net> <419B9EF8.2090401@savvis.net> <1103269957.974.7.camel@localhost> <41C32471.2050805@savvis.net> <866530fusa.fsf@kamino.rfc1149.org> <41C35B92.7080908@savvis.net> <1103489813.1721.14.camel@localhost> <41C63A62.20304@savvis.net> <1103527349.1024.18.camel@localhost> In-Reply-To: <1103527349.1024.18.camel@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Dec 2004 19:40:09.0066 (UTC) FILETIME=[B6AB84A0:01C4E6CB] X-ECS-MailScanner: No virus is found cc: bluetooth@freebsd.org Subject: Re: Bluetooth mouse X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2004 19:41:21 -0000 Vladimir, >>> # cat /var/db/bthidd.hids 00:07:61:17:9b:27 >> >> hmmm... you did not hand-edit /var/db/bthidd.hids, did you? this >> file is not supposed to be edited by user. this file contains >> "hints" for bthidd(8), that is bluetooth hid devices "known" to >> bthidd(8). > > Yes, I did. I've edited it while tried to make mouse works. you should not edit this file by hand. >>> When I start bthidd it waits for mouse connection forever, >>> clicking on mouse connect button does not seems to have any >>> effect, moreover hcidump does not show any traffic. >> >> again if you hand-edited /var/db/bthidd.hids, then this is the >> correct behavior. the typical behavior of bluetooth hid devices is: >> the very first time bluetooth hid device needs to be contacted by >> the host. this is because in its default state bluetooth hid device >> does not know anything about host, i.e. its bd_addr etc. in its >> default state the hid device will answer inquiry, etc. the host >> finds new hid device and initiates bluetooth hid session (opens >> interrupt and control channels). after the hid device was contacted >> by the host for the very first time, the hid device will "remember" >> host bd_addr. after that bluetooth hid device will reject all >> connection attempts from the different hosts and may even stop >> responding to inquires. > > I see. good. >> 0) run hcidump -w mouse.dump as root >> >> 1) make sure bthidd(8) is NOT running >> >> 2) reset the mouse (press reset button or disconnect batteries for >> a few seconds) >> >> 3) use bthidcontrol(8) to query the mouse >> >> 4) put output of the bthidcontrol(8) in the >> /etc/bluetooth/bthidd.conf >> >> 5) make sure mouse bd_addr IS *NOT* in the /var/db/bthidd.hids >> >> 6) (OPTIONAL) *if* your mouse requests authentication then edit >> /etc/bluetooth/hcsecd.conf file and add pin code or link key. the >> pin code can be obtained from the mouse documentation. after that >> run hcsecd(8) > > looks like it does not require key or pin, also winXP connects only > without pin. how can you tell? the pin code may be hardwired somewhere in the windows registry. did windows software prompt you for anything during install? can you check all the documentation that came with the mouse to see if there is a pin code? Arne: could you please tell us what did you do to make your mouse work? >> 7) start bthidd(8) >> >> if you did everything right the mouse should work. > > Still no luck, but this time there is attempt to connect from host to > mouse on bthidd start: > > # bthidd -d bthidd[1398]: Opening outbound session for > 00:07:61:17:9b:27 (new_device=1, reconnect_initiate=1) bthidd[1398]: > Could not connect to 00:07:61:17:9b:27. Socket is not connected (57) that the way it should work. > There hcidump output while bthidd connection attempt # hcidump -r > mouse.dump HCIDump - HCI packet analyzer ver 1.5 [...] 1103525841.696334 < ACL data: handle 0x002a flags 0x02 dlen 12 L2CAP(s): Connect req: psm 17 scid 0x0060 here host is trying to open hid-control channel (psm 17 (0x11)) 1103525841.738294 > ACL data: handle 0x002a flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x005c scid 0x0060 result 1 status 2 1103525841.772308 > ACL data: handle 0x002a flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0060 result 2 status 0 and these are mouse responses. the first response returns with result code 1 (Connection Pending) and status code 2 (Authorization Pending). the second response is with result code 2 (PSM Not Supported) and status code 0 (No Information). note timestamps - responses are only 34 msec apart - not much time. so it looks like the mouse does not like the host. are you using different bluetooth adapters on your freebsd and winxp boxes? if so, can you try and use winxp adapter on your freebsd box? also did you check the manual to find out what is the correct reset procedure for the mouse? > also, after hardware reset by batteries, /var/db/bthidd.hids get > address of mouse, but do not write anything new to output and mouse > still does not work. ok > bthidd[1610]: Opening outbound session for 00:07:61:17:9b:27 > (new_device=1, reconnect_initiate=1) bthidd[1610]: Could not connect > to 00:07:61:17:9b:27. Socket is not connected (57) > > hcidump while this is: < ACL data: handle 0x0029 flags 0x02 dlen 12 L2CAP(s): Connect req: psm 17 scid 0x006d again host is trying to open hid-control channel > ACL data: handle 0x0029 flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x0042 scid 0x006d result 1 status 2 > ACL data: handle 0x0029 flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x0042 scid 0x006d result 0 status 0 whoa! this time it has opened hid-control channel. lets see what happens next... < ACL data: handle 0x0029 flags 0x02 dlen 12 L2CAP(s): Config req: dcid 0x0042 flags 0x0000 clen 0 > ACL data: handle 0x0029 flags 0x02 dlen 14 L2CAP(s): Config rsp: scid 0x006d flags 0x0000 result 0 clen 0 here host configures its side of the l2cap channel (hid control) and mouse accepts it. > ACL data: handle 0x0029 flags 0x01 dlen 13 L2CAP(s): Config req: dcid 0x006d flags 0x0000 clen 28 MTU 48 Unknown (type 03, len 22) < ACL data: handle 0x0029 flags 0x02 dlen 14 L2CAP(s): Config rsp: scid 0x0042 flags 0x0000 result 0 clen 0 here mouse configures its side of the l2cap channel (hid control), sets mtu and qos. (ignore Unknown - hcidump does not know how to parse qos option). host accepts it. so far everything looks fine to me. after this point hid control channel should be opened and configured. the next step is to open hid interrupt channel. < ACL data: handle 0x0029 flags 0x02 dlen 12 L2CAP(s): Connect req: psm 25 scid 0x006e > ACL data: handle 0x0029 flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x0000 scid 0x006e result 2 status 0 ok, this does not make any sense. psm 25 ?! why the hell it tries to connect to psm 25? of course mouse tells host to get lost, because it does not want to talk on psm 25. wait, i know why. i just checked your older email and find out that you have "interrupt_psm 0x19;" line in your /etc/bluetooth/bthidd.conf file (mouse section). could you please try to change it to "interrupt_psm 0x13;" then do the following: 0) run 'hcidump -w mouse.dump' as root 1) remove mouse bd_addr from /var/db/bthidd.hids file 2) disconnect and reconnect batteries on your mouse 3) press 'connect' button on your mouse 4) restart bthidd(8) > It happens when I disconnect/connect batteries and then press connect > button. > > Even after that mouse does not moved. if I restart bthidd - it does > not connects and mouse does not send any traffic. it will not move - you do not have hid session, that is you need to open both hid control and hid interrupt channels. if the above works then there is a problem with 1) bthidcontrol(8) - because it has incorrectly parsed sdp response and showed wrong psm for the hid interrupt channel. that is what you put into the /etc/bluetooth/bthidd.conf file (unless of course you hand-edited it as well) or 2) mouse itself. it advertises wrong psm for the hid interrupt channel. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue Dec 21 09:58:10 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19E6416A4CE for ; Tue, 21 Dec 2004 09:58:10 +0000 (GMT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD94443D2F for ; Tue, 21 Dec 2004 09:58:08 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.43 (FreeBSD)) id 1CggmG-0000TA-8V; Tue, 21 Dec 2004 12:58:00 +0300 From: Vladimir Grebenschikov To: Maksim Yevmenkin In-Reply-To: <41C72A9B.6090405@savvis.net> References: <1100552998.1098.5.camel@localhost> <419B8353.7040908@savvis.net> <419B9EF8.2090401@savvis.net> <1103269957.974.7.camel@localhost> <41C32471.2050805@savvis.net> <866530fusa.fsf@kamino.rfc1149.org> <41C35B92.7080908@savvis.net> <1103489813.1721.14.camel@localhost> <41C63A62.20304@savvis.net> <1103527349.1024.18.camel@localhost> <41C72A9B.6090405@savvis.net> Content-Type: multipart/mixed; boundary="=-cLScyaNj9trNftefgRQW" Organization: SWsoft Date: Tue, 21 Dec 2004 12:57:59 +0300 Message-Id: <1103623079.954.10.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov cc: bluetooth@freebsd.org Subject: Re: Bluetooth mouse X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vova@fbsd.ru List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2004 09:58:10 -0000 --=-cLScyaNj9trNftefgRQW Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable =F7 =D0=CE, 20/12/2004 =D7 11:40 -0800, Maksim Yevmenkin =D0=C9=DB=C5=D4: > Vladimir, > =20 > > looks like it does not require key or pin, also winXP connects only > > without pin. >=20 > how can you tell? the pin code may be hardwired somewhere in the windows=20 > registry. did windows software prompt you for anything during install?=20 > can you check all the documentation that came with the mouse to see if=20 > there is a pin code? I have not installed any drivers shipped with this mouse, only native winxp driver. WinXP bluetooth explorer found mouse and ask me Do I want to provide pin or do not. I select do not provide and this works. > Arne: could you please tell us what did you do to make your mouse work? >=20 > >> 7) start bthidd(8) > >>=20 > >> if you did everything right the mouse should work. > >=20 > > Still no luck, but this time there is attempt to connect from host to > > mouse on bthidd start: > >=20 > > # bthidd -d bthidd[1398]: Opening outbound session for > > 00:07:61:17:9b:27 (new_device=3D1, reconnect_initiate=3D1) bthidd[1398]= : > > Could not connect to 00:07:61:17:9b:27. Socket is not connected (57) >=20 > that the way it should work. >=20 > > There hcidump output while bthidd connection attempt # hcidump -r > > mouse.dump HCIDump - HCI packet analyzer ver 1.5 >=20 > [...] >=20 > 1103525841.696334 < ACL data: handle 0x002a flags 0x02 dlen 12 > L2CAP(s): Connect req: psm 17 scid 0x0060 >=20 > here host is trying to open hid-control channel (psm 17 (0x11)) >=20 > 1103525841.738294 > ACL data: handle 0x002a flags 0x02 dlen 16 > L2CAP(s): Connect rsp: dcid 0x005c scid 0x0060 result 1 status 2 >=20 > 1103525841.772308 > ACL data: handle 0x002a flags 0x02 dlen 16 > L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0060 result 2 status 0 >=20 > and these are mouse responses. the first response returns with result=20 > code 1 (Connection Pending) and status code 2 (Authorization Pending). >=20 > the second response is with result code 2 (PSM Not Supported) and status=20 > code 0 (No Information). >=20 > note timestamps - responses are only 34 msec apart - not much time. so=20 > it looks like the mouse does not like the host. >=20 > are you using different bluetooth adapters on your freebsd and winxp=20 > boxes? if so, can you try and use winxp adapter on your freebsd box?=20 > also did you check the manual to find out what is the correct reset=20 > procedure for the mouse? The same adapter was used, my notebooks's on-board bt > > bthidd[1610]: Opening outbound session for 00:07:61:17:9b:27=20 > > (new_device=3D1, reconnect_initiate=3D1) bthidd[1610]: Could not connec= t > > to 00:07:61:17:9b:27. Socket is not connected (57) > >=20 > > hcidump while this is: >=20 > < ACL data: handle 0x0029 flags 0x02 dlen 12 > L2CAP(s): Connect req: psm 17 scid 0x006d >=20 > again host is trying to open hid-control channel >=20 > > ACL data: handle 0x0029 flags 0x02 dlen 16 > L2CAP(s): Connect rsp: dcid 0x0042 scid 0x006d result 1 status 2 >=20 > > ACL data: handle 0x0029 flags 0x02 dlen 16 > L2CAP(s): Connect rsp: dcid 0x0042 scid 0x006d result 0 status 0 >=20 > whoa! this time it has opened hid-control channel. lets see what happens=20 > next... > > < ACL data: handle 0x0029 flags 0x02 dlen 12 > L2CAP(s): Config req: dcid 0x0042 flags 0x0000 clen 0 >=20 > > ACL data: handle 0x0029 flags 0x02 dlen 14 > L2CAP(s): Config rsp: scid 0x006d flags 0x0000 result 0 clen 0 >=20 > here host configures its side of the l2cap channel (hid control) and=20 > mouse accepts it. >=20 > > ACL data: handle 0x0029 flags 0x01 dlen 13 > L2CAP(s): Config req: dcid 0x006d flags 0x0000 clen 28 > MTU 48 Unknown (type 03, len 22) >=20 > < ACL data: handle 0x0029 flags 0x02 dlen 14 > L2CAP(s): Config rsp: scid 0x0042 flags 0x0000 result 0 clen 0 >=20 > here mouse configures its side of the l2cap channel (hid control), sets=20 > mtu and qos. (ignore Unknown - hcidump does not know how to parse qos=20 > option). host accepts it. >=20 > so far everything looks fine to me. after this point hid control channel=20 > should be opened and configured. the next step is to open hid=20 > interrupt channel. >=20 > < ACL data: handle 0x0029 flags 0x02 dlen 12 > L2CAP(s): Connect req: psm 25 scid 0x006e >=20 > > ACL data: handle 0x0029 flags 0x02 dlen 16 > L2CAP(s): Connect rsp: dcid 0x0000 scid 0x006e result 2 status 0 >=20 > ok, this does not make any sense. psm 25 ?! why the hell it tries to=20 > connect to psm 25? of course mouse tells host to get lost, because it=20 > does not want to talk on psm 25. >=20 > wait, i know why. i just checked your older email and find out that you h= ave >=20 > "interrupt_psm 0x19;" >=20 > line in your /etc/bluetooth/bthidd.conf file (mouse section). could you=20 > please try to change it to >=20 > "interrupt_psm 0x13;" >=20 > then do the following: >=20 > 0) run 'hcidump -w mouse.dump' as root >=20 > 1) remove mouse bd_addr from /var/db/bthidd.hids file >=20 > 2) disconnect and reconnect batteries on your mouse >=20 > 3) press 'connect' button on your mouse >=20 > 4) restart bthidd(8) >=20 > > It happens when I disconnect/connect batteries and then press connect > > button. > >=20 > > Even after that mouse does not moved. if I restart bthidd - it does > > not connects and mouse does not send any traffic. >=20 > it will not move - you do not have hid session, that is you need to open=20 > both hid control and hid interrupt channels. >=20 > if the above works then there is a problem with Yes, it works ! (dump in attachment) > 1) bthidcontrol(8) - because it has incorrectly parsed sdp response and=20 > showed wrong psm for the hid interrupt channel. that is what you put=20 > into the /etc/bluetooth/bthidd.conf file (unless of course you=20 > hand-edited it as well) No, I do not edit this manually. > or >=20 > 2) mouse itself. it advertises wrong psm for the hid interrupt channel. Why it works with winXP in this case ? How to find what happens ?=20 > thanks, > max --=20 Vladimir B. Grebenchikov vova@fbsd.ru --=-cLScyaNj9trNftefgRQW Content-Disposition: attachment; filename=mouse3.dump Content-Type: application/octet-stream; name=mouse3.dump Content-Transfer-Encoding: base64 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 /wAQAAEATOPHQRsjCgACKSALAAcAQQChAgD3z/8AEAABAEzjx0HoUQoAAikgCwAHAEEAoQIA+d// ABAAAQBM48dBpoQKAAIpIAsABwBBAKECAP7//wAQAAEATOPHQYSzCgACKSALAAcAQQChAgD87/8A EAABAEzjx0FQ5goAAikgCwAHAEEAoQIA/w8AABAAAQBM48dBNhULAAIpIAsABwBBAKECAP8PAAAQ AAEATOPHQfBHCwACKSALAAcAQQChAgD/HwAAEAABAEzjx0HKdgsAAikgCwAHAEEAoQIA/x8AABAA AQBM48dBnakLAAIpIAsABwBBAKECAPyPAAAQAAEATOPHQVAHDAACKSALAAcAQQChAgD9bwAAEAAB AEzjx0EfDwwAAikgCwAHAEEAoQIA+68AABAAAQBM48dBEzoMAAIpIAsABwBBAKECAPrvAAAQAAEA TOPHQdlsDAACKSALAAcAQQChAgD9jwAAEAABAEzjx0HDmwwAAikgCwAHAEEAoQIA/M8AABAAAQBM 48dBfc4MAAIpIAsABwBBAKECAP2fAAAQAAEATOPHQVv9DAACKSALAAcAQQChAgD/fwAAEAABAEzj x0EuMA0AAikgCwAHAEEAoQIA/c8AABAAAQBM48dBCF8NAAIpIAsABwBBAKECAABQAAAQAAEATOPH QcaRDQACKSALAAcAQQChAgD/3wAAEAABAEzjx0GiwA0AAikgCwAHAEEAoQIA/28AABAAAQBM48dB afMNAAIpIAsABwBBAKECAACwAAAQAAEATOPHQVIiDgACKSALAAcAQQChAgAAIAAAEAABAEzjx0EM VQ4AAikgCwAHAEEAoQIAAEAAABAAAQBM48dB/YMOAAIpIAsABwBBAKECAAAQAAAQAAEATOPHQZbl DgACKSALAAcAQQChAgABAAAAEAABAEzjx0FtFA8AAikgCwAHAEEAoQIAAfD/ABAAAQBM48dBPhwP AAIpIAsABwBBAKECAAPQ/wAQAAEATePHQbc3AAACKSALAAcAQQChAgAEoP8AEAABAE3jx0GfZgAA AikgCwAHAEEAoQIABXD/ABAAAQBN48dBdJUAAAIpIAsABwBBAKECAAYw/wAQAAEATePHQUadAAAC KSALAAcAQQChAgAEcP8AEAABAE3jx0GGyAAAAikgCwAHAEEAoQIABTD/ABAAAQBN48dB7SkBAAIp IAsABwBBAKECAAUQ/wAQAAEATePHQb0xAQACKSALAAcAQQChAgAFIP8AEAABAE3jx0GJiwEAAikg CwAHAEEAoQIABAD/ABAAAQBN48dBSr4BAAIpIAsABwBBAKECAANA/wAQAAEATePHQTTtAQACKSAL AAcAQQChAgAAUP8AEAABAE3jx0H29AEAAikgCwAHAEEAoQIAAFD/ABAAAQBN48dB7h8CAAIpIAsA BwBBAKECAABg/wAQAAEATePHQb19AgACKSALAAcAQQChAgD/f/8AEAABAE3jx0F9hQIAAikgCwAH AEEAoQIA/o//ABAAAQBN48dBdbACAAIpIAsABwBBAKECAPyP/wAQAAEATePHQR0SAwACKSALAAcA QQChAgD6j/8AEAABAE3jx0H3GQMAAikgCwAHAEEAoQIA+I//ABAAAQBN48dB+kQDAAIpIAsABwBB AKECAPev/wAQAAEATePHQcaiAwACKSALAAcAQQChAgD0n/8AEAABAE3jx0F2qgMAAikgCwAHAEEA oQIA9c//ABAAAQBN48dBXdUDAAIpIAsABwBBAKECAPbP/wAQAAEATePHQQQ3BAACKSALAAcAQQCh AgD23/8AEAABAE3jx0HNPgQAAikgCwAHAEEAoQIA99//ABAAAQBN48dB4WUEAAIpIAsABwBBAKEC APjv/wAQAAEATePHQbuUBAACKSALAAcAQQChAgD67/8AEAABAE3jx0FoywQAAikgCwAHAEEAoQIA /O//ABAAAQBN48dBU/oEAAIpIAsABwBBAKECAP8PAAAQAAEATePHQfdbBQACKSALAAcAQQChAgAA EAAAEAABAE3jx0G4jgUAAikgCwAHAEEAoQIAAUAAABAAAQBN48dBkr0FAAIpIAsABwBBAKECAAFQ AAAQAAEATePHQV7FBQACKSALAAcAQQChAgACgAAAEAABAE3jx0ExHwYAAikgCwAHAEEAoQIABvAA ABAAAQBN48dB+FEGAAIpIAsABwBBAKECAAfwAAAQAAEATePHQRWEBgACKSALAAcAQQChAgAI4AAA EAABAE3jx0GoswYAAikgCwAHAEEAoQIAC1ABABAAAQBN48dBeOIGAAIpIAsABwBBAKECAA1gAQAQ AAEATePHQT0VBwACKSALAAcAQQChAgANUAEAEAABAE3jx0EdRAcAAikgCwAHAEEAoQIAE5ABABAA AQBN48dBAHMHAAIpIAsABwBBAKECAA3wAAAQAAEATePHQcZ6BwACKSALAAcAQQChAgAWkAEAEAAB AE3jx0G22AcAAikgCwAHAEEAoQIADNAAABAAAQBN48dBhgcIAAIpIAsABwBBAKECAA3wAAAQAAEA TePHQToPCAACKSALAAcAQQChAgALAAEAEAABAE3jx0EvOggAAikgCwAHAEEAoQIABbAAABAAAQBN 48dBBmkIAAIpIAsABwBBAKECAAGQAAAQAAEATePHQc6bCAACKSALAAcAQQChAgD/fwAAEAABAE3j x0GqyggAAikgCwAHAEEAoQIA/l8AABAAAQBN48dBdP0IAAIpIAsABwBBAKECAPwvAAAQAAEATePH QU8sCQACKSALAAcAQQChAgD8HwAAEAABAE3jx0EYXwkAAikgCwAHAEEAoQIA/B8AABAAAQBN48dB A44JAAIpIAsABwBBAKECAPnf/wAQAAEATePHQcDACQACKSALAAcAQQChAgD+7/8AEAABAE3jx0GX 7wkAAikgCwAHAEEAoQIA/L//ABAAAQBN48dBZSIKAAIpIAsABwBBAKECAP2//wAQAAEATePHQTtR CgACKSALAAcAQQChAgD7T/8AEAABAE3jx0EEhAoAAikgCwAHAEEAoQIA+x//ABAAAQBN48dB3bIK AAIpIAsABwBBAKECAPxP/wAQAAEATePHQbjlCgACKSALAAcAQQChAgD7D/8AEAABAE3jx0GLFAsA AikgCwAHAEEAoQIA+//+ABAAAQBN48dBTUcLAAIpIAsABwBBAKECAPe//gAQAAEATePHQSd2CwAC KSALAAcAQQChAgD+n/8AEAABAE3jx0HtqAsAAikgCwAHAEEAoQIA+v/+ABAAAQBN48dB2NcLAAIp IAsABwBBAKECAP6//wAQAAEATePHQZQKDAACKSALAAcAQQChAgD8f/8AEAABAE3jx0FsOQwAAikg CwAHAEEAoQIA+U//ABAAAQBN48dBQWwMAAIpIAsABwBBAKECAP3v/wAQAAEATePHQRibDAACKSAL AAcAQQChAgD3v/8AEAABAE3jx0HczQwAAikgCwAHAEEAoQIA8v//ABAAAQBN48dBs/wMAAIpIAsA BwBBAKECAPsfAAAQAAEATePHQX0vDQACKSALAAcAQQChAgD2TwAAEAABAE3jx0FXXg0AAikgCwAH AEEAoQIA758AABAAAQBN48dBIJENAAIpIAsABwBBAKECAPtPAAAQAAEATePHQRHDDQACKSALAAcA QQChAgDx3wAAEAABAE3jx0HM8g0AAikgCwAHAEEAoQIA+08AABAAAQBN48dBpSEOAAIpIAsABwBB AKECAPavAAAQAAEATePHQYJQDgACKSALAAcAQQChAgD6bwAAEAABAE3jx0FQWA4AAikgCwAHAEEA oQIA+X8AABAAAQBN48dBC7YOAAIpIAsABwBBAKECAPp/AAAQAAEATePHQefkDgACKSALAAcAQQCh AgD7fwAAEAABAE3jx0HHEw8AAikgCwAHAEEAoQIA/X8AABAAAQBN48dBlxsPAAIpIAsABwBBAKEC AP6PAAAQAAEATuPHQVsEAAACKSALAAcAQQChAgAAgAAAEAABAE7jx0H0ZQAAAikgCwAHAEEAoQIA A6AAABAAAQBO48dB25QAAAIpIAsABwBBAKECAAegAAAJAAEATuPHQZ6cAAACKSAEAAcAQQAMAAEA TuPHQWekAAACKRAHAKECAAVQAAAQAAEATuPHQXH2AAACKSALAAcAQQChAgAJQAAAEAABAE7jx0FD /gAAAikgCwAHAEEAoQIACyAAABAAAQBO48dBNykBAAIpIAsABwBBAKECAAwAAAAQAAEATuPHQf9b AQACKSALAAcAQQChAgAOAAAAEAABAE7jx0HguQEAAikgCwAHAEEAoQIAEgAAABAAAQBO48dBk8EB AAIpIAsABwBBAKECABMAAAAQAAEATuPHQYbsAQACKSALAAcAQQChAgAcAAAAEAABAE7jx0EpTgIA AikgCwAHAEEAoQIAFgAAABAAAQBO48dB9VUCAAIpIAsABwBBAKECABUAAAAQAAEATuPHQfmAAgAC KSALAAcAQQChAgASAAAAEAABAE7jx0HJrwIAAikgCwAHAEEAoQIAEOD/ABAAAQBO48dBehEDAAIp IAsABwBBAKECAA7Q/wAQAAEATuPHQUAZAwACKSALAAcAQQChAgAK4P8AEAABAE7jx0E5RAMAAikg CwAHAEEAoQIAB/D/ABAAAQBO48dBF3MDAAIpIAsABwBBAKECAAMAAAAQAAEATuPHQbPUAwACKSAL AAcAQQChAgABAAAAEAABAE7jx0GRAwQAAikgCwAHAEEAoQIA/w8AABAAAQBO48dBZAsEAAIpIAsA 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 --=-cLScyaNj9trNftefgRQW-- From owner-freebsd-bluetooth@FreeBSD.ORG Tue Dec 21 15:56:00 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3989216A4CE for ; Tue, 21 Dec 2004 15:56:00 +0000 (GMT) Received: from mta11.adelphia.net (mta11.adelphia.net [68.168.78.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BB5F43D3F for ; Tue, 21 Dec 2004 15:55:59 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [192.168.1.254] (really [70.32.233.78]) by mta11.adelphia.net (InterMail vM.6.01.03.02 201-2131-111-104-20040324) with ESMTP id <20041221155558.KZZC1403.mta11.adelphia.net@[192.168.1.254]>; Tue, 21 Dec 2004 10:55:58 -0500 Message-ID: <41C84797.80306@savvis.net> Date: Tue, 21 Dec 2004 07:56:07 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: vova@fbsd.ru References: <1100552998.1098.5.camel@localhost> <419B8353.7040908@savvis.net> <419B9EF8.2090401@savvis.net> <1103269957.974.7.camel@localhost> <41C32471.2050805@savvis.net> <866530fusa.fsf@kamino.rfc1149.org> <41C35B92.7080908@savvis.net> <1103489813.1721.14.camel@localhost> <41C63A62.20304@savvis.net> <1103527349.1024.18.camel@localhost> <41C72A9B.6090405@savvis.net> <1103623079.954.10.camel@localhost> In-Reply-To: <1103623079.954.10.camel@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: bluetooth@freebsd.org Subject: Re: Bluetooth mouse X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2004 15:56:00 -0000 Vladimir, [...] >> wait, i know why. i just checked your older email and find out that >> you have >> >> "interrupt_psm 0x19;" >> >> line in your /etc/bluetooth/bthidd.conf file (mouse section). could >> you please try to change it to >> >> "interrupt_psm 0x13;" >> >> then do the following: >> >> 0) run 'hcidump -w mouse.dump' as root >> >> 1) remove mouse bd_addr from /var/db/bthidd.hids file >> >> 2) disconnect and reconnect batteries on your mouse >> >> 3) press 'connect' button on your mouse >> >> 4) restart bthidd(8) >> >>> It happens when I disconnect/connect batteries and then press >>> connect button. >>> >>> Even after that mouse does not moved. if I restart bthidd - it >>> does not connects and mouse does not send any traffic. >> >> it will not move - you do not have hid session, that is you need to >> open both hid control and hid interrupt channels. >> >> if the above works then there is a problem with > > Yes, it works ! (dump in attachment) great, thanks for the dump. >> 1) bthidcontrol(8) - because it has incorrectly parsed sdp response >> and showed wrong psm for the hid interrupt channel. that is what >> you put into the /etc/bluetooth/bthidd.conf file (unless of course >> you hand-edited it as well) > > No, I do not edit this manually. ok >> or >> >> 2) mouse itself. it advertises wrong psm for the hid interrupt >> channel. > > Why it works with winXP in this case ? i need at least one more extra hcidump to answer this question. the most likely answer is that winxp just ignores psm's that mouse advertises and uses default ones (0x11 - hid control and 0x13 - hid interrupt). you see, initially host and hid device do not know anything about each other. so the host must query hid device using sdp (Service Discovery Protocol) to find out all hid service parameters (such as psm's, hid descriptor etc.). any hid device must provide this information. that is what bthidcontrol(8) does - it queries hid devices using sdp and dumps all parameters so bthidd(8) can uses them. > How to find what happens ? to rule out bthidcontrol(8) i need hcidump while you are doing 'query' command. - run 'hcidump -w bthidcontrol.dump' as root - run 'bthidcontrol -a mouse query' note: you may need to reset the mouse again in order for this to work. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue Dec 21 16:40:40 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 992B216A4CF for ; Tue, 21 Dec 2004 16:40:40 +0000 (GMT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 457F443D1D for ; Tue, 21 Dec 2004 16:40:39 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.43 (FreeBSD)) id 1Cgn3s-0001OR-ET; Tue, 21 Dec 2004 19:40:36 +0300 From: Vladimir Grebenschikov To: Maksim Yevmenkin In-Reply-To: <41C84797.80306@savvis.net> References: <1100552998.1098.5.camel@localhost> <419B8353.7040908@savvis.net> <419B9EF8.2090401@savvis.net> <1103269957.974.7.camel@localhost> <41C32471.2050805@savvis.net> <866530fusa.fsf@kamino.rfc1149.org> <41C35B92.7080908@savvis.net> <1103489813.1721.14.camel@localhost> <41C63A62.20304@savvis.net> <1103527349.1024.18.camel@localhost> <41C72A9B.6090405@savvis.net> <1103623079.954.10.camel@localhost> <41C84797.80306@savvis.net> Content-Type: multipart/mixed; boundary="=-c2zVmIt+/YuGN93WZuy/" Organization: SWsoft Date: Tue, 21 Dec 2004 19:40:36 +0300 Message-Id: <1103647236.954.31.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov cc: bluetooth@freebsd.org Subject: Re: Bluetooth mouse X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vova@fbsd.ru List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2004 16:40:40 -0000 --=-c2zVmIt+/YuGN93WZuy/ Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable =F7 =D7=D4, 21/12/2004 =D7 07:56 -0800, Maksim Yevmenkin =D0=C9=DB=C5=D4: > >> 2) mouse itself. it advertises wrong psm for the hid interrupt > >> channel. > >=20 > > Why it works with winXP in this case ? >=20 > i need at least one more extra hcidump to answer this question. the > most=20 > likely answer is that winxp just ignores psm's that mouse advertises > and=20 > uses default ones (0x11 - hid control and 0x13 - hid interrupt). you=20 > see, initially host and hid device do not know anything about each=20 > other. so the host must query hid device using sdp (Service Discovery=20 > Protocol) to find out all hid service parameters (such as psm's, hid=20 > descriptor etc.). any hid device must provide this information. that > is=20 > what bthidcontrol(8) does - it queries hid devices using sdp and > dumps=20 > all parameters so bthidd(8) can uses them. >=20 > > How to find what happens ? >=20 > to rule out bthidcontrol(8) i need hcidump while you are doing > 'query'=20 > command. >=20 > - run 'hcidump -w bthidcontrol.dump' as root >=20 > - run 'bthidcontrol -a mouse query' Dump in attachment > note: you may need to reset the mouse again in order for this to work. Looks like it works even while mouse in action. > thanks, > max --=20 Vladimir B. Grebenchikov vova@fbsd.ru --=-c2zVmIt+/YuGN93WZuy/ Content-Disposition: attachment; filename=bthidcontrol.dump Content-Type: application/octet-stream; name=bthidcontrol.dump Content-Transfer-Encoding: base64 EQAAAOtQyEGhcwQAAikgDAAIAAEAAhUEAAEAUgAIAAEA61DIQXyZBAAEEwUBKQABABUAAQDrUMhB VsgEAAIpIBAADAABAAMVCABUAFIAAQACABUAAQDrUMhBEtAEAAIpIBAADAABAAMVCABUAFIAAAAA ABEAAADrUMhBOtAEAAIpIAwACAABAAQWBABUAAAACAABAOtQyEEI+wQABBMFASkAAQATAAEA61DI QecpBQACKSAOAAoAAQAFFgYAUgAAAAAAFQABAOtQyEG2MQUAAikgEAAMAAEABBMIAFIAAAABAjAA EwAAAOtQyEHdMQUAAikgDgAKAAEABRMGAFQAAAAAACsAAADrUMhBZzIFAAIpICYAIgBUAAYAAAAd NgADGREk//82ABEJAAQJAA0KAgUCBgkCCgkCDQAIAAEA61DIQa5cBQAEEwUBKQABAAgAAQDrUMhB YGgFAAQTBQEpAAEAIAABAOtQyEFRvgUAAikgGwAwAFIABwAAACsAJjYAmjYAlwkABDUNNQYZAQAe AAEA61DIQRzGBQACKRAZAAkAETUDGQARCQANNQ81DTUGGQEACQACAHctAAAA61DIQZXGBQACKSAo ACQAVAAGAAEAHzYAAxkRJP//NgARCQAECQANCgIFAgYJAgoJAg0CAHcIAAEA61DIQfb3BQAEEwUB KQABACAAAQDrUMhB9B8GAAIpIBsAMABSAAcAAQArACYTNQMZABEJAgUoAQkCBjVdHgABAOtQyEHB JwYAAikQGQA1WwgiJVcFAQkCoQGFAgkBoQAFCRkBAgBRLQAAAOtQyEEwKAYAAikgKAAkAFQABgAC AB82AAMZEST//zYAEQkABAkADQoCBQIGCQIKCQINAgBRCAABAOtQyEGhVgYABBMFASkAAQAgAAEA 61DIQZGBBgACKSAbADAAUgAHAAIAKwAmKQgVACUBlQh1AYECBQEJMB4AAQDrUMhBZokGAAIpEBkA CTEWAfgm/wd1DJUCgQYJOBWBJX91CAIAKy0AAADrUMhByIkGAAIpICgAJABUAAYAAwAfNgADGREk //82ABEJAAQJAA0KAgUCBgkCCgkCDQIAKwgAAQDrUMhBQbgGAAQTBQEpAAEAIAABAOtQyEE24wYA AikgGwAwAFIABwADACsAJpUBgQbAwAYA/wkBoQGFEHUeAAEA61DIQRTrBgACKRAZAAiVBhUAJv8A CQGBAAkBkQDACQIKKAECAAUtAAAA61DIQXPrBgACKSAoACQAVAAGAAQAHzYAAxkRJP//NgARCQAE CQANCgIFAgYJAgoJAg0CAAUIAAEA61DIQeQZBwAEEwUBKQABABYAAQDrUMhB2kQHAAIpIBEADQBS AAcABAAIAAUJAg0oAAARAAAA61DIQU9FBwACKSAMAAgAAQAGFwQAVABSAAgAAQDrUMhBy3cHAAQT BQEpAAEAEQABAOtQyEGYpgcAAikgDAAIAAEABxcEAFQAUgA= --=-c2zVmIt+/YuGN93WZuy/-- From owner-freebsd-bluetooth@FreeBSD.ORG Tue Dec 21 19:49:06 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17A6C16A4CE for ; Tue, 21 Dec 2004 19:49:05 +0000 (GMT) Received: from itesec.hsc.fr (itesec.hsc.fr [192.70.106.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C1C843D2F for ; Tue, 21 Dec 2004 19:49:05 +0000 (GMT) (envelope-from yb@sainte-barbe.org) Received: from taz.hsc.fr (taz.hsc.fr [192.70.106.75]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "taz.hsc.fr", Issuer "HSC CA" (verified OK)) by itesec.hsc.fr (Postfix) with ESMTP id 37C8D2101D for ; Tue, 21 Dec 2004 20:49:04 +0100 (CET) Received: by taz.hsc.fr (Postfix, from userid 1001) id 624F842A4; Tue, 21 Dec 2004 20:49:12 +0100 (CET) Date: Wed, 22 Dec 2004 03:49:12 +0800 From: Yann Berthier To: bluetooth@freebsd.org Message-ID: <20041221194912.GA748@hsc.fr> Mail-Followup-To: bluetooth@freebsd.org References: <419B9EF8.2090401@savvis.net> <1103269957.974.7.camel@localhost> <41C32471.2050805@savvis.net> <866530fusa.fsf@kamino.rfc1149.org> <41C35B92.7080908@savvis.net> <1103489813.1721.14.camel@localhost> <41C63A62.20304@savvis.net> <1103527349.1024.18.camel@localhost> <41C72A9B.6090405@savvis.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41C72A9B.6090405@savvis.net> X-Organization: Herve Schauer Consultants X-Web: http://www.hsc.fr/ X-Operating-System: FreeBSD 6.0-CURRENT User-Agent: Mutt/1.5.6i Subject: Re: Bluetooth mouse X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2004 19:49:06 -0000 On Mon, 20 Dec 2004, Maksim Yevmenkin wrote: [...] > ok, this does not make any sense. psm 25 ?! why the hell it tries to > connect to psm 25? of course mouse tells host to get lost, because it > does not want to talk on psm 25. > > wait, i know why. i just checked your older email and find out that you have > > "interrupt_psm 0x19;" > > line in your /etc/bluetooth/bthidd.conf file (mouse section). could you > please try to change it to > > "interrupt_psm 0x13;" It worked for me with a MS mouse. Other mouse brand, same symptom, same solution. Now, perhaps bthidcontrol is at fault actually. Do you need an hcidump trace ? Now, my 2nd and 3rd buttons are swapped (another poster on this thread had the same too, if i'm not mistaken). Could it be also related to an eroneous parsing of the SDP answer by bthidcontrol ? Regards, - yann From owner-freebsd-bluetooth@FreeBSD.ORG Tue Dec 21 19:57:54 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 971A616A4CE for ; Tue, 21 Dec 2004 19:57:54 +0000 (GMT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 197AA43D67 for ; Tue, 21 Dec 2004 19:57:54 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from out002.email.savvis.net (out002.apptix.savvis.net [216.91.32.45])iBLJvMD8012310; Tue, 21 Dec 2004 13:57:22 -0600 Received: from s228130hz1ew03.apptix-01.savvis.net ([10.146.4.28]) by out002.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Tue, 21 Dec 2004 13:57:17 -0600 Received: from [10.254.186.111] ([66.35.239.94]) by s228130hz1ew03.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Tue, 21 Dec 2004 13:57:12 -0600 Message-ID: <41C88017.8010403@savvis.net> Date: Tue, 21 Dec 2004 11:57:11 -0800 From: Maksim Yevmenkin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040822 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Yann Berthier References: <419B9EF8.2090401@savvis.net> <1103269957.974.7.camel@localhost> <41C32471.2050805@savvis.net> <866530fusa.fsf@kamino.rfc1149.org> <41C35B92.7080908@savvis.net> <1103489813.1721.14.camel@localhost> <41C63A62.20304@savvis.net> <1103527349.1024.18.camel@localhost> <41C72A9B.6090405@savvis.net> <20041221194912.GA748@hsc.fr> In-Reply-To: <20041221194912.GA748@hsc.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 21 Dec 2004 19:57:12.0636 (UTC) FILETIME=[432DA7C0:01C4E797] X-ECS-MailScanner: No virus is found cc: bluetooth@freebsd.org Subject: Re: Bluetooth mouse X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2004 19:57:54 -0000 Yann, >> ok, this does not make any sense. psm 25 ?! why the hell it tries >> to connect to psm 25? of course mouse tells host to get lost, >> because it does not want to talk on psm 25. >> >> wait, i know why. i just checked your older email and find out that >> you have >> >> "interrupt_psm 0x19;" >> >> line in your /etc/bluetooth/bthidd.conf file (mouse section). could >> you please try to change it to >> >> "interrupt_psm 0x13;" > > It worked for me with a MS mouse. Other mouse brand, same symptom, > same solution. Now, perhaps bthidcontrol is at fault actually. Do you > need an hcidump trace ? yes, please. the more traces i get the easier for me to fix the problem. what is the other (then MS) brand are you using? > Now, my 2nd and 3rd buttons are swapped (another poster on this > thread had the same too, if i'm not mistaken). Could it be also > related to an eroneous parsing of the SDP answer by bthidcontrol ? i do not think so. the information about buttons, axis etc. is encoded in the hid descriptor. you could send me a hicdump while you are pressing 2nd and then 3rd button along with 'bthidcontrol dump' output. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue Dec 21 20:45:07 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13CA116A4CE for ; Tue, 21 Dec 2004 20:45:07 +0000 (GMT) Received: from itesec.hsc.fr (itesec.hsc.fr [192.70.106.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C84843D4C for ; Tue, 21 Dec 2004 20:45:06 +0000 (GMT) (envelope-from yb@sainte-barbe.org) Received: from taz.hsc.fr (taz.hsc.fr [192.70.106.75]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "taz.hsc.fr", Issuer "HSC CA" (verified OK)) by itesec.hsc.fr (Postfix) with ESMTP id 943022111B for ; Tue, 21 Dec 2004 21:45:05 +0100 (CET) Received: by taz.hsc.fr (Postfix, from userid 1001) id 558DD42A4; Tue, 21 Dec 2004 21:45:13 +0100 (CET) Date: Wed, 22 Dec 2004 04:45:13 +0800 From: Yann Berthier To: bluetooth@freebsd.org Message-ID: <20041221204513.GC729@hsc.fr> Mail-Followup-To: bluetooth@freebsd.org References: <1103269957.974.7.camel@localhost> <41C32471.2050805@savvis.net> <866530fusa.fsf@kamino.rfc1149.org> <41C35B92.7080908@savvis.net> <1103489813.1721.14.camel@localhost> <41C63A62.20304@savvis.net> <1103527349.1024.18.camel@localhost> <41C72A9B.6090405@savvis.net> <20041221194912.GA748@hsc.fr> <41C88017.8010403@savvis.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41C88017.8010403@savvis.net> X-Organization: Herve Schauer Consultants X-Web: http://www.hsc.fr/ X-Operating-System: FreeBSD 6.0-CURRENT User-Agent: Mutt/1.5.6i Subject: Re: Bluetooth mouse X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2004 20:45:07 -0000 On Tue, 21 Dec 2004, Maksim Yevmenkin wrote: > Yann, > > yes, please. the more traces i get the easier for me to fix the problem. > what is the other (then MS) brand are you using? It's the only mouse i have, actually i was refering to the Logitech MX900 one, which started this thread > >Now, my 2nd and 3rd buttons are swapped (another poster on this > >thread had the same too, if i'm not mistaken). Could it be also > >related to an eroneous parsing of the SDP answer by bthidcontrol ? > > i do not think so. the information about buttons, axis etc. is encoded > in the hid descriptor. you could send me a hicdump while you are > pressing 2nd and then 3rd button along with 'bthidcontrol dump' output. I've put the bthidcontrol query and dump outputs along with 2 hcidump traces (mouse_events.dump concerning only the buttons events) on http://bachibouzouk.org/~yb/fbsd/ Lemme know for whatever info you may need, and let me thank you for the wonderful job you have done so far Thanks, - yann From owner-freebsd-bluetooth@FreeBSD.ORG Thu Dec 23 23:17:56 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3DBB316A4CE; Thu, 23 Dec 2004 23:17:56 +0000 (GMT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id C360443D58; Thu, 23 Dec 2004 23:17:55 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from out001.email.savvis.net (out001.apptix.savvis.net [216.91.32.44])iBNNHQTO013504; Thu, 23 Dec 2004 17:17:26 -0600 Received: from s228130hz1ew17.apptix-01.savvis.net ([10.146.4.29]) by out001.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Thu, 23 Dec 2004 17:17:21 -0600 Received: from [10.254.186.111] ([66.35.239.94]) by s228130hz1ew17.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Thu, 23 Dec 2004 17:17:10 -0600 Message-ID: <41CB51F5.1060704@savvis.net> Date: Thu, 23 Dec 2004 15:17:09 -0800 From: Maksim Yevmenkin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040822 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-bluetooth@FreeBSD.org References: <41B8D6D5.6090801@savvis.net> <1102634931.90683.9.camel@hood.oook.cz> <41B8E56C.6050409@savvis.net> <1102668370.34937.7.camel@pav.hide.vol.cz> <41B9E211.8050005@savvis.net> <1102709951.60420.9.camel@hood.oook.cz> <41BA2816.9000908@savvis.net> <1102721530.60420.15.camel@hood.oook.cz> <41BA5490.3000708@savvis.net> <1102731873.60420.21.camel@hood.oook.cz> <41C0C992.2050605@savvis.net> <1103185593.69011.3.camel@pav.hide.vol.cz> In-Reply-To: <1103185593.69011.3.camel@pav.hide.vol.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 Dec 2004 23:17:10.0981 (UTC) FILETIME=[87934F50:01C4E945] X-ECS-MailScanner: No virus is found cc: pav@FreeBSD.org Subject: Re: obexapp-1.4 X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Dec 2004 23:17:56 -0000 Dear Bluetooth Users, please help me with testing of new version of obexapp(1) utility. http://www.geocities.com/m_evmenkin/obexapp-1.4.2.tar.gz here is the quick list of changes: - use iconv library to translate between utf-8,16be and current locate - add lpwd (print local current working directory) and lcd (change local current directory) commands if your bluetooth device supports national characters please try it and let me know if it works for you. Merry X-max everyone! thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Sat Dec 25 23:46:29 2004 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 876E516A4D1 for ; Sat, 25 Dec 2004 23:46:29 +0000 (GMT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DADF43D41 for ; Sat, 25 Dec 2004 23:46:29 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from out001.email.savvis.net (out001.apptix.savvis.net [216.91.32.44])iBPNjsJa019610; Sat, 25 Dec 2004 17:45:54 -0600 Received: from s228130hz1ew17.apptix-01.savvis.net ([10.146.4.29]) by out001.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Sat, 25 Dec 2004 17:45:43 -0600 Received: from [192.168.1.245] ([70.32.233.78]) by s228130hz1ew17.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Sat, 25 Dec 2004 17:45:45 -0600 Message-ID: <41CDFB92.2070003@savvis.net> Date: Sat, 25 Dec 2004 15:45:22 -0800 From: Maksim Yevmenkin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040822 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Guido Falsi References: <1102668370.34937.7.camel@pav.hide.vol.cz> <41B9E211.8050005@savvis.net> <1102709951.60420.9.camel@hood.oook.cz> <41BA2816.9000908@savvis.net> <1102721530.60420.15.camel@hood.oook.cz> <41BA5490.3000708@savvis.net> <1102731873.60420.21.camel@hood.oook.cz> <41C0C992.2050605@savvis.net> <1103185593.69011.3.camel@pav.hide.vol.cz> <41CB51F5.1060704@savvis.net> <20041224121040.GA55902@wedge.madpilot.net> In-Reply-To: <20041224121040.GA55902@wedge.madpilot.net> Content-Type: multipart/mixed; boundary="------------090407060904050203000304" X-OriginalArrivalTime: 25 Dec 2004 23:45:45.0173 (UTC) FILETIME=[DA23C050:01C4EADB] X-ECS-MailScanner: No virus is found cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp-1.4 X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Dec 2004 23:46:29 -0000 This is a multi-part message in MIME format. --------------090407060904050203000304 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hello Guido, > Hello! I'm updating the port for obexapp, and was testing the build on > an AMD64 machine I recently got an account on. While it builds fine on > i386, after adding the changes needed for the new iconv dependancy, it's > generating these warnings on amd64: [...] > and the binary seems not to work properly. Unlickyly this machine does > not have any bluetooth hardware, so my only tedst is launching it and > checking if the binary reacts properly...if should react like this, if > i'm right: > > mad@wedge:~ [0]> obexapp > obexapp: Must specify server BD_ADDR > > BTW I'll file a PR leaving the BREOKEN flag in place for not i386 shortly. thanks for reporting this. please try the attacted patch. if it works, then i will include it in obexapp-1.4.3. thanks, max --------------090407060904050203000304 Content-Type: text/plain; name="obexapp.64bit.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="obexapp.64bit.diff.txt" Index: client.c =================================================================== RCS file: /usr/local/cvs/ports/obexapp/client.c,v retrieving revision 1.13 diff -u -r1.13 client.c --- client.c 23 Dec 2004 23:09:48 -0000 1.13 +++ client.c 25 Dec 2004 21:47:54 -0000 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -745,7 +746,7 @@ goto done; } - syslog(LOG_INFO, "%s(): Putting object %s as %s, size %lld", + syslog(LOG_INFO, "%s(): Putting object %s as %s, size %" PRId64, __func__, local, remote, st.st_size); hv.bq4 = st.st_size; Index: server.c =================================================================== RCS file: /usr/local/cvs/ports/obexapp/server.c,v retrieving revision 1.6 diff -u -r1.6 server.c --- server.c 23 Dec 2004 23:09:49 -0000 1.6 +++ server.c 25 Dec 2004 21:48:45 -0000 @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -835,7 +836,7 @@ ls = NULL; asprintf(&ls, -" <%s name=\"%s\" size=\"%lld\" " \ +" <%s name=\"%s\" size=\"%" PRId64 "\" " \ "owner=\"%s\" group=\"%s\" " \ "user-perm=\"%s\" group-perm=\"%s\" other-perm=\"%s\" " \ "created=\"%04d%02d%02dT%02d%02d%02dZ\" " \ Index: util.c =================================================================== RCS file: /usr/local/cvs/ports/obexapp/util.c,v retrieving revision 1.6 diff -u -r1.6 util.c --- util.c 23 Dec 2004 23:09:49 -0000 1.6 +++ util.c 25 Dec 2004 22:00:43 -0000 @@ -154,8 +154,8 @@ */ int -obexapp_util_locale_from_utf8(char const *src, int srclen, - char *dst, int dstlen) +obexapp_util_locale_from_utf8(char const *src, size_t srclen, + char *dst, size_t dstlen) { char const *s = src; char *d = dst; @@ -186,7 +186,8 @@ */ int -obexapp_util_locale_to_utf8(char const *src, int srclen, char *dst, int dstlen) +obexapp_util_locale_to_utf8(char const *src, size_t srclen, + char *dst, size_t dstlen) { char const *s = src; char *d = dst; @@ -217,8 +218,8 @@ */ int -obexapp_util_locale_from_utf16be(char const *src, int srclen, - char *dst, int dstlen) +obexapp_util_locale_from_utf16be(char const *src, size_t srclen, + char *dst, size_t dstlen) { char const *s = src; char *d = dst; @@ -242,12 +243,12 @@ *d = '\0'; if (utf16) { + if (dstlen == 0) + return (-1); /* buffer is too short */ + d ++; dstlen --; - if (dstlen <= 0) - return (-1); /* buffer is too short */ - *d = '\0'; } @@ -259,8 +260,8 @@ */ int -obexapp_util_locale_to_utf16be(char const *src, int srclen, - char *dst, int dstlen) +obexapp_util_locale_to_utf16be(char const *src, size_t srclen, + char *dst, size_t dstlen) { char const *s = src; char *d = dst; @@ -282,12 +283,13 @@ } while (n > 0); *d = '\0'; - d ++; - dstlen --; - if (dstlen <= 0) + if (dstlen == 0) return (-1); /* buffer is too short */ + d ++; + dstlen --; + *d = '\0'; return (0); Index: util.h =================================================================== RCS file: /usr/local/cvs/ports/obexapp/util.h,v retrieving revision 1.4 diff -u -r1.4 util.h --- util.h 23 Dec 2004 23:09:49 -0000 1.4 +++ util.h 25 Dec 2004 21:58:43 -0000 @@ -34,10 +34,10 @@ int obexapp_util_locale_init(void); void obexapp_util_locale_fini(void); -int obexapp_util_locale_from_utf8(char const *src, int srclen, char *dst, int dstlen); -int obexapp_util_locale_to_utf8(char const *src, int srclen, char *dst, int dstlen); -int obexapp_util_locale_from_utf16be(char const *src, int srclen, char *dst, int dstlen); -int obexapp_util_locale_to_utf16be(char const *src, int srclen, char *dst, int dstlen); +int obexapp_util_locale_from_utf8(char const *src, size_t srclen, char *dst, size_t dstlen); +int obexapp_util_locale_to_utf8(char const *src, size_t srclen, char *dst, size_t dstlen); +int obexapp_util_locale_from_utf16be(char const *src, size_t srclen, char *dst, size_t dstlen); +int obexapp_util_locale_to_utf16be(char const *src, size_t srclen, char *dst, size_t dstlen); int obexapp_util_read(int fd, char *buffer, int buffer_length); int obexapp_util_write(int fd, char const *buffer, int buffer_length); --------------090407060904050203000304--