LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
LinkBack Search this Thread
Old 06-21-2010, 08:35 AM   #1
najafa
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Rep: Reputation: 0
Smile embedded device usb detection


Hi,
Am a newbie in embedded Linux design and working on detection of usb devices by an ARM 9 embedded device with a camera. The embedded device should be able to detect the usb device and also sending data mostly video to it for storage in Linux. The video data stored on the usb device should be able to play when connected to an LCD or a computer. Am using the c language. My question is I would like to know if anyone can help me with what I need to know for my work and if there is a source code that can help me.

Thanks in advance
 
Old 06-21-2010, 08:55 AM   #2
yooy
Senior Member
 
Registered: Dec 2009
Posts: 1,071

Rep: Reputation: 125Reputation: 125
well, you can use hal that automatical mount usb, as detection use crontab that periodical check for mounted usb devices, "find" that search for video files and cp to copy things to storage

Similar way to implrement monitor with xrandr,..

I think it's all possible in bash..
 
Old 06-25-2010, 07:13 AM   #3
najafa
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks yooy for the input. Most appreciated.

The usb is to store real time streaming video data from a camera. The camera streaming is done. What am to do is to write a program to detect the usb device and then save the streaming data to it in c language. Any help?

Thanks.
 
Old 06-25-2010, 08:58 AM   #4
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-19-live-usb/ aix
Posts: 3,552

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
^ does it make a entry in /var/log/messages when you plug it in.

what i usually do is create a service that tails that file every ten seconds looking for a certain string and performs some action if it finds it.
 
Old 06-28-2010, 07:00 AM   #5
najafa
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Hi Schneidz,

Thanks for your input. Really appreciated.
Am a bit lost about 'create a service that tails the file every ten seconds'. How do I do that?
I now have a program that can detect the usb, my next challenge is saving it onto the usb device
in real time from the camera.

Thanks for the help in advance.
 
Old 06-28-2010, 08:20 AM   #6
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-19-live-usb/ aix
Posts: 3,552

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
i basically meant to probe /var/log/messages every 10 seconds and do something if you see a line that mentions your usb camera.

not sure how your camera records video; maybe a symlink or fifo will help.
 
  


Reply

Tags
video grabber, embedded


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
detection of a device when plugged through USB port chaitalil Linux - Newbie 6 02-12-2013 11:52 AM
MSC (UMS) instead MTP on linux embedded device. Linux-USB Gadget / GadgetFS rclemente Linux - Embedded & Single-board computer 2 08-28-2009 03:34 AM
usb device detection, manual insertion card(smart card) reader problem, zapkhiel Linux - Hardware 4 07-17-2009 08:50 AM
USB device detection weirdness oot Slackware 1 08-26-2008 02:05 AM
usb device detection and config legs Linux - Networking 0 01-01-2004 03:58 PM


All times are GMT -5. The time now is 09:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration