Programming :: Libusb Tutorial ?
Jul 25, 2011Any good tutorial for libusb APIs..
View 3 RepliesAny good tutorial for libusb APIs..
View 3 RepliesI'm trying to learn how to use USB from c code. Rather trying kernel stuff I thought I'd (after some searching ) use libusb. So I searched for documentation, unfortunately I came across two sets of documents each with it's own API?
[URL] and [URL]
For example one inits with libusb_init (libusb_context **context) the other uses void usb_init(void); I'm using libusb rather than kernel programming as I'd like to compile the code for windows as well as linux.
I've built a piece of hardware that communicates using usb. I was wondering could I make a libusb based program run on it's own without gcc/ libusb
View 10 Replies View RelatedI am trying to read raw data from usb device with libusb but I have some problems.
Code:
int main(void)
{
struct sigaction sigact;
int r = 1;
r = libusb_init(NULL);
[Code]...
I already figured out the basics of gtk2-perl, but i can't find a good tutorial for things like lists, scrolling viewports, drag n' drop, etc.
I guess any programming language is OK because it shouldn't be hard to translate it into Perl.
Any recommendations on what Perl tutorial to use?
View 1 Replies View RelatedDoes anyone knows about some good c++ tutorial ? I don't wanna something for absolute beginners,I need something for advanced topics, tips...Something you liked and helped you a lot I prefer Internet tutorials/e-books but "real" book should be good too.
View 5 Replies View RelatedDoes anyone know from experience a good gdb tutorial, so I can learn to use it from the command line.
View 2 Replies View RelatedI have written a program that I would like to cross compile for x86 and x86_64 architectures. I have tried google and the search function here to no success, most information I find is too specific (instructions for a specific program), or dealing with cross compiling for windows on linux.Does anyone know of a tutorial dealing with straight making a 32 bit binary on a 64 bit processor (both are intel)?
View 2 Replies View RelatedI'm looking for javascript tutorials or books that meets the following criteria:
1. Very thorough: Starts with the most fundamental concepts and progresses logically from basic to advanced concepts, without skipping over important ideas for the sake of expediency.
2. Lots of small practice exercises that parallel the concepts and syntax being learned.
I've looked at a lot of tutorials, but they all tend to be lacking in one of these areas or the other.
I've been playing around a bit with Xlib programming, and I'm just wondering if anyone knows of a good tutorial involving XContext's? Even if someone could explain the concept to me a bit.
View 1 Replies View Relatedi'm a college student studying pc programing, and i was given today a special work and i have to program using miranda... which i've never used it >.< can anyone give me a hand to where to download, how to compile, and a simple tutorial for making a simple program or something?
View 3 Replies View RelatedI am running 11.2 64 bit on a Dell Vostro machine. I am unable to get piklab to connect to a PICKit 2 over USB. I have created a file /etc/udev/rules.d/26-microchip.rules which contains the line:
ATTR{idVendor}=="04d8", ATTR{idProduct}=="0033", OWNER:="root", GROUP:="users",MODE:="0660"
This gives a node /dev/bus/usb/006/002 with attributes crw-rw---- owner root group user. The device is rear/write to any member of the "users" group.In piklab the dialogue "Configure Piklab" reached through the menu Programmer->Settings... on the Preogrammer Selection the Port Selection tab displays USB Connection:Error.After much research I find that there may be problems with the libusb library under 11.2 so I try to see what is returned by lsusb. I enter the command:
sudo lsusb -v -s 006:002
this returns:
Bus 006 Device 002: ID 04d8:0033 Microchip Technology, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
[code]....
This shows that the udev mechanism appears to be finding the device and all the data is being collected but the last line looks ominous.
What does "cannot read device status, Broken pipe (32)" mean and where does it come from? Is this the cause of the USB connection error?
I am trying to programming on leJOS and I need to some base on prerequisite steps. If Someone know could tell me how to install libusb on Ubuntu. And how can I check currently version or update or upgrade?
View 3 Replies View RelatedI'm trying to install libusb. I've downloaded a file from [URL]. I've unzipped the file; the folder's on my desktop. I've tried to install this, but I'm not sure how. Under installation it says: See the file 'INSTALL'. There are a few files that start with this term: INSTALL.libusb, INSTALL.libusb.in and install-sh. The first two appear to be the same, while the latter appears to be some sort of program.
When I double click it, I get a few options, including "run". I assumed this was the correct way to install the program, but when I hit run, nothing happens. I've displayed this file, but this gives me no additional information. I've tried running it in terminal: nothing. Maybe it has installed, and I just don't know it. How would I even check if it's installed? (I'm only installing libusb because I need it for something else).
I am trying to get the libusb-dev package installed through Synapticslibusb-dev: Depends: libusb-0.1-4 (= 2:0.1.12-14) but 2:0.1.12-14ubuntu0.2 is to be installed E: Broken packagesI have also tried sudo apt-get install libusb-dev but the same result
View 3 Replies View RelatedI got Fedora core release 3
kernel 2.6.9-.667
I would like to know which command I have to use to see the libusb installed. I used this:
yum list installed | grep usb
but no output.
I am unable to understand libusb.
View 2 Replies View RelatedI run a program (findknxusb) to scan for devices on USB, but the device is not found.
The debugging level for libusb is on:
$ ./findknxusb
Possible addresses for KNX USB devices:
libusb_set_debug...
libusb: setting debugging level to 1 (on)
libusb_init...
[Code]....
I'm having a weird problem with libusb-1.0. I have a fresh install of Fedora 11. I'm trying to control a USB HID device (own development) and I want to offer Linux support via libusb. Writing to the device is not a problem and works without any problem. The problems starts when I want to read from the device. Under Windows everything works without a problem.
Via lsusb -v I get this information:
Bus 003 Device 013: ID 16c0:0552
Device Descriptor:
bLength 18
bDescriptorType 1
[Code]...
I have an application that reads data from a medical device connected using usb.
I am writing the driver for this device since it is a vendor specific device.
I am using libusb v0.1 API and get notification to the application when the device is connected/disconnected.
I am using Linux Ubuntu with kernel 2.6.*
I too have what looks like the same problem. I too have read all the relevant man pages and other relevant sites:
Supported devices [URL]
CanoScan LiDE 110 (the printer I've just bought) has "complete" support apparently.
Followed directions here: [URL]
Read: [URl]
Another story of purchasing a "complete"ly supported scanner. [URL]
The solution? Use windows xp in a vm.
I don't think much of that sort of solution. As a temporary work around... ok. I'm running debian lenny.
Code:
uname -r
provides:
2.6.26-2-686
Code:
lsusb
provides:
Bus 005 Device 002: ID 04a9:1909 Canon, Inc.
Code:
sane-find-scanner -v -f
provides:
libusb not available
# No USB scanners found. If you expected something different, make sure that
# you have loaded a kernel driver for your USB host controller and have setup
# the USB system correctly. See man sane-usb for details.
# SANE has been built without libusb support. This may be a reason
# for not detecting USB scanners. Read README for more details.
Code:
scanimage -L
provides:
device 'v4l:/dev/video0' is a Noname USB 2.0 Camera virtual device
Code:
dpkg-query -l '*libusb*'
clearly shows I have libusb installed:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
ii libusb-0.1-4 2:0.1.12-13 userspace USB programming library
I am developing a program that uses libusb-1.0 on a FC14 x64 system. I solved the compile and link issues, but I now have a problem with user privileges when I try to get device handles. The problem appears to be in the mounting of the usbfs. Is the an accepted fix to giving users read/write privileges for all usb devices?
View 4 Replies View RelatedSynaptic 0.62.5. When uninstalling libusb-0.1-4, it removes many other unassociated applications (like gnome-desktop, evolution, the kernel in the /boot directory... not nice. See below with a simulated apt-get remove libusb-0.1-4.
Linux hpmaindesktop 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 02:39:34 UTC 2010 x86_64 GNU/Linux
The following packages were automatically installed and are no longer required:
The following packages will be REMOVED:
I guess I should have checked this before removing for real as it blew away my desktop, boot kernel, etc. Time now to re-install packages.
[IMG]file:///tmp/moz-screenshot.png[/IMG][IMG]file:///tmp/moz-screenshot-1.png[/IMG]
I am tired, and I simply can't find an easy answer.So, today I need the scanner in slackware64 13.1, only to find that it does not work as user. I have an HP Deskjet F2180 and using CUPS it is identified as hp:/usb/Deskjet_F2100_series?serial=CN81H4S2SP04TK.In the past the simple solution was to add oneself to the right groups, but it does not work this time.As user I get:
Code:
bash-4.1$ sane-find-scanner
...
[code]...
Can someone recommend a good c++ tutorial? I'm not a n00b but i'd prefer something that is directed toward people who have absolutely no experience with coding. code...
View 1 Replies View RelatedI've been using this scanner on various suse builds all the way back to version 8. This week I installed OpenSuse on a brand new computer and when I run xsane, I receive these messages.
[Code]....
The scanner will scan for a few seconds and then the entire system freezes up.
Hello,
this error spams about 100 times, then the scanner does indeed work. So I'm not completely broken, but the error messages are of concern, and it slows down the process of scanning for the time it takes to do the messages.
Error in console:
libusb couldn't open USB device /dev/bus/usb/001/001: Permission denied. libusb requires write access to USB device nodes.
my sript runs:
scanimage
--device $MODEL
--resolution=$RESOLUTION
-x 5104 -y 6840
my groups:
uid=1000(fogie) gid=100(users) groups=100(users),7(lp),11(floppy),12(mail),15(man),17(audio),18(video),19(cdrom),20(games),21(sloca te),83(plugdev),84(power),86(netdev),93(scanner)
Even a simple:
scanimage -Lv
in console gives this on a separate --current pc as well.
I installed KDE and tried to find some help/tutorial but I got following message. "There is no documentation available for /kdevelop/index.html."
View 1 Replies View Relatedany tutorial which helps in boosting system speed by recompiling the kernel
View 9 Replies View Related