Unable to claim USB interface (Device or resource busy) Stuck - usb

I am trying to use the ACR122U reader. I installed everything, however when I use nfc-list or any other command I get :
me#me:~$ nfc-list
nfc-list uses libnfc 1.7.1
error libnfc.driver.acr122_usb Unable to claim USB interface (Device or resource busy)
nfc-list: ERROR: Unable to open NFC device: acr122_usb:003:004
I searched and find several posts about the same problem such as:
Unable to claim USB interface (Device or resource busy)
but their solution does not work for me. I have blacklisted pn533 and nfc in
$ sudo nano /etc/modprobe.d/blacklist-libnfc.conf
however when I try to disable the kernel modules I get:
me#me:~$ modprobe -r pn533 nfc
modprobe: FATAL: Module pn533 is in use.
me#me:~$ modprobe -rf pn533 nfc
modprobe: FATAL: Module pn533 is in use.
Is there any way to solve this problem?

I have managed to solve this issue by adding blacklist pn533_usb to:
/etc/modprobe.d/blacklist-libnfc.conf
so its content is:
blacklist nfc
blacklist pn533
blacklist pn533_usb
then run sudo modprobe -rf pn533_usb

Related

WebUSB: can't open device

I am trying to open a device through WebUSB on Chromium but device.open fails with DOMException: Access denied..
Looking at chrome://device-log, this errors seems to come from chrome being denied file access by the OS:
[17:53:21] USB device added: path=/dev/bus/usb/001/012 vendor=1204 "Cypress Semiconductor", product=62002 "USBUART", serial="610002091C052E84", guid=a653ca6a-9fb4-4d35-bf4b-4b4fb13c927c
[17:53:36] Failed to open /dev/bus/usb/001/012: Operation not permitted (1)
That is weird because I configured a udev rule to specifically not have that, and Chromium is ran by me who is part of the plugdev group:
nino#dell$ whoami
nino
nino#dell$ groups nino
nino : nino adm dialout cdrom sudo dip plugdev lpadmin lxd sambashare docker signald
nino#dell$ ps -u nino | grep chrome
<pid> ? 00:00:28 chrome
<some similar lines>
nino#dell$ cat /etc/udev/rules.d/50-cybres.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", MODE="777", GROUP="plugdev"
Is it a bug or am I doing something wrong?
This answer says that even with the right permissions, Chrome might not be able to open the device because it is claimed by another process, but I do not know how I could go about checking who claimed the interface.

Is it possible to use the nmcli in WSL and create a wifi hotspot?

I am trying to setup a wifihotpot on my laptop in ubuntu 18 running as a Windows Subsystem for Linux (WSL). (Terminal only)
Following basic tutorials I wanted to run the following command:
~$ nmcli device wifi hotspot con-name my-hotspot ssid my-hotspot band bg password 123456
Error: Could not create NMClient object: Could not connect: No such file or directory.
Trying to start the networkmanager also fails:
~$ sudo service network-manager start
* Starting network connection manager NetworkManager [ OK ]
~$ sudo service network-manager status
* NetworkManager is not running
I tried the networkManager after installing network-manager:
sudo add-apt-repository ppa:nilarimogard/webupd8
Is there another way to create a wifi hotspot from Ubuntu running as a WSL? Or does it not have the right access to the windows host to pull it off?
at this time, I don't believe it is possible according to https://github.com/microsoft/WSL/issues/2438. They designed WSL to ignore calls to set interface properties. So nmcli and other commands that changes interface properties are not working, they marked it as a bug and will fix it in the future.
"WSL currently ignores the call (which was intentional at the time of the design) to set interface properties" - sunilmut
I hope to help in some way :)

Unable to connect beagle bone black by ssh

I wanted to install pip onto beagle bone black,and I tried this:
/usr/bin/ntpdate -b -s -u pool.ntp.org
opkg update && opkg install python-pip python-setuptools
then, it threw errors,but Unfortunately, I didn't log that errors.
this is the error:
Collected errors:
* parse_from_stream_nomalloc: Excessively long line at 6. Corrupt file?
it was occurred a week ago and was't solved yet.
I wanted to solve it now and I tried connect by ssh,but I failed.
When I ping to beagle bone, it responds, and Cloud9 IDE is working too but not ssh.
I don't think this is serious problem since I can connect to beagle bone by other methods: Cloud9 or so.
However, to use python on beagle bone, I need to connect by ssh.
Before trying to update and install python-pip, I could connect by ssh.
Do you have any ideas to solve this connection problem?
Reference:
Setting up IO Python Library on BeagleBone Black
View Full Version : [VU+ Duo] Error installing ipk on Vu+ Duo
note
I use default OS: Angstrom
I don't use SD card.
HOST PC is mac, OS.X 10.9
I checked this but this wasn't helpful
Cannot connect to beagle bone black
I could connect by GateOne SSH client, but still unable to connect from terminal.
(Question answered in the comments and in question edits. See Question with no answers, but issue solved in the comments (or extended in chat) )
The OP wrote:
I solved this problem by succeeding update opkg, so I will write the details:
First, remove beaglbone file
rm /var/lib/opkg/lists/beaglebone
and,remove lists folder
rmdir /var/lib/opkg/lists
then, set current time on beagle
/usr/bin/ntpdate -b -s -u pool.ntp.org
afterwards, update and upgrade opkg:
opkg update and opkg upgrade
now you can use opkg !

dotcloud push on cygwin fails with "rsync error: unexplained error (code 255)" (similar with git and hg)

Though I have followed the usual steps for using the dotCloud CLI under Cygwin, dotcloud push fails in all cases: --rsync, --hg, and --git.
I am on Windows 8 and Cygwin.
How can I push successfully?
Sample output:
me#host /cygdrive/d/project
$ dotcloud push --rsync
==> Pushing code with rsync from "./" to application myapp
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at /home/lapo/package/rsync-3.0.9-1/src/rsync-3.0.9/io.c(605) [sender=3.0.9]
me#host /cygdrive/d/project
$ dotcloud push --git
Permission denied (publickey,password).r from "./" to application myapp
fatal: The remote end hung up unexpectedly
me#host /cygdrive/d/project
$ dotcloud push --hg
==> Pushing code with mercurial from "./" to application myapp
abort: no suitable response from remote hg!
Error: Mercurial returned a fatal error
You may be running into a bug in Cygwin's group permissions. Vineet Gupta gives a workaround in his blog. The problem comes from the very strict permissions expected by ssh around the keys, and the solution is to set the permission on the ssh key properly (to 600, rw by owner only). Cygwin seems to need the group to be added manually.
Updating the steps to get the dotCloud CLI installed, including setting the permissions, leads to:
Start the Cygwin Setup.
Select default choices until you reach the package selection dialog.
Enable the following packages:
net/openssh
net/rsync
devel/git
devel/mercurial
python/python (make sure it’s at least 2.6!)
web/wget
After the installation, you should have a Cygwin icon on your desktop. Start it: you will get a command-line shell.
Download easy_install
wget http://peak.telecommunity.com/dist/ez_setup.py
Install easy_install
python ez_setup.py
You now have easy_install; let’s use it to install pip:
easy_install pip
Now install dotcloud (the CLI)
pip install dotcloud
Set up the CLI with your credentials. This will also download the ssh key.
dotcloud setup
New Step Update the permissions on your dotCloud key:
chgrp Users ~/.dotcloud_cli/dotcloud.key
chmod 600 ~/.dotcloud_cli/dotcloud.key
Now you should be able to dotcloud push
If you have multiple dotCloud accounts, then you will need to repeat this process for each account, since each account has its own key. Also note that you shouldn't have to set these permissions manually, but it seems like the group ownership is sometimes the wrong default in Cygwin. Linux and OSX don't seem to show this problem, though the permissions must be 600 for all OSes, so it is worth checking.

Programmatically remounting usb hubs after boot ubuntu 10.04

I'm running ubuntu 10.04 and kernal 2.6.32-28-server.
There are 4 usb hubs connected to the server with 4 usb ports each. On boot only two or three of them get mounted. If I plug them in after boot then all are mounted just fine. On a different server with a more powerful power supply the usb hubs mount just fine on boot so this makes me think that there isn't enough power getting to the hubs on boot. I don't have the luxury of being able to replug them in every time so I have to figure out a way to get the usb hubs remounted programmatically sometime after boot.
So far I have tried other suggestions like.
Removing and reloading usb_storage:
sudo modprobe -w -r usb_storage; sudo modprobe usb_storage
I've also tried:
sudo modprobe -vr ehci_hcd
sudo modprobe -v ehci_hcd
But this just results in:
FATAL: Module ehci_hcd is builtin
Getting really desperate I copied some of the files in /sys/devices after successfully mounting by plugging the hubs in after boot into a separate folder. After rebooting the system I tried to copy those files back into /sys/devices but even as root I couldn't copy them.