LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to connect an usb in kernel 3.8.13 without udev? (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-connect-an-usb-in-kernel-3-8-13-without-udev-4175468834/)

floppy_stuttgart 07-08-2013 02:41 AM

How to connect an usb in kernel 3.8.13 without udev?
 
Hello,
on an application, I have following error after using lsusb:

> export LIBUSB_DEBUG=9
> lsusb
libusb: 0.000000 error [op_init] could not find usbfs
unable to initialize libusb: -99

What should I do for not having this error?

GlennsPref 07-08-2013 07:40 PM

Hi, do you have a listing like this in /etc/fstab?
Code:

# load tmpfs
tmpfs /dev/shm tmpfs defaults 0 0
#Get read/write access to usb, load usbfs
none /proc/bus/usb usbfs devgid=43,devmode=664 0 0

I run this line to add it to fstab. As roo...
Code:

cat /home/glenn/My_system/fstab-usb-t-shm >> /etc/fstab
I hope this helps you,

floppy_stuttgart 07-09-2013 05:31 AM

the result of "cat /etc/fstab" in my embedded system is
Quote:

# /etc/fstab: static file system information.
#
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 rw,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /tmp tmpfs defaults 0 0
sysfs /sys sysfs defaults 0 0
So, I need to introduce the line "none /proc/bus/usb usbfs devgid=43,devmode=664 0 0" to /etc/fstab with
echo "none /proc/bus/usb usbfs devgid=43,devmode=664 0 0" >> /etc/fstab
and keep the line "tmpfs /dev/shm tmpfs mode=0777 0 0"
?


"dmesg" result before the "lsusb" command was done

Quote:

[11870.579512] hub 1-0:1.0: USB hub found

[11870.583753] hub 1-0:1.0: 2 ports detected

[11870.900890] usb 1-1: new full-speed USB device number 2 using ppc-of-ohci

[11871.051247] usb 1-1: New USB device found, idVendor=0af0, idProduct=7a01

[11871.058362] usb 1-1: New USB device strings: Mfr=3, Product=2, SerialNumber=4

[11871.065846] usb 1-1: Product: Globetrotter HSUPA Modem

[11871.071276] usb 1-1: Manufacturer: Option N.V.

[11871.075991] usb 1-1: SerialNumber: Serial Number

[11871.090381] scsi0 : usb-storage 1-1:1.0

[11872.110835] scsi 0:0:0:0: CD-ROM ZCOption HSUPA Modem PQ: 0 ANSI: 2

[11872.151779] sr0: scsi-1 drive

[11872.155021] cdrom: Uniform CD-ROM driver Revision: 3.20

[11872.180971] sr 0:0:0:0: Attached scsi CD-ROM sr0

[11872.193813] sr 0:0:0:0: Attached scsi generic sg0 type 5

GlennsPref 07-09-2013 06:46 PM

Quote:

So, I need to introduce the line "none /proc/bus/usb usbfs devgid=43,devmode=664 0 0" to /etc/fstab with
echo "none /proc/bus/usb usbfs devgid=43,devmode=664 0 0" >> /etc/fstab
and keep the line "tmpfs /dev/shm tmpfs mode=0777 0 0"
?
Yes, insert the line and test.

I have no real knowlledge in Embeded systems.

floppy_stuttgart 07-10-2013 06:25 AM

what was the group for you? I tried with
"none /proc/bus/usb usbfs devgid=100,devmode=664 0 0" >> /etc/fstab
The error is still there.

cat /etc/group of my system gave
Code:

root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
wheel:x:10:root
audio:x:29:
www-data:x:33:
utmp:x:43:
staff:x:50:
lock:x:54:
haldaemon:x:68:
dbus:x:81:
netdev:x:82:
ftp:x:83
nobody:x:99:
nogroup:x:99:
users:x:100:
default:x:1000:

The devgid=43 proposal dont work, too.

The "ls /proc/bus" give only pci

ls /proc/bus
Quote:

pci
So, my humble impression is a /proc/bus/usb is missing.
I will search if I am right, why this is the case and how to solve the missing proc/bus/usb.
My system has no udev. Perhaps I must make few setups with line command.

floppy_stuttgart 01-18-2014 11:41 AM

The libusb was not working.
It should be installed again. I could not do it (I dont know how to do it)
But I found a way not to use libusb by buying a USB GPRS Modem which dont need usb_modeswitch.. because usb_modeswitch needs a working libusb (what I dont have).
Topic closed.
A workaround was found.


All times are GMT -5. The time now is 04:09 AM.