HID Smart Card Reader Linux Raspberry Pi - linux

I am using raspberry Pi . I have installed libusb then PSCD lite after that i have installed drivers for HID Smart Card Reader 5021 CL i am getting this error. Any idea i think that error is due to the reason of some permissions as i am using the user pi and owners of these directory is root . I am new to linux and the directory and file is there on the path shown below
pi#raspberrypi ~/pcsc-tools $ sudo pcscd -f
00000000 dyn_unix.c:60:DYN_LoadLibrary() /usr/local/lib/pcsc/drivers/ifdokccid_linux_i686-v4.1.8.bundle/Contents/Linux/ifdokccid.so: /usr/local/lib/pcsc/drivers/ifdokccid_linux_i686-v4.1.8.bundle/Contents/Linux/ifdokccid.so: cannot open shared object file: No such file or directory
00001913 readerfactory.c:1019:RFInitializeReader() RFLoadReader failed: 0x80100014
00000172 readerfactory.c:335:RFAddReader() OMNIKEY CardMan (076B:5340) 5021 CL (OKCM0030812141011235703916649119) init failed.

Your drivers are for PC (architecture i686) you need drivers for ARM (probably armhf architecture).
AFAIK drivers for ARM are not available from HID.

Related

Dummy Soundcard for Amazon linux server

I need to use an application which needs a soundcard in an amazon ec2 instance with the default ubuntu 16.04 installed on it. Problem is that there's no soundcard available. I've tried everything on google on how to create a dummy soundcard so the program runs with no problem, but nothing helped because it was outdated. This is what lspcireturns:
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)
lsmod | grep snd does not return ANYTHING which makes me think that I might me missing all modules, and not just snd-dummy.
I've been trying to setup a dummy by using the command sudo modprobe snd-dummy which returns the following error:
modprobe: FATAL: Module snd-dummy not found in directory /lib/modules/4.4.0-1013-aws
Any clues?
If anyone still has the same issue:
You are probably using an AMI that comes with a kernel compiled without the snd-dummy module. The ALSA wiki suggests building this module from source (alsa-driver) but this is out of date.
I was able to run an application that needs a soundcard on EC2 by installing pulseaudio
sudo apt install pulseaudio
pulseaudio --start
After which I get:
$ aplay test.wav
Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 22257 Hz, Mono
And the soundcard-needing application runs normally. If this is not enough for you, you might need to enable the default sink:
pactl load-module module-null-sink sink_name=auto_null
pactl set-default-sink auto_null
More details here Linux application fails with "Invalid CTL" and "Unknown PCM"

updating product/vendor id on Raspberry Pi (CP210X)

Running "uname -a" on my Raspberry Pi will yield the following:
Linux tm-gw 4.4.14-v7+ #896 SMP Sat Jul 2 15:09:43 BST 2016 armv7l GNU/Linux
My problem is that I have a USB device which vendor and product ID isn't registered in CP210x.c file, which - again - means that even though it can be found, the raspberry will not allow communication with it (/dev/ttyUSB0 doesn't exist).
I have tried to download the kernel, add the ID pair to the cp210x.c file, rebuild and install, which works. (dmesg will show "usb 1-1.4: cp210x converter now attached to ttyUSB0")
Since I have to install this program on more than one raspberry it takes too long, so I'd like to know if it is possible to inject the usb ID's without recompiling the kernel ??
I did try to take the cp210x.ko file from the kernel I build and install it to a new raspberry by typing "sudo insmod cp210x.ko" but that didn' work.
/Karsten
Thanks to Ian Abbott for the solution.
Run "sudo modprobe cp210x"
then
sudo sh -c 'echo 10c4 84cc > /sys/bus/usb-serial/drivers/cp210x/new_id'
When plugging in the device it works :-)

Enable Bluetooth Adapter for BeagleBone Black

