libusb | Access USB devices from Ruby via libusb-1.x
kandi X-RAY | libusb Summary
kandi X-RAY | libusb Summary
Access USB devices from Ruby via libusb-1.x
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Register a hotplug event
- Perform a transfer control transfer
- Perform a bulk transfer .
- Sets log option .
- Registers a list of file descriptors .
- Send a message to the server
- Open the device
- Read an IO object .
- gets the buffer from the buffer
- Performs a bulk transfer .
libusb Key Features
libusb Examples and Code Snippets
Community Discussions
Trending Discussions on libusb
QUESTION
I am trying to start using libusb for communication via COM port ( EDIT: for my Rs232 device), on windows 10 x64 only. My IDE is Code:blocks. I have a couple of questions:
I downloaded libusb from their website (latest windows binaries)
But I noticed there is a libusb-win32 ''version'' of it in sourceforge. It says
"libusb-win32 is a port of libusb-0.1 under Windows"
- What does this mean, and should I use the "latest windows binaries" version or the "libusb-win32" version?
Also, the Readme file from their website (the 'libusb windows binaries' one) has instructions for compiling in Visual Studio and Mingw and there are files for Visual studio and Mingw only.
- Does this means I cannot compile the libusb it in GNU GCC compiler?
EDIT: the question 2) is already answered here: https://stackoverflow.com/a/38252750/13294095
...ANSWER
Answered 2021-Jun-10 at 14:03"I am trying to start using libusb for communication via COM port ( EDIT: for my Rs232 device), on windows 10 x64 only"
If you have a device that when you plug it into your PC via a USB port, it instantiates a COM port, then that device does have a UART. The device must also have driver that upon connecting to the PC is installed, and results in establishing the serial port you can see in device manager (under ports) Read about USB serial driver for some background.
"I have a physical uart device after the Rs232, I my MCU. I use the Rs-232 to translate from UART to USB protocol. -Even though I do not know what "Virtual com port" is."
Your device may have a UART, but when you plug it into a PC via a USB port, a virtual serial port is created via a driver on the PC... "When the USB to serial adapter is connected to the computer via the USB port the driver on the computer creates a virtual COM port which shows up in Device Manager on Windows"... Read more here. (under Architecture)
In short, if when you plug your device into the PC, you can see a port that has been created in Device Manager, then all the work is done. Your application code can incorporate a C serial port library to open a port and send/receive serial messages, etc. However, if you are developing the device with the UART to work on a Windows PC via a USB port, then yes, you need to create a driver. Maybe then libUSB is for you.
QUESTION
I can't install Onboard-SDK on my raspberry PI. What I should do? I used instruction from and was blocked during use cmake ..: https://developer.dji.com/onboard-sdk/documentation/quickstart/development-environment.html
pi@raspberrypi:~/Onboard-SDK/build $ lsb_release -a
...ANSWER
Answered 2021-May-03 at 08:45The error message is pretty clear
Cannot Find FFMPEG
You can install it via sudo apt install ffmpeg libavcodec-dev libavformat-dev libavfilter-dev
QUESTION
For the third time I reinstalled Ubuntu 20.04 on a Windows 10 machine running VMWare whilst attempting to install GNU Radio Companion 3.8 with the PlutoSDR gr_iio blocks. Each time failed with a different error.
I am charting my most recent attempt below. Any help is greatly appreciated.
- Installed Ubuntu 20.04 on VMWare
- Updated Ubuntu
cp ./53-adi-plutosdr-usb.rules /etc/udev/rules.d/
sudo service udev restart
- checked the output of
dmesg
- Since I had no
~/.ssh/config
file I ranwget https://raw.githubusercontent.com/analogdevicesinc/plutosdr_scripts/master/ssh_config -O ~/.ssh/config
ssh plutosdr
to add to list of known hosts. I verified the IP and firmware version.sudo apt-get install libiio-utils
and verified I can talk to the device viaiio_info -n 192.168.2.1 | grep device
The following output was produced:
ANSWER
Answered 2021-Feb-28 at 00:29Accoding to the documentation, the gr-iio
project doesn't include the GNU Radio
project but expects you to build it in advance.
However, you only built libiio
and libad9361
, but not the GNU Radio
library from https://github.com/gnuradio/gnuradio. The config file gr-iio
is complaining about should be installed when installing GNU Radio
.
Regarding MPIR: While MPIR started as a fork of gmp you can't install gmp as a replacement for MPIR, as they use different names for their headers and libraries. Which is why MPIR is still not being found after you've installed the development packages for gmp. If ubuntu doesn't provide packages for MPIR you'll have to compile it from source.
QUESTION
I have LibNFC working from the Linux terminal recognising my ACR122U Reader, and I wanted to know if there was a method for it to work through Chrome on a Linux Desktop as it is really similar to Android Support, with all the NFC device handling done by libnfc and the browser just has to know about this library instead of every type usb or other device than can do NFC.
I have tried using the WebNFC API to connect it :
...ANSWER
Answered 2021-Feb-10 at 06:54Web NFC is supported on Android only as of February 2021. See https://web.dev/nfc/
The WebUSB error suggests you're requesting an interface that implements a protected class (among those below):
QUESTION
I am attempting to read information from a usb device after it is attached.
The information I require are accessed through two APIs: v4l2 and libusb. Both are used through a script that is correctly called as the v4l2 part executes are expected.
...ANSWER
Answered 2021-Feb-16 at 09:06The way to go seems to be systemd.
The systemd unit camera-index@.service
QUESTION
I have cloned electron-react-boilerplate
from GitHub, which comes with Electron 11.0.1:
ANSWER
Answered 2021-Jan-30 at 19:11Electron 11 has a newer version of V8 JS engine which the native module usb@1.6.3
with a version of the std library not set to std=c++14
thus that doesn't support what V8 now requires.
This is known issue and you can read about it at these PRs #376, #394, #400 and the fix has been merged today (January 30 2021) with this PR #407 and there is a new release on NPM usb@1.6.4
.
Now your steps are working for me on Ubuntu 20.04 and ElectronRebuild.js
runs with no errors after installing latest usb
module:
QUESTION
I followed the adacore tutorial on displaying scrolling text (https://blog.adacore.com/ada-for-microbit-part-1-getting-started) but can't get it working on my microbit.
Maybe my microbit is a more recent version that is not yet supported? The reason I suspect this is that my board id (9904) was not supported the first time I tried to flash to the board. I used the fix described here: Unable to get the Ada scrolling text demo working on the microbit on GNAT 2019 community edition and added the following line in board_ids.py:
...ANSWER
Answered 2021-Jan-23 at 14:12libusb is missing or not found on your computer. It is used to communicate with the Microbit board to upload/debug.
QUESTION
I'm trying to install and test my Coral Edge TPU. I'm following the instructions here: https://coral.ai/docs/accelerator/get-started/
The first step is to install drivers from the coral website, but I'm getting the following errors. I've tried running with and without admin, and uninstalling and installing again, but I get the same errors.
Has anyone else run into this issue? I'm on Windows 10.
...ANSWER
Answered 2021-Jan-18 at 17:04This is a bug in the coral software. According to this thread https://github.com/google-coral/edgetpu/issues/260 they messed up a few things in the newest version (at the time 2.5.0). Starting with a fresh virtual environment and using the release 2.1.0 and corresponding driver for Python 3.7 (3.8, 3.9 not supported as of 2.1.0) fixed the issue.
From that thread:
For now, I suggest rolling back to the older driver: https://dl.google.com/coral/edgetpu_api/edgetpu_runtime_20200728.zip
And you also need to remove your current tflite_runtime and downgrade it to an older version (make sure to change to the right python version):
pip3 install https://dl.google.com/coral/python/tflite_runtime-2.1.0.post1-cp36-cp36m-win_amd64.whl pip3 install https://dl.google.com/coral/python/tflite_runtime-2.1.0.post1-cp37-cp37m-win_amd64.whl Apologies, we are working to get this fixed ASAP
QUESTION
I have cross compiled libedgetpu for Raspi-0 and I can run a minimal C++ program. However it does not detect any TPU's. (The Coral TPU is connected via USB port to the Pi-0).
...ANSWER
Answered 2020-Dec-15 at 12:17I figured out the answer, it was pretty stupid, the library has to be built as a shared library:
QUESTION
I am running the latest version of Raspbian on the Raspberry Pi with Python 2.7 and 3.7 installed. For a project, I need to implement some spatial/binaural audio file playback capabilities in Python, and Pyglet (version 1.5.6) (https://pypi.org/project/pyglet/, https://github.com/pyglet/pyglet) seems to be the simplest option with least dependencies. However, I am not being able to hear audio output through the headphones. Here's what I did:
- Installed pyglet dependencies:
sudo apt-get install ffmpeg libopenal1 libopenal-dev python3-pil.imagetk python3-pil python3-matplotlib python3-scipy gstreamer1.0-alsa gstreamer1.0-python3-plugin-loader
(From previous programs, the system also hadcmake, python3-opencv libopencv-dev libusb-1.0-0-dev, libboost-program-options-dev
andpython3-numpy
installed) - I then installed pyglet as per given in the guide:
sudo pip3 install --upgrade pyglet
. The installation proceeded without any errors. - I know that by default often, Raspberry Pi spits audio out through the HDMI port instead of A/V port. So I went to raspi-config using
sudo raspi-config
, went to Advanced Options -> Audio. Selected the proper option (in my case1 Headphones
). I checked if audio was playing fine through my headphones by playing couple of youtube videos and audio files on the Raspberry Pi itself. - I then checked if pyglet was working by importing pyglet with
import pyglet
in a python shell, it worked fine without any warnings or errors. - I launched the example program provided here: https://github.com/pyglet/pyglet/tree/master/examples/soundspace. To do so, I downloaded the repo https://github.com/pyglet/pyglet and moved to the proper directory (via
cd
command) and wrote:sudo python3 soundspace.py
. For a brief overview, the program contains 4 instruments that can be dragged across the room with a mouse. In doing so, the audio that you hear from each instrument changes depending on position and orientation of those instruments as well as your virtual position inside the mini game. The program executes without any error being shown in the terminal, but I don't hear any sound. When I try to move the objects, the program freezes but no error is shown in the terminal. - Since I was least bothered about the complex program, I went ahead to create my own simple program that will play a wav file (sourced from the Pyglet's developer repo itself before anyone says the wav file is incompatible https://github.com/pyglet/pyglet/tree/master/examples/soundspace), reference from: https://pyglet.readthedocs.io/en/latest/programming_guide/media.html . Here's the code snippet:
ANSWER
Answered 2020-Jun-21 at 08:35https://github.com/NicklasTegner/PyAL Since I was out of time. I tried experimenting with other OpenAL Python libraries and this one works fine.
Edit: The actual problem was not with Pyglet but with PulseAudio, which clashes with ALSA. I solved the problem by connecting an external USB audio card and audio was working properly (with HRTFs and all).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install libusb
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page