Phil Dibowitz | 1 Apr 2008 05:04

Re: How to detach kernel drivers (manually) for non-linux OSes

[resend, forgot I wasn't subscribed anymore...]

Xiaofan Chen wrote:
> On Thu, Feb 21, 2008 at 6:47 PM, Phil Dibowitz <phil <at> ipom.com> wrote:
>>  While I realize that usb_detach_kernel_driver_np() support hasn't been added
>>  for these other OSes, I'm hoping there's at least some manual step I can
>>  tell my users to take to allow them to use the software. Perhaps a blacklist
>>  of devices? I don't know these other OSes all that well, Linux is my primary
>>  platform - but I figured this would be the best place to ask. I didn't see
>>  anything in the libusb docs or in various google searches. If I've missed
>>  docs or a list somewhere, please feel free to point me there.
>>
> 
> The following is an overview of the manual process.
> http://www.apcupsd.org/manual/USB_Configuration.html
> 
> Under FreeBSD you will have to rebuild the kernel. Under Windows
> you can use device manager to "update" the driver. I do not have access
> to a Mac, it is said that you need to write a dummy kext driver.
> http://statistics.roma2.infn.it/~sestito/g15mac/HOWTO-Logitech_G15_and_Mac_OS_X.html

Xiaofan,

I ended up getting a kext working on Mac OSX, that was reasonably straight
forward from your pointer and a few others I found to compliment it, thaks!

But I'm still quite stuck with FreeBSD. With FreeBSD 6, when I recompiled
the kernel to switch to ugen, the system generally didn't recognize the
device I wanted to use with libusb. I upgraded to FreeBSD 7.0 today, which
uses ugen by default, and when I plug in the device I get:
(Continue reading)

Phil Dibowitz | 1 Apr 2008 04:58

Re: How to detach kernel drivers (manually) for non-linux OSes

Xiaofan Chen wrote:
> On Thu, Feb 21, 2008 at 6:47 PM, Phil Dibowitz <phil <at> ipom.com> wrote:
>>  While I realize that usb_detach_kernel_driver_np() support hasn't been added
>>  for these other OSes, I'm hoping there's at least some manual step I can
>>  tell my users to take to allow them to use the software. Perhaps a blacklist
>>  of devices? I don't know these other OSes all that well, Linux is my primary
>>  platform - but I figured this would be the best place to ask. I didn't see
>>  anything in the libusb docs or in various google searches. If I've missed
>>  docs or a list somewhere, please feel free to point me there.
>>
> 
> The following is an overview of the manual process.
> http://www.apcupsd.org/manual/USB_Configuration.html
> 
> Under FreeBSD you will have to rebuild the kernel. Under Windows
> you can use device manager to "update" the driver. I do not have access
> to a Mac, it is said that you need to write a dummy kext driver.
> http://statistics.roma2.infn.it/~sestito/g15mac/HOWTO-Logitech_G15_and_Mac_OS_X.html

Xiaofan,

I ended up getting a kext working on Mac OSX, that was reasonably straight
forward from your pointer and a few others I found to compliment it, thaks!

But I'm still quite stuck with FreeBSD. With FreeBSD 6, when I recompiled
the kernel to switch to ugen, the system generally didn't recognize the
device I wanted to use with libusb. I upgraded to FreeBSD 7.0 today, which
uses ugen by default, and when I plug in the device I get:

  uhub0: device problem (STALLED), disabling port 2
(Continue reading)

Xiaofan Chen | 1 Apr 2008 05:38
Picon

Re: How to detach kernel drivers (manually) for non-linux OSes

On 4/1/08, Phil Dibowitz <phil <at> ipom.com> wrote:
> I ended up getting a kext working on Mac OSX, that was reasonably straight
> forward from your pointer and a few others I found to compliment it, thaks!
>
> But I'm still quite stuck with FreeBSD. With FreeBSD 6, when I recompiled
> the kernel to switch to ugen, the system generally didn't recognize the
> device I wanted to use with libusb. I upgraded to FreeBSD 7.0 today, which
> uses ugen by default, and when I plug in the device I get:
>
>  uhub0: device problem (STALLED), disabling port 2
>
> And obviously, 'usbdevs' doesn't list it and libusb can't find it.
>
> Any help would be appreciated... thanks.

Hmm, it seems that FreeBSD does not like your device.
You may want to ask the question in FreeBSD usb mailing
list. There are some very helpful people there. But I will
think your device is at fault. I've no problem with ugen to
recognize some of my device. But I should say
libusb does not work well under FreeBSD in general
based on my limited experiences.

You may want to read some of my experiences with
FreeBSD and libusb. Basically I've no luck with
the stock kernel (6.0/6.2/7.0). I have better lucks with
the alternative HPS stack.
http://mcuee.blogspot.com/search/label/FreeBSD

I just recently reinstalled FreeBSD 7.0 and I am trying
(Continue reading)

Aitana Rodriguez | 1 Apr 2008 08:41
Picon

Re: Devices not found in linux

The lsusb command works properly and detects all my USB devices, the result I wrote on the first post comes from the LibusbTest.cpp wrote in C so I'm not sure that the problem comes from java. When I execute the LibusbTest I obtein an "error obtaining child information: Inappropriate ioctl for device", could the problem come from here?

2008/3/31, Xiaofan Chen <xiaofanc <at> gmail.com>:
On 3/31/08, Aitana Rodriguez <airodrim <at> gmail.com> wrote:
> I'm using libusb-java to detect usb devices on linux and windows. I've
> tested on windows and everything looks fine, but I'm having problems with
> UsbView in linux. All Usb busses work ok and I can view them, but when I
> plug an usb device the library doesn't create it.
>
> The call to the method LibusbJava.usb_find_devices() returns 1, so the
> device is detected but I think that something is not properly configured but
> I can't guess what it is. I've run the script as root but there is no
> difference.

What does "lsusb -vvv" say? If lsusb can find the device but your Java
program can not, it is a Javaxusb issue then. From what I read,
Java is the wrong language for USB...

Xiaofan

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Libusb-devel mailing list
Libusb-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-devel
Xiaofan Chen | 1 Apr 2008 09:09
Picon

Re: Devices not found in linux

On 4/1/08, Aitana Rodriguez <airodrim <at> gmail.com> wrote:
> The lsusb command works properly and detects all my USB devices, the result
> I wrote on the first post comes from the LibusbTest.cpp wrote in C so I'm
> not sure that the problem comes from java.

What is LibusbTest.cpp doing here?

> When I execute the LibusbTest I
> obtein an "error obtaining child information: Inappropriate ioctl for
> device", could the problem come from here?

As far as I know, that is a normal warning message and not
a problem.

Xiaofan

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
davor emard | 1 Apr 2008 23:20
Picon

Re: Cyberpower usbhid-ups wrong battery voltage

HI

It's impossible 12V PbAcid battery would be
destroyed by charging it to 21V for
prolonged period (more than few minutes or
maybe even seconds)

It's either bug in firmware or incorrectly calculated
HID value (coefficients not taken into account?).

Other cyberpower owners have reported similar voltage
issue

On 3/31/08, Tim Roberts <timr <at> probo.com> wrote:
> davor emard wrote:
> > I have cyberpower value 800E connected via usb.
> > In the status battery voltage is too high 20V - 21V
> > while measurement at the battery terminals gives 13.6V
> >
> > ------------------------------------------------------------------------
> >
> > battery.charge: 100
> > battery.charge.low: 10
> > battery.charge.warning: 20
> > battery.mfr.date: CPS
> > battery.runtime: 1050
> > battery.runtime.low: 300
> > battery.type: PbAcid
> > battery.voltage: 21.2
> > battery.voltage.nominal: 12
> >
>
> It is quite possible this is a "no load" measurement vs your "load"
> measurement.
>
> It's certainly true that no one here can do anything about this.
>
> --
> Tim Roberts, timr <at> probo.com
> Providenza & Boekelheide, Inc.
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Libusb-devel mailing list
> Libusb-devel <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusb-devel
>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
davor emard | 1 Apr 2008 23:21
Picon

Re: Cyberpower usbhid-ups wrong battery voltage

HI I have posted this to wrong list I guess should go to nut list
sorry

On 4/1/08, davor emard <davoremard <at> gmail.com> wrote:
> HI
>
> It's impossible 12V PbAcid battery would be
> destroyed by charging it to 21V for
> prolonged period (more than few minutes or
> maybe even seconds)
>
> It's either bug in firmware or incorrectly calculated
> HID value (coefficients not taken into account?).
>
> Other cyberpower owners have reported similar voltage
> issue
>
>
>
>
> On 3/31/08, Tim Roberts <timr <at> probo.com> wrote:
> > davor emard wrote:
> > > I have cyberpower value 800E connected via usb.
> > > In the status battery voltage is too high 20V - 21V
> > > while measurement at the battery terminals gives 13.6V
> > >
> > > ------------------------------------------------------------------------
> > >
> > > battery.charge: 100
> > > battery.charge.low: 10
> > > battery.charge.warning: 20
> > > battery.mfr.date: CPS
> > > battery.runtime: 1050
> > > battery.runtime.low: 300
> > > battery.type: PbAcid
> > > battery.voltage: 21.2
> > > battery.voltage.nominal: 12
> > >
> >
> > It is quite possible this is a "no load" measurement vs your "load"
> > measurement.
> >
> > It's certainly true that no one here can do anything about this.
> >
> > --
> > Tim Roberts, timr <at> probo.com
> > Providenza & Boekelheide, Inc.
> >
> >
> > -------------------------------------------------------------------------
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> >
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > _______________________________________________
> > Libusb-devel mailing list
> > Libusb-devel <at> lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/libusb-devel
> >
>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Tim Roberts | 1 Apr 2008 23:31

Re: Cyberpower usbhid-ups wrong battery voltage

davor emard wrote:
> It's either bug in firmware or incorrectly calculated
> HID value (coefficients not taken into account?).
>   

Maybe, but in either case this is an issue for linux-usb or nut-upsdev, 
not for libusb.

--

-- 
Tim Roberts, timr <at> probo.com
Providenza & Boekelheide, Inc.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Michael Bender | 1 Apr 2008 23:32
Picon

Re: Cyberpower usbhid-ups wrong battery voltage

Hmm... kind of makes my point that I made here a few weeks ago  
concerning
the "value" of using cheaply engineered UPSes for critical backup of  
your
systems, doesn't it? If they can't figure out how to add a serial number
to the USB descriptor info and they can't figure out how to either  
properly
measure and report battery voltage (or even worse they can't figure out
how to keep their charger from overcharging the battery!) then how much
of a "value" is this thing anyway?

mike

----

On Apr 1, 2008, at 2:21 PM, davor emard wrote:
> HI I have posted this to wrong list I guess should go to nut list
> sorry
>
>
> On 4/1/08, davor emard <davoremard <at> gmail.com> wrote:
>> HI
>>
>> It's impossible 12V PbAcid battery would be
>> destroyed by charging it to 21V for
>> prolonged period (more than few minutes or
>> maybe even seconds)
>>
>> It's either bug in firmware or incorrectly calculated
>> HID value (coefficients not taken into account?).
>>
>> Other cyberpower owners have reported similar voltage
>> issue
>>
>>
>>
>>
>> On 3/31/08, Tim Roberts <timr <at> probo.com> wrote:
>>> davor emard wrote:
>>>> I have cyberpower value 800E connected via usb.
>>>> In the status battery voltage is too high 20V - 21V
>>>> while measurement at the battery terminals gives 13.6V
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> battery.charge: 100
>>>> battery.charge.low: 10
>>>> battery.charge.warning: 20
>>>> battery.mfr.date: CPS
>>>> battery.runtime: 1050
>>>> battery.runtime.low: 300
>>>> battery.type: PbAcid
>>>> battery.voltage: 21.2
>>>> battery.voltage.nominal: 12
>>>>
>>>
>>> It is quite possible this is a "no load" measurement vs your "load"
>>> measurement.
>>>
>>> It's certainly true that no one here can do anything about this.
>>>
>>> --
>>> Tim Roberts, timr <at> probo.com
>>> Providenza & Boekelheide, Inc.
>>>
>>>
>>> -------------------------------------------------------------------------
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>>
>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
>>> _______________________________________________
>>> Libusb-devel mailing list
>>> Libusb-devel <at> lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/libusb-devel
>>>
>>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Libusb-devel mailing list
> Libusb-devel <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusb-devel

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Aitana Rodriguez | 2 Apr 2008 08:29
Picon

Re: Devices not found in linux

Well, I didn't obtein any information from the usbView, so I decided to execute the LibusbTest to work only with the C part of the library. It is supposed that the LibusbTest has to display information about USB buses in a similar way as lsusb does but it only list the buses and no device. Maybe java isn't the best language for managing USB devices, but it works right under Windows, and I think that there are people using it under Linux too. I need to use the same library for Windows and Linux, that is why I decided to use libusb.

2008/4/1, Xiaofan Chen <xiaofanc <at> gmail.com>:
On 4/1/08, Aitana Rodriguez <airodrim <at> gmail.com> wrote:
> The lsusb command works properly and detects all my USB devices, the result
> I wrote on the first post comes from the LibusbTest.cpp wrote in C so I'm
> not sure that the problem comes from java.

What is LibusbTest.cpp doing here?

> When I execute the LibusbTest I
> obtein an "error obtaining child information: Inappropriate ioctl for
> device", could the problem come from here?

As far as I know, that is a normal warning message and not
a problem.

Xiaofan

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Libusb-devel mailing list
Libusb-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-devel

Gmane