I recently bought a USB 2.0 Bluetooth Adapter. It claims to have support from Linux kernels of versions 3.4 and higher. I have a BeagleBone Black with Debian GNU/Linux 7 image and kernel 3.8. I am developing on BeagleBone Black by hosting it through USB with ssh.
I have tried both hot plugging and plugging in before boot and failed.
Then, I tried this tutorial. However, I cannot find the connman directory on my BeagleBone Black device. I looked up and assumed I needed to install the connman package, but my BeagleBone Black has no internet access.
I have also tried lsusb -v, as suggested by an answer of a similar question to this, with no luck. The weird thing is, while lsusb itself prints
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lsusb -v only prints
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
then hangs. Information regarding bus 002, which I believe the device is connected to, is not printed. I have to restart the ssh connection to get back to work.
How should I approach to get the dongle to work on my BeagleBone Black? If the connman package is sufficient, how do I install it on my BeagleBone Black without internet access. Why does lsusb -v hang?
Any help is appreciated!
UPDATE:
The actual problem turned out to be that my BeagleBone Black is flawed/damaged. I plugged the Bluetooth Adapter into a plain new BeagleBone Black before powering it, and the Bluetooth Adapter is recognized! Not only does lsusb prints out the adapter info, but also lsusb -v does not hang at all. The overall performance of the new board (boot time, compilation time, execution time) is also several times better. I suspect that it was due to the various improper power-off.
In case anyone is just as careless, the BeagleBone Black SHALL be powered off by:
Holding down the power button for about 8 seconds then releasing it.
Using halt or shutdown -h now command in the Userspace.
I have possible 4 solutions for you:
1) download the connman package and save it to a usb flashdrive. Connect the flashdrive to the beaglebone and install the package using the following command: dpkg -i {.deb package}.
2) download the connman package on your desktop computer and ssh into your beaglebone. once you ssh in you could copy the file trough ssh using scp. Note the syntax $ scp your_username#remotehost.edu:foobar.txt /some/local/directory. Then install the connman package using dpkg -i {.deb package}.
3) share your desktop computers internet connection with the beaglebone and ssh into the beaglebone. Download the package directly using apt-get or wget whatever tool you prefer.
4) connect your beaglebone to your router using rj-45 cable. Maybe this is not your preferred solution but it's easy and after port forwarding you will have access to your beaglebone from anywhere.
Hope this helps and note that I never used a bluetooth adapter with a BBB. I'm just giving generic instructions on your general problem.

load routerOS Drivers from USB drive in linux

I'm trying to install routerOS(Mikrotik) from bootable USB drive on my PC.
it boots from USB at first and loads the Linux Kernel.
after detecting the H.D.D it requests me to insert the CD-ROM disk to installing the DRIVERS.
but the drivers are in the USB flash.
i opened the syslinux.cfg and isolinux.cfg files:
default system
label system
kernel linux
append load_ramdisk=1 initrd=initrd.rgz root=/dev/ram0
i'm thinking that the problem is here. it requests to load from CD-ROM.
how can i tell it to load the drivers from USB Flash?
** i've not worked with Linux.
In RouterOS you have 2 method of X86 installs.
CD-ROM ( not USB )
NetInstall
If your BIOS supports net boot and you have a Windows to run NetInstall, try with Mikoritk NetInstall

Can`t find ttyUSB[id]

I have just started with my Raspberry Pi and I have a project where I want to read data from the USB port. I have installed Java JDK8 and written the program that compiles and run. But I get the message that /dev/ttyUSB1 does not exist.
I just have a cable from the USB port on the Arduino going to the USB port on the RPi and I am using Raspbian Debian Wheezy
When I go to DIR /dev/ and use $ ls, I can only find tty0 up to tty63. I have searched on the internet and some say that you can use ttyAMA0, but this does not work. I have also searched for the same problem, but have not found a answer to my problem.
I have used $ lsusb which gave me 4 devices (001-004) on Bus 001. I can see that, for example, my USB keyboard is listed as Bus 001 Device 004: ID 1532:010b Razer USA, Ltd.
and if I run $ dmesg | grep Manufacturer I get that:
[xxxxxxxxx] usb 1-1.2: Manufacturer: Razer
So my question is why does my usb devices not get listed as ttyUSB[id]? Do I have to manually attach it?
I am a bit noob when it comes to Linux.
Hope someone can help me!
I have some bad news for you. The reason you have no /dev/ttyUSB[n] devices on the RPi (when you connect your Arduino) is because you need the Arduino drivers (FTDI drivers in particular). The unfortunate thing is that these drivers don't yet exist for the Arm platform (which includes the RPi). This is according to the FTDI web page showing support. Note the lack of Linux driver support for Arm.
Apparently on Arm running Linux the only way to program the Arduino is via the serial port interface directly via the GPIO pins. Information on doing this can be found here . You will also have to do something similar on the Arduino side see this information.
Once you have the two devices connected via straight serial then your going to probably run into another SNAFU. By default apparently on the RPi Linux will use the serial port for sending debug/console output. In order to use the serial interface for something that behavior has to be modified. This article discusses that. In particular disabling the kernel from using the serial port for terminal use this would seem to apply:
The following steps (based on a clean 2012-07-15-wheezy-raspbian install
Open a terminal on the Raspberry, or connect to Raspberry Pi through SSH.
Make a backup of the /boot/cmdline.txt file.
sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt
Edit /boot/cmdline.txt file:
sudo vi /boot/cmdline.txt
This file contains:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 $
Remove the parameters that reference the UART serial port (ttyAMA0):
dwc_otg.lpm_enable=0 console=tty1 $
Comment next line in /etc/inittab:
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Reboot Raspberry Pi
sudo reboot
If you use a different Linux distro than Debian it would be different but the basics would still apply (modifying the kernel command line)

Resources