Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a problem where I need to read a usb-stick or a usb keyboard: When I plug in the USB stick or keyboard I can't get power to the device. dmesg says nothing

I tried:

for device in $(ls /sys/bus/usb/devices/*/product); 
  do echo $device
  cat $device;
done

for getting information in console and I get this output:

/sys/bus/usb/devices/usb1/product
Freescale On-Chip EHCI Host Controller 

I can't see any kingston usb stick or keyboard.

Quesitons:

  1. How can I power my usb device mdev or /sys/bus/usb/devices/*/power
  2. How to read data from keyboard or usb stick.
share|improve this question
    
which embeded and which unix distribution do you use? –  rubo77 Oct 21 '13 at 12:02
    
Linux version 2.6.35.3 (panu@ubuntu) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) ) #1 PREEMPT Linux 2.6.35.3 armv5tejl Built with buildroot –  user257980 Oct 21 '13 at 14:09
    
Some very small (thin) USB sticks can be inserted upside down; try turning the usb stick over... –  ChuckCottrill Oct 21 '13 at 19:52

2 Answers 2

observe the output in syslog with:

tail -f /var/log/syslog

while plugging in and out the USB-device.

If you have no syslog, install some Logging framework for embedded linux

share|improve this answer
    
there is no syslog in this embbedded linux –  user257980 Oct 21 '13 at 11:15
    
maybe you find a simple logging framework in my edit –  rubo77 Oct 21 '13 at 12:04
    
Thanks. I will try that busybox –  user257980 Oct 21 '13 at 13:46
    
Theres no logs for usb when connecting usb stick. –  user257980 Oct 21 '13 at 14:07

Solution wasn't simple.

I need to configurate /sys/class/gpio/ for enabling internal 5V step-up regulator.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.