Re: usb/146367: [PATCH] Revision 205728: broken bluetooth mouse support

2010-05-07 Thread Hans Petter Selasky
On Friday 07 May 2010 05:49:43 Alex Deiter wrote:
 Alex Deiter
 

Hi,

The first part of the patch is not correct. The ID byte should be included in 
the buffer or you need to extend the buffer. Note that the kernel version of 
hid_get_data() is different at this point.

The second part of your patch is correct, and indicates a merge glitch, due to 
changing the signedness of the data type some time back.

Can you try the following patch in kernel and user-space and see that it works 
for your BT-mouse and USB-mouse?

http://p4web.freebsd.org/@@177882?ac=10

--HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/146367: [PATCH] Revision 205728: broken bluetooth mouse support

2010-05-07 Thread Hans Petter Selasky
The following reply was made to PR usb/146367; it has been noted by GNATS.

From: Hans Petter Selasky hsela...@c2i.net
To: freebsd-usb@freebsd.org
Cc: Alex Deiter alex.dei...@gmail.com,
 freebsd-gnats-sub...@freebsd.org
Subject: Re: usb/146367: [PATCH] Revision 205728: broken bluetooth mouse support
Date: Fri, 7 May 2010 09:38:49 +0200

 On Friday 07 May 2010 05:49:43 Alex Deiter wrote:
  Alex Deiter
  
 
 Hi,
 
 The first part of the patch is not correct. The ID byte should be included in 
 the buffer or you need to extend the buffer. Note that the kernel version of 
 hid_get_data() is different at this point.
 
 The second part of your patch is correct, and indicates a merge glitch, due to 
 changing the signedness of the data type some time back.
 
 Can you try the following patch in kernel and user-space and see that it works 
 for your BT-mouse and USB-mouse?
 
 http://p4web.freebsd.org/@@177882?ac=10
 
 --HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: USB serial device naming

2010-05-07 Thread Milan Obuch
On Thursday 06 May 2010 11:07:00 Alexandr Rybalko wrote:
 On Wed, 5 May 2010 21:57:20 +0200

 Hans Petter Selasky hsela...@c2i.net wrote:
  Hi,
 
  Thanks for all good ideas. Can you give some feedback on the following
  solution:
 
  http://p4web.freebsd.org/@@19?ac=10

 Looks interest, can You send to me patch to svn head. (So more difference
 in p4, without access to p4 difficult to test it)


Me too... I have no experience with p4, now I even could not access it for 
some reason...

 Think uhub_child_location_string output must be added to attach event, so
 devd can make unique link for device.


Milan
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: Revision 205728: broken bluetooth mouse support

2010-05-07 Thread Kai Wang
On Fri, May 07, 2010 at 01:58:13AM +0400, Alex Deiter wrote:
 Hi,
 
 Bluetooth mouse support is broken after Revision 205728:
 
 http://svn.freebsd.org/viewvc/base?view=revisionrevision=205728
 
 When I move the mouse  - cursor stays in same place but moves the
 current position of the console.
 
 Proposed patch as an attachment. Could you please revew this ?

Hi Alex,

If we adopt your patch, usbhidctl(1) and usbhidaction(1) will be
broken again on device with multiple report IDs.

Could you please try if the attached patch for the bthidd(8)
daemon works as well?

