USB HID failing to install on Rasp Pi wheezy since upgrade - usb

I recently updated my raspberry pi which runs my home heating system via a USB relay. Since then the machine halts on boot whilst trying to install this USB device, stopping at the Manufacturer message and not showing the timeout until I unplug it.
Here is my output from /var/log/messages
Jun 2 21:25:42 raspberrypi kernel: [ 297.841335] usb 1-1.2: new full-speed USB device number 6 using dwc_otg
Jun 2 21:25:42 raspberrypi kernel: [ 297.947754] usb 1-1.2: New USB device found, idVendor=12bf, idProduct=ff03
Jun 2 21:25:42 raspberrypi kernel: [ 297.947878] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jun 2 21:25:42 raspberrypi kernel: [ 297.947969] usb 1-1.2: Product: Flowcode USB HID
Jun 2 21:25:42 raspberrypi kernel: [ 297.948055] usb 1-1.2: Manufacturer: Matrix Multimedia Ltd.
Jun 2 21:25:52 raspberrypi kernel: [ 307.970899] hid-generic 0003:12BF:FF03.0004: timeout initializing reports
Jun 2 21:25:52 raspberrypi kernel: [ 307.973809] hid-generic 0003:12BF:FF03.0004: hiddev0,hidraw0: USB HID v1.10 Device [Matrix Multimedia Ltd. Flowcode USB HID] on usb-bcm2708_usb-1.2/input0
Jun 2 21:25:56 raspberrypi kernel: [ 311.944883] usb 1-1.2: USB disconnect, device number 6
Jun 2 21:28:06 raspberrypi kernel: [ 441.223708] usb 1-1.2: new full-speed USB device number 7 using dwc_otg
Jun 2 21:28:06 raspberrypi kernel: [ 441.329935] usb 1-1.2: New USB device found, idVendor=12bf, idProduct=ff03
Jun 2 21:28:06 raspberrypi kernel: [ 441.330109] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jun 2 21:28:06 raspberrypi kernel: [ 441.330226] usb 1-1.2: Product: Flowcode USB HID
Jun 2 21:28:06 raspberrypi kernel: [ 441.330282] usb 1-1.2: Manufacturer: Matrix Multimedia Ltd.
Jun 2 21:28:16 raspberrypi kernel: [ 451.383446] hid-generic 0003:12BF:FF03.0005: timeout initializing reports
Jun 2 21:28:16 raspberrypi kernel: [ 451.386313] hid-generic 0003:12BF:FF03.0005: hiddev0,hidraw0: USB HID v1.10 Device [Matrix Multimedia Ltd. Flowcode USB HID] on usb-bcm2708_usb-1.2/input0
Appreciate any pointers on how to fix this, as it was working prior to the apt-get upgrade.
Note that everything works if I wait until the login prompt before adding the USB device. Although, not at all ideal!
Thanks

Related

unbinded USB device get automatically bind on linux

I tried to use echo -n '2-2' > /sys/bus/usb/drivers/usb/unbind to unbind a USB device that connects to FTDI chip, but I found that it get auto binded right after I run the command.
My lsusb -t looks like:
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 2: Dev 6, If 0, Class=Vendor Specific Class, Driver=usbfs, 5000M
|__ Port 2: Dev 6, If 1, Class=Vendor Specific Class, Driver=usbfs, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
My lsusb looks like:
Bus 002 Device 006: ID 0403:**** Future Technology Devices International, Ltd
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ls /sys/bus/usb/devices has:
1-0:1.0 2-0:1.0 2-2 2-2:1.0 2-2:1.1 usb1 usb2
After I run sudo bash -c 'echo "2-2" > unbind', my dmesg outputs following new messages
[Jan15 11:03] usb 2-2: USB disconnect, device number 3
[ +0.272120] usb 2-2: new SuperSpeed USB device number 4 using xhci_hcd
[ +0.020880] usb 2-2: New USB device found, idVendor=0403, idProduct=***
[ +0.000006] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0.000003] usb 2-2: Product: FTDI **********
[ +0.000003] usb 2-2: Manufacturer: FTDI
[ +0.000002] usb 2-2: SerialNumber: 000000000001
You can see that USB is disconnected, but then new USB is found and get assigned a new device number. It feels like my USB device is rebinded instead of unbind. Does anyone know the reason?
Thanks!
More information:
I tried run echo -n usb2 > /sys/bus/usb/drivers/usb/unbind to unbind bus 2, it works and dmesg shows:
[Jan15 12:33] usb 2-2: USB disconnect, device number 8
My ls /sys/bus/usb/devices changed to:
1-0:1.0 usb1 usb2
which I feel incorrect. From my understand 2-0:1.0 should alaways be there?
Then I tried to add bus2 back by echo -n usb2 > /sys/bus/usb/drivers/usb/bind, I got error in dmesg
[Jan15 12:48] usb usb2: can't set config #1, error -22

STM UART over USB

I have some device connected via USB to Raspberry Pi 3 with Raspbian installed.
I have protocol specification, it is simple serial protocol with hex commands and data.
However I have no idea, where to find drivers...
In lsusb I see:
Bus 001 Device 006: ID 0483:5740 STMicroelectronics STM32F407
But here is nothing about UART<->USB drivers...
pi#raspberrypi:~ $ ls -la /dev/ | grep ttyS have no results also.
What about ls -l /dev/ttyACM* ? Those are the nodes created for standard USB CDC ACM devices.

problem with testpmd on dpdk and ovs in ubuntu 18.04

i have a X520-SR2 10G Network Card, i gonna use that to create 2 virtual interfaces with OpenvSwitch that compiled with dpdk (installed from repository of ubuntu 18.04) and test this virtual interfaces with testpmd, i do following jobs :
Create Bridge
$ ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev
bind dpdk ports
$ ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk options:dpdk-devargs=0000:01:00.0 ofport_request=1
$ ovs-vsctl add-port br0 dpdk1 -- set Interface dpdk1 type=dpdk options:dpdk-devargs=0000:01:00.1 ofport_request=2
create dpdkvhostuser ports
$ ovs-vsctl add-port br0 dpdkvhostuser0 -- set Interface dpdkvhostuser0 type=dpdkvhostuser ofport_request=3
$ ovs-vsctl add-port br0 dpdkvhostuser1 -- set Interface dpdkvhostuser1 type=dpdkvhostuser ofport_request=4
define flow directions
# clear all directions
$ ovs-ofctl del-flows br0
Add new flow directions
$ ovs-ofctl add-flow br0 in_port=3,dl_type=0x800,idle_timeout=0,action=output:4
$ ovs-ofctl add-flow br0 in_port=4,dl_type=0x800,idle_timeout=0,action=output:3
Dump flow directions
$ ovs-ofctl dump-flows br0
cookie=0x0, duration=851.504s, table=0, n_packets=0, n_bytes=0, ip,in_port=dpdkvhostuser0 actions=output:dpdkvhostuser1
cookie=0x0, duration=851.500s, table=0, n_packets=0, n_bytes=0, ip,in_port=dpdkvhostuser1 actions=output:dpdkvhostuser0
now i run testpmd:
$ testpmd -c 0x3 -n 4 --socket-mem 512,512 --proc-type auto --file-prefix testpmd --no-pci --vdev=virtio_user0,path=/var/run/openvswitch/dpdkvhostuser0 --vdev=virtio_user1,path=/var/run/openvswitch/dpdkvhostuser1 -- --burst=64 -i --txqflags=0xf00 --disable-hw-vlan
EAL: Detected 32 lcore(s)
EAL: Auto-detected process type: PRIMARY
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
Interactive-mode selected
Warning: NUMA should be configured manually by using --port-numa-config and --ring-numa-config parameters along with --numa.
USER1: create a new mbuf pool <mbuf_pool_socket_0>: n=155456, size=2176, socket=0
USER1: create a new mbuf pool <mbuf_pool_socket_1>: n=155456, size=2176, socket=1
Configuring Port 0 (socket 0)
Port 0: DA:17:DC:5E:B0:6F
Configuring Port 1 (socket 0)
Port 1: 3A:74:CF:43:1C:85
Checking link statuses...
Done
testpmd> start tx_first
io packet forwarding - ports=2 - cores=1 - streams=2 - NUMA support enabled, MP over anonymous pages disabled
Logical Core 1 (socket 0) forwards packets on 2 streams:
RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01
RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
io packet forwarding packets/burst=64
nb forwarding cores=1 - nb forwarding ports=2
port 0:
CRC stripping enabled
RX queues=1 - RX desc=128 - RX free threshold=0
RX threshold registers: pthresh=0 hthresh=0 wthresh=0
TX queues=1 - TX desc=512 - TX free threshold=0
TX threshold registers: pthresh=0 hthresh=0 wthresh=0
TX RS bit threshold=0 - TXQ flags=0xf00
port 1:
CRC stripping enabled
RX queues=1 - RX desc=128 - RX free threshold=0
RX threshold registers: pthresh=0 hthresh=0 wthresh=0
TX queues=1 - TX desc=512 - TX free threshold=0
TX threshold registers: pthresh=0 hthresh=0 wthresh=0
TX RS bit threshold=0 - TXQ flags=0xf00
testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
---------------------- Forward statistics for port 0 ----------------------
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 64 TX-dropped: 0 TX-total: 64
----------------------------------------------------------------------------
---------------------- Forward statistics for port 1 ----------------------
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 64 TX-dropped: 0 TX-total: 64
----------------------------------------------------------------------------
+++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 128 TX-dropped: 0 TX-total: 128
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Done.
testpmd>
version of softwares:
OS: Ubuntu 18.04
Linux Kernel: 4.15
OVS: 2.9
DPDK: 17.11.3
what should i do now ??
where is the problem from?
finally catch the problem , The problem is size of socket memory allocation, i change --socket-mem value to 1024,1024 (1024M for each numa node) and create packets with pktgen (as same using --socket-mem 1024,1024).Everything works fine.

UbuntuServer 16.04 VirtualBox Machine - Emergency Mode for Network Interfaces

I'm using a virtual machine with Ubuntu16.04Server O.S. on a Windows host.
Everything was working perfectly but after switching off everything and then coming back to my virtual server, the machine doesn't start.
It shows:
[FAILED] Failed to start Raise network interfaces. See 'systemctl status networking.service' for details.
So the system goes in Emergency mode!
By typing journalctl -xb, I can see the following issue:
...
ifup[1987]: Cannot find device "ens33"
...
ifup[1987]: Failed to bring up ens33.
systemd[1]: netowrking.service: Main process exited, code=exited ....
So I find my failed to start Raise network interfaces
Subject: Unit networking.service has failed
Defined-By: systemd
By typing ifconfig I see only the lo interface. No ens33 is shown.
In my /etc/network/interfaces I have also the 2 rows:
auto ens33
iface ens33 inet dhcp
By typing lshw I have the following output related to the network:
*-network DISABLED
description: Ethernet interfaces
product: 82540EM Gigabit Ethernet Controller
vendor: Intel Corporation
physical id: 3
bus info: pci#0000:00:03.0
logical name: enp0s3
...
...
configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.21-k8-NAPI duplex=full.......
So if I run ifup ens33 I have the error
Cannot find device ens33
Error getting hardware address for "ens33": No such device
The virtual machine has the default ethernet card Intel PRO/1000 MT Desktop (82540EM) connected as NAT.
It is completly stuck and I can't go forward, only emergency mode.
Finally found a solution:
The issue should seems to be related to a mismatch of the ethernet card, and my solution was:
changing card on the virtual machine
entering in emergency mode
Editing the /etc/network/interfaces file, by changing the ens33 interface parameters and adding the new eth0 interface:
auto ens33
iface ens33 inet manual
auto eth0
iface eth' inet dhcp
At this point by restarting the network service I could see the interface up.
After it was necessary the editing of the /etc/default/grub file, changing the line from
GRUB_CMDLINE_LINUX=""
to
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
Then I ran following commands:
sudo update-grub
sudo reboot

How to authenticate ldap user and login on server as GUI ,it should login on server directly via GUI

I am new to System admin My problem is : In my department there are 30 students in 1st year and 30 students in 2nd year which are divided into two groups lets say group1 and group2 which need to login as ldap user via Ubuntu(14.04) GUI through any System connected to LAN.Every users home directory should be created on server side ,It should mount while login as GUI in ubuntu14.04, No other user should access anyone else home directory except by self.
[I don't want authenticating user to ldap-server and creating home directory on local machine ,instead I want central directory on server side,It should looks like login to server.]
Server Side : Ubuntu 14.04
I tried this and it works fine for me.
Client side : Ubuntu14.04
I tried this , it also works
but the issue is , this tutorial creates home directory on local machine instead of mounting server directory.I know from where it does.
I want : If i login through ldap user It should login on server via GUI not on local machine home directory.
on client side file "/var/log/auth.log"
Jul 28 11:53:06 issc systemd-logind[674]: System is rebooting.
Jul 28 11:53:23 issc systemd-logind[650]: New seat seat0.
Jul 28 11:53:23 issc systemd-logind[650]: Watching system buttons on /dev/input/event1 (Power Button)
Jul 28 11:53:23 issc systemd-logind[650]: Watching system buttons on /dev/input/event4 (Video Bus)
Jul 28 11:53:23 issc systemd-logind[650]: Watching system buttons on /dev/input/event0 (Power Button)
Jul 28 11:53:24 issc sshd[833]: Server listening on 0.0.0.0 port 22.
Jul 28 11:53:24 issc sshd[833]: Server listening on :: port 22.
Jul 28 11:53:25 issc lightdm: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
Jul 28 11:53:25 issc lightdm: PAM adding faulty module: pam_kwallet.so
Jul 28 11:53:25 issc lightdm: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
Jul 28 11:53:25 issc systemd-logind[650]: New session c1 of user lightdm.
Jul 28 11:53:25 issc systemd-logind[650]: Linked /tmp/.X11-unix/X0 to /run/user/112/X11-display.
Jul 28 11:53:26 issc lightdm: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
Jul 28 11:53:26 issc lightdm: PAM adding faulty module: pam_kwallet.so
Jul 28 11:53:26 issc lightdm: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "scicomp"
Jul 28 11:53:29 issc lightdm: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
Please help me, i tried many tutorial online and every tutorial looks like same ,like this one.I am trying from last 2 weeks its not working.Thank you for your time.
You need to install and configure autofs for this to work. autofs will automatically mount user's home directories on the client machine from an NFS server. I'm not sure about creating them on the server on the fly, but if it does work, you will likely need to enable the pam_mkhomedir module in the appropriate /etc/pam.d file(s), as described here
Yep! I tried and worked for me.
**Server Side :** Package require to install :
$ sudo apt-get install nfs-kernel-server
Updated in below file like this
abdulrahim#issc-ldap:/ldap/batch2016part2$ sudo vi /etc/exports
#/homes 198.1.10.*(fsid=0,rw,insecure,no_subtree_check,sync)
/ldap/batch2015part1/home 198.1.10.*(fsid=1,rw,insecure,no_subtree_check,sync)
/ldap/batch2015part2/home 198.1.10.*(fsid=2,rw,insecure,no_subtree_check,sync)
Exported as per below::::
abdulrahim#issc-ldap:/ldap/batch2016part2$ sudo exportfs -r
root#issc-ldap:/ldap/rnd# showmount -e 198.1.10.45
Export list for 198.1.10.45:
/ldap/batch2015part1/home
/ldap/batch2015part2/home
**On Client Side :** Package require to install :
$ sudo apt-get install nfs-kernel-client
NOW ON CLIENT SIDE mount,permission ,ownership::::::
$ sudo gedit /etc/fstab
#####below are partition mounted from server
198.1.10.45:/ldap/batch2015part1/home /ldap/batch2015part1/home nfs nfsvers=3,sync 0 3
198.1.10.45:/ldap/batch2015part2/home /ldap/batch2015part2/home nfs nfsvers=3,sync 0 4
### or like this below
198.1.10.45:/ldap/batch2015part1/home /ldap/batch2015part1/home nfs noauto,x-systemd.automount 0 3
198.1.10.45:/ldap/batch2015part2/home /ldap/batch2015part2/home nfs noauto,x-systemd.automount 0 4
Now mount all pertition from server side as per below : :::::
$ sudo mount -a
Check mounted partion by below commands
$ df -h