At 2011-11-16 21:01:51,"Charles Lepple" <[email protected]> wrote:
>
>On Nov 16, 2011, at 3:55 AM, Andrew Min Chang wrote:
>
>> Hi, Charles,
>> 
>> libusb-0.1.12 did not work, too.
>> 
>> Do you mean the testlibusb.c as attached? I compiled it by:
>> # cc -c testlibusb.c
>> # cc -o test testlibusb.o -lusb
>> Because there's gcc on my target board. 
>> but ./test prints nothing. I looked into the source and fount that 
>> "usb_busses" is zero.
>> 
>> I had a usb hardisk and a APC smart-ups connected to my board through usb. 
>> The hardisk was recognized and automatically mounted to system. While 
>> smart-ups was not recognized by Linux, but Linux knew that that was a usb 
>> device. 
>> 
>> I am not familar with usb drive. But I guess if libusb is correctly 
>> installed, testlibusb should list all usb device. So libusb was not 
>> correctly installed. However, gcc recognized the usb.h provided by libusb. 
>> That seemed strange to me.
>
>Yes, that's the one. Two issues:
>
>1) If testlibusb does not print anything when you run it, then NUT probably 
>won't see any USB devices, either. Does your board have /dev/bus/usb or a 
>similar usbdevfs mounted?
>
>2) Since testlibusb.c runs, you should be able to re-run the NUT configure 
>script, and it should detect libusb-0.1.12. I am not sure if libusb-compat 
>will get in the way, though.

Hi Charles,

Oh, you gave me inspiration. The Difference between my NUT and testlibusb is: 
NUT is compiled with cross enviroment, while testlibusb was builded directly on 
the target board. I wonder if that made different. 

But still, NUT could not be configured even though testlibusb.c ran. Maybe my 
commands wrong?
# export PKG_CONFIG_PATH=/mnt/ARM_FS/lib/pkgconfig
# ./configure --with-usb --with-doc \
--host=arm-mv5sft-linux-gnueabi \
--prefix=/mnt/ARM_FS \
--with-usb-libs=-L/mnt/ARM_FS/lib \
--with-usb-includes=-I/mnt/ARM_FS/include

Accoding config.log, actually I found that libusb 0.1.12 was recognized 
(config.log attached). 

About libusb-compat, isn't that a interface to make programs compatible with 
later linusb-1.0?
Because libusb-compat is not able to be configured when dectectting libusb-0.1, 
even the oldest ver 0.1.0. libusb-compat config.log is attached, too. You can 
see the error message "checking for LIBUSB_1_0... configure: error: Package 
requirements (libusb-1.0 >= 0.9.1) were not met".



Best Regards
Andrew Chang
2011-11-17

 

Attachment: logs.tar.gz
Description: GNU Zip compressed data

_______________________________________________
Nut-upsuser mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to