Thanks,
Kai
Index: usr.sbin/bluetooth/bthidd/hid.c
===
--- usr.sbin/bluetooth/bthidd/hid.c (revision 207113)
+++ usr.sbin/bluetooth/bthidd/hid.c (working copy)
@@ -130,7 +130,7 @@ hid_interrupt(bthid_session_p s, uint8_t *data, in
hid_item_t  h;
int32_t report_id, usage, page, val,
mouse_x, mouse_y, mouse_z, mouse_butt,
-   mevents, kevents;
+   mevents, kevents, i;
 
assert(s != NULL);
assert(s-srv != NULL);
@@ -150,8 +150,8 @@ hid_interrupt(bthid_session_p s, uint8_t *data, in
}
 
report_id = data[1];
-   data += 2;
-   len -= 2;
+   data ++;
+   len --;
 
hid_device = get_hid_device(s-bdaddr);
assert(hid_device != NULL);
@@ -202,17 +202,11 @@ hid_interrupt(bthid_session_p s, uint8_t *data, in
if (val  val  kbd_maxkey())
bit_set(s-keys1, val);
 
-   data ++;
-   len --;
-
-   len = min(len, h.report_size);
-   while (len  0) {
+   for (i = 1; i  h.report_count; i++) {
+   h.pos += h.report_size;
val = hid_get_data(data, h);
if (val  val  kbd_maxkey())
bit_set(s-keys1, val);
-
-   data ++;
-   len --;
}
}
break;
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/146367: [PATCH] Revision 205728: broken bluetooth mouse support

2010-05-07 Thread Hans Petter Selasky
On Friday 07 May 2010 12:13:15 Alex Deiter wrote:
 Hi,
 
 Thanks a lot for your reply!
 I`m applied patches and rebuild kernel and world.
 After system reboot problem still persist:
 
 PS/2 mouse work fine
 USB mouse work fine
 Bluetooth mouse doesn't'work - see attached video (can be view with
  mplayer)
 
 P.S. with my patch bt mouse work fine
 
 Thanks a lot!

Which daemon is driving the BT mouse?

--HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/146367: [PATCH] Revision 205728: broken bluetooth mouse support

2010-05-07 Thread Hans Petter Selasky
The following reply was made to PR usb/146367; it has been noted by GNATS.

From: Hans Petter Selasky hsela...@c2i.net
To: Alex Deiter alex.dei...@gmail.com
Cc: freebsd-usb@freebsd.org,
 freebsd-gnats-sub...@freebsd.org
Subject: Re: usb/146367: [PATCH] Revision 205728: broken bluetooth mouse support
Date: Fri, 7 May 2010 12:14:14 +0200

 On Friday 07 May 2010 12:13:15 Alex Deiter wrote:
  Hi,
  
  Thanks a lot for your reply!
  I`m applied patches and rebuild kernel and world.
  After system reboot problem still persist:
  
  PS/2 mouse work fine
  USB mouse work fine
  Bluetooth mouse doesn't'work - see attached video (can be view with
   mplayer)
  
  P.S. with my patch bt mouse work fine
  
  Thanks a lot!
 
 Which daemon is driving the BT mouse?
 
 --HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/146367: [PATCH] Revision 205728: broken bluetooth mouse support

2010-05-07 Thread Kai Wang
On Fri, May 07, 2010 at 12:14:14PM +0200, Hans Petter Selasky wrote:
 On Friday 07 May 2010 12:13:15 Alex Deiter wrote:
  Hi,
  
  Thanks a lot for your reply!
  I`m applied patches and rebuild kernel and world.
  After system reboot problem still persist:
  
  PS/2 mouse work fine
  USB mouse work fine
  Bluetooth mouse doesn't'work - see attached video (can be view with
   mplayer)
  
  P.S. with my patch bt mouse work fine
  
  Thanks a lot!
 
 Which daemon is driving the BT mouse?

It is the bthidd(8) daemon. I've proposed a patch here:

http://lists.freebsd.org/pipermail/freebsd-usb/2010-May/008675.html

But I can not test it since I don't have any bluetooth mouse or keyboard.

Kai
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/146367: [PATCH] Revision 205728: broken bluetooth mouse support

2010-05-07 Thread Kai Wang
The following reply was made to PR usb/146367; it has been noted by GNATS.

From: Kai Wang kaiwan...@gmail.com
To: Hans Petter Selasky hsela...@c2i.net
Cc: Alex Deiter alex.dei...@gmail.com, freebsd-gnats-sub...@freebsd.org,
freebsd-usb@freebsd.org
Subject: Re: usb/146367: [PATCH] Revision 205728: broken bluetooth mouse
 support
Date: Fri, 7 May 2010 12:21:46 +0200

 On Fri, May 07, 2010 at 12:14:14PM +0200, Hans Petter Selasky wrote:
  On Friday 07 May 2010 12:13:15 Alex Deiter wrote:
   Hi,
   
   Thanks a lot for your reply!
   I`m applied patches and rebuild kernel and world.
   After system reboot problem still persist:
   
   PS/2 mouse work fine
   USB mouse work fine
   Bluetooth mouse doesn't'work - see attached video (can be view with
mplayer)
   
   P.S. with my patch bt mouse work fine
   
   Thanks a lot!
  
  Which daemon is driving the BT mouse?
 
 It is the bthidd(8) daemon. I've proposed a patch here:
 
 http://lists.freebsd.org/pipermail/freebsd-usb/2010-May/008675.html
 
 But I can not test it since I don't have any bluetooth mouse or keyboard.
 
 Kai
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: Revision 205728: broken bluetooth mouse support

2010-05-07 Thread Alex Deiter
Hi Kal,

Thanks a lot for your patch!
I`m apply  this patch and my bt mouse work fine again!

For Hans:

 Which daemon is driving the BT mouse?
bthidd

patch for bthidd(8) works fine only WITH your patches for:
lib/libusbhid/data.c
sys/dev/usb/usb_hid.c
sys/dev/usb/usbhid.h

Thanks a lot!

2010/5/7 Kai Wang kaiwan...@gmail.com:
 On Fri, May 07, 2010 at 01:58:13AM +0400, Alex Deiter wrote:
 Hi,

 Bluetooth mouse support is broken after Revision 205728:

 http://svn.freebsd.org/viewvc/base?view=revisionrevision=205728

 When I move the mouse  - cursor stays in same place but moves the
 current position of the console.

 Proposed patch as an attachment. Could you please revew this ?

 Hi Alex,

 If we adopt your patch, usbhidctl(1) and usbhidaction(1) will be
 broken again on device with multiple report IDs.

 Could you please try if the attached patch for the bthidd(8)
 daemon works as well?

 Thanks,
 Kai




-- 
--
Alex Deiter
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/146367: [PATCH] Revision 205728: broken bluetooth mouse support

2010-05-07 Thread Alex Deiter
Hi Hans,

I`m apply  patch for bthidd from Kal and my bt mouse work fine again!

 Which daemon is driving the BT mouse?
bthidd

patch from Kal for bthidd(8) works fine only WITH your patches for:
lib/libusbhid/data.c
sys/dev/usb/usb_hid.c
sys/dev/usb/usbhid.h

Thanks a lot!

2010/5/7 Hans Petter Selasky hsela...@c2i.net:
 On Friday 07 May 2010 12:13:15 Alex Deiter wrote:
 Hi,

 Thanks a lot for your reply!
 I`m applied patches and rebuild kernel and world.
 After system reboot problem still persist:

 PS/2 mouse work fine
 USB mouse work fine
 Bluetooth mouse doesn't'work - see attached video (can be view with
  mplayer)

 P.S. with my patch bt mouse work fine

 Thanks a lot!

 Which daemon is driving the BT mouse?

 --HPS




-- 
--
Alex Deiter
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/146104: Samsung YP-U4 mp3 player USB_ERR_TIMEOUT

2010-05-07 Thread Peter Toth
The following reply was made to PR usb/146104; it has been noted by GNATS.

From: Peter Toth peter.toth...@gmail.com
To: bug-follo...@freebsd.org, peter.toth...@gmail.com
Cc:  
Subject: Re: usb/146104: Samsung YP-U4 mp3 player USB_ERR_TIMEOUT
Date: Sat, 08 May 2010 00:42:57 +1200

 I've put this line into /usr/src/sys/dev/usb/usbdevs just bellow SAMSUNG  
 YP-U2:
 product SAMSUNG YP_U4   0x5092  YP-U4 MP3 Player
 
 and added this to /usr/src/sys/dev/usb/quirk/usb_quirk.c :
 USB_QUIRK(SAMSUNG, YP_U4, 0x, 0x, UQ_MSC_NO_SYNC_CACHE),
 
 All working like a charm. Could this be included in FreeBSD 8.1?
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: apcupsd port regression from 7x. to 8.x

2010-05-07 Thread Bernd Walter
On Thu, May 06, 2010 at 04:56:36PM -0400, Mike Tancsa wrote:
 At 04:40 PM 5/6/2010, Hans Petter Selasky wrote:
  0.003 apcupsd: generic-usb.c:398 Initializing libusb
 
 The FreeBSD LibUSB v0.1 reports the wrong number of busses and devices. I 
 can
 fix this.
 
 Great!
 
  0.003 apcupsd: generic-usb.c:403 Found 0 USB busses
  0.007 apcupsd: generic-usb.c:405 Found 0 USB devices
 
 The problem is that the UPS code is designed to attach to the first 
 matching
 device only. LibUSB does not hide devices with drivers already 
 attached, which
 I think your utility assumes. You should use:
 
 pidfile, see man pidfile
 
 To create a temporary file with some string which consists of all numbers 
 in
 udev-filename, separated by .. Or USB LibUSB v.1.0!
 
 I am guessing the program would need to be re-written to use v1.0 
 ?  Thanks for the feedback and help as always!

I recently converted own code to 1.0 API, just to get negative
feedback from Debian users, since they only offer libusb 0.1 packages
for anything but bleeding edge development versions.
I assume because of this the old API will still be around for some time.

-- 
B.Walter be...@bwct.de http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: apcupsd port regression from 7x. to 8.x

2010-05-07 Thread Xiaofan Chen
On Fri, May 7, 2010 at 9:27 PM, Bernd Walter ti...@cicely7.cicely.de wrote:
 I am guessing the program would need to be re-written to use v1.0
 ?  Thanks for the feedback and help as always!

 I recently converted own code to 1.0 API, just to get negative
 feedback from Debian users, since they only offer libusb 0.1 packages
 for anything but bleeding edge development versions.
 I assume because of this the old API will still be around for some time.


Hmm, that is a bit strange. But you are right Debian/Ubuntu
still have libusb-0.1 and libusb-1.0. Other Linux distros move
to libusb-1.0 and libusb-0.1-compat since libusb-0.1 is no longer
maintained by the developers and the bug reports are treated
as won't fix.
http://www.libusb.org/report/1


-- 
Xiaofan (part of the libusb-win32 admin team)
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/146104: Samsung YP-U4 mp3 player USB_ERR_TIMEOUT

2010-05-07 Thread Hans Petter Selasky

See USB P4 change #177918.

--HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org