Re: Learning Usb programming in Linux from user space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi .
Its a data acquisition ssytem ...
Requirement is like this..I have to work on arm omap arm processor
with linux on it .

I have to acquire data from some interfaces like UART and store that
data through USB interface.OR read it from USB interface

Now most probably it shd be a pendrive on usb connected to board .

So i want to learn how can we store data on a pen drive connected to
usb interface
from use space C program.

in that concern ..i reached to Greg K H article mentioning libusb
...is there any other way too ?

then usb_control_msg function i found difficult to comprehend ..how do
i know parameters for my pen drive ....

===================================================================

Now another question ...related to basic concept .....


As i have practiced writing a few block device driver(but just on
virtual memory not on acttual device ) and worked on filesystem code
i was wondering ....
If we have a pendrive acting as a block device with lets say fat32 on it .

Then how do we interact with it
through USb driver or through block device driver

I am trying to understand
 ...they should be on different layers ...

Filesystem sends data to block device layer ...and after processing ...
a block of data finally coming out of kernel block device driver .....
to be written to specified block device ...which acc to kernel is a
file /dev/hda lets say

then where does usb driver fits ..in this picture





Nidhi





On Thu, Nov 18, 2010 at 11:24 AM, Greg KH <greg@xxxxxxxxx> wrote:
> On Thu, Nov 18, 2010 at 11:00:13AM +0530, nidhi mittal hada wrote:
>> Hi all
>>
>> i am learning how to communicate to usb interface in linux from user sspace in C
>>
>> I have read usb in nutshell and greg K H article in linux journal .
>>
>> I am working on simple data acquisitioon system .. which has to
>> read/store data on usb ...
>>
>> I read from Greg's article that i need to use libusb for this purpose .
>>
>> Now i am stuck at usb_control_msg() and parameters to be passed in it .
>>
>> as i am not able to understand how to decide what should be value of
>> parameters for normal pendrive with me ....
>
> A pendrive is one of the most complex USB devices out there, you will
> not be successful in writing a tiny driver to talk to it (it's really
> SCSI over USB). ÂBecides we already have 2 drivers in the tree already
> to control this device, why do you need/want another one?
>
> First off, what specifically do you want to do here, and why do you want
> to do it (i.e. the root problem you are trying to solve.)
>
> thanks,
>
> greg k-h
>



-- 
Thanks & Regards
Nidhi Mittal Hada
Scientific officer D
Computer Division
Bhabha Atomic Research Center
Mumbai

http://nidhi-searchingmyself.blogspot.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux