Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
hello to all I want to send a file to a usb mass storage device . can use libusb for this purpose ?how? if no what can i do?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2012
    Posts
    7

    libusb


    hello to all
    I want to send a file to a usb mass storage device . can use libusb for this purpose ?how?
    if no what can i do?

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,376
    Usb storage devices usually have a filesystem.
    Mounting it will provide file access.
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Aug 2012
    Posts
    7
    my project is a driver and/or program that can send file to mass storage device
    can libusb alone help me ?

  4. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,376
    libusb operates on a lower layer than filesystems.
    You can send data to a usb device with libusb, but this is then not a file on that mass storage.
    You must always face the curtain with a bow.

  5. #5
    Just Joined!
    Join Date
    Aug 2012
    Posts
    7
    and how can i send file?

  6. #6
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,376
    Via file operations.
    The mass storage device needs to be already mounted at that point.
    You must always face the curtain with a bow.

  7. #7
    Just Joined!
    Join Date
    Aug 2012
    Posts
    7
    can you explain more detail?

  8. #8
    Just Joined!
    Join Date
    Aug 2012
    Posts
    7
    i want write a program that send a file via usb driver
    is this posible?

  9. #9
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,376
    As an example, please adjust to your usecase:
    Letīs say, the usb mass storage device (/dev/sdb) is already partioned (/dev/sdb1) and has a filesystem (ext4)

    You would then need a directory to server as mountpoint: /mnt/usb
    Then mount it.
    mount /dev/sdb1 /mnt/usb

    Your program can then write to /mnt/usb via the usual systemcalls: open(), write(), etc
    if the filesystem permissions allow it.
    You must always face the curtain with a bow.

  10. #10
    Just Joined!
    Join Date
    Aug 2012
    Posts
    7
    i am used libusb for send data to usb device in linux how can i retrieval or show data in usb devise?
    my usb device is embedded linux board.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •