• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to support USB device?  RSS feed

 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a mp3 player which only has win32 drive, so it doesn't work under Linux, what can I do? Does Wine make sense?
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if the drive uses a FAT32 (or FAT16) filesystem Linux can read and write it with no special anything.
You can't of course use the device software with it so be careful, though maybe wine can.
 
Arjun Shastry
Ranch Hand
Posts: 1906
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In one CD I found mPlayer rpm which I promptly installed when Fedora was there on my laptop.I was able to listen some mp3 songs.
 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all, I finally solved this problem:
mount /dev/sda1 /home/Olnex/USB -o umask=022
/home/Olnex/USB is the directory you want to mount the USB device, after this, files in the USB will be in the /home/Olnex/USB directory, of course you can create your own directory(don't copy mine;-), and only root can do this, so make sure you are root, I firstly used su but I found it hard to copy/delete files(mp3s) since I am root only in the command line mode, so I suggest that you log in as root.
sincerely, Olnex
 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem!!! The above method doesn't work on my mp3 player!
I copied some files in command line using cp, and the files(mp3s) appeared in the USB directory, but when I umount it and take off the USB plug, listened to the music, those new-added musics wasn't there!!! I'm new to Linux, so i guess USB is only a mapping of a filesystem, the files was not copied to the real USB disk(magic)!
 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Magic thing happened again! I logged in as root and mount the device, delete all files(include a mp3 called 02.mp3), copied 2 mp3s into it, when it finished writing, and restart the computer and take out the device, but there's only one song in it: 02.mp3 !!!
I don't like to see the ghost.
I felt tired, i'd better go to bed Zzz
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Strange thing happened to me too (some years ago).

The mount-point is a normal directory.
If you copy a file to that directory, without mounting your drive first, it's put into the directory.

When you now mount the device, your file in the directory is hidden by the mounted drive.
When you unmount the device, the file is visible again.
This might be what happened.
 
Tim Holloway
Saloon Keeper
Posts: 18790
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing to be careful about - and this is for any mountable device under linux - including floppies.

Linux does lazy writes. You have explicitly unmount the device so that any that's still in memory buffers will be flushed out to the device. There may be a small delay. On my Kanguru MP3 player, there's a light on the device that flashes while the data's being written after I issue the umount command. When it stops flashing, then it's safe to unplug the device.

BTW, some Linux desktops have a trashcan. If you delete files from the device, they may not actually get removed; just moved into the trashcan. So they're still taking up space on the device. You'll have to empty out the trash before space gets freed up again.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!