# Ubunu 7.10 vs. SanDisk Sansa c250



## d34thr3c0n (Sep 20, 2005)

I purchased a Sansa c250, but when I try to plug it up to my PC, running Ubuntu Studio 7.10, it tries to connect, but can never connect... I plug it in and the connection screen comes up, displays "Writing", "Connecting", "Reading", then goes to the main menu and does it all over again until I remove the USB cable. Each of these happen for about 1-2 seconds. I try to mount /dev/sda1, but it says that the special device does not exist. I tried it on a Windows XP Home box and it did the same thing, while a friend's Vista laptop worked fine with the player. How can I resolve this problem?


----------



## d34thr3c0n (Sep 20, 2005)

I tried plugging the player into my server, to see if it would connect, and it connected fine. Now the problem is that it shows up as /dev/sdc without partitions (just sdc, not sdc#). When I ran fdisk -l /dev/sdc, i get the following:

Disk /dev/sdc: 2044 MB, 2044198912 bytes
63 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 3906 * 512 = 1999872 bytes

Device Boot Start End Blocks Id System
[email protected]:~$ 

When mounted with mount /dev/sdc /mnt/temp, it mounts as VFAT.

I already have music on the player, but when I mount it, all the directories (all uppercase names, as opposed to when I connect it to a windows PC and get only the first letter uppercase) are empty.

If I put music in the MUSIC directory (on windows, I put it in Music), it does not show up when I unmount and disconnect the player.


----------



## shuuhen (Sep 4, 2004)

I've read that the Sansa can have multiple USB transfer modes. The default is MTP, but MSC is supposed to make it work right. I've never used a device that would need changing USB transfer modes, so I don't know what it would require for the Sansa.

Slightly different model, but you might look here: http://www.linuxcompatible.org/Sansa_e250_c13683.html


----------



## lensman3 (Oct 19, 2007)

What does "dmesg" from a command line say?

After the mount, what does "tail -f /var/log/messages" say? (You will need to be root to see).

Also what does "more /proc/scsi/scsi" say?  (You should see the device name in this file, like Sansa ???).

What does "more /etc/mtab" say? This should list the mounted file systems on your machine and the various permissions.

I'm fishing for some kind of errors when it mounts. (Even my camera when I download pictures has a FAT/DOS file system)!


----------



## d34thr3c0n (Sep 20, 2005)

shuuhen: The version I have, c250 V2, does not allow for switching from MTP to MSC mode.

lensman3: I will hook it up tomorrow and check those for you. It did mount as VFAT, and I was able to see the contents. I copied music to the MUSIC dir, unmounted it, and disconnected it. It did not see the new music I added, but after remounting it, the file was there for sure.


----------



## d34thr3c0n (Sep 20, 2005)

dmesg

```
[897531.959908] usb 1-1: new full speed USB device using uhci_hcd and address 14
[897534.099270] usb 1-1: new full speed USB device using uhci_hcd and address 15
[897534.246749] usb 1-1: not running at top speed; connect to a high speed hub
[897534.275949] usb 1-1: configuration #1 chosen from 1 choice
[897534.285067] scsi8 : SCSI emulation for USB Mass Storage devices
[897534.285208] usb-storage: device found at 15
[897534.285214] usb-storage: waiting for device to settle before scanning
[897539.279409] usb-storage: device scan complete
[897539.282421] scsi 8:0:0:0: Direct-Access     SanDisk  Sansa c250       v03. PQ: 0 ANSI: 0
[897539.285374] scsi 8:0:0:1: Direct-Access     SanDisk  Sansa c250       v03. PQ: 0 ANSI: 0
[897539.291339] SCSI device sdc: 3992576 512-byte hdwr sectors (2044 MB)
[897539.294337] sdc: Write Protect is off
[897539.294347] sdc: Mode Sense: 04 00 00 00
[897539.294353] sdc: assuming drive cache: write through
[897539.303327] SCSI device sdc: 3992576 512-byte hdwr sectors (2044 MB)
[897539.306326] sdc: Write Protect is off
[897539.306335] sdc: Mode Sense: 04 00 00 00
[897539.306340] sdc: assuming drive cache: write through
[897539.306366]  sdc:
[897539.315406] sd 8:0:0:0: Attached scsi removable disk sdc
[897539.315513] sd 8:0:0:0: Attached scsi generic sg4 type 0
[897539.322499] sd 8:0:0:1: Attached scsi removable disk sdd
[897539.322619] sd 8:0:0:1: Attached scsi generic sg5 type 0
```
sudo tail -f /var/log/messages

```
Mar 27 22:25:10 maz-media kernel: [897539.285374] scsi 8:0:0:1: Direct-Access     SanDisk  Sansa c250       v03. PQ: 0 ANSI: 0
Mar 27 22:25:10 maz-media kernel: [897539.291339] SCSI device sdc: 3992576 512-byte hdwr sectors (2044 MB)
Mar 27 22:25:10 maz-media kernel: [897539.294337] sdc: Write Protect is off
Mar 27 22:25:10 maz-media kernel: [897539.303327] SCSI device sdc: 3992576 512-byte hdwr sectors (2044 MB)
Mar 27 22:25:10 maz-media kernel: [897539.306326] sdc: Write Protect is off
Mar 27 22:25:10 maz-media kernel: [897539.306366]  sdc:
Mar 27 22:25:10 maz-media kernel: [897539.315406] sd 8:0:0:0: Attached scsi removable disk sdc
Mar 27 22:25:10 maz-media kernel: [897539.315513] sd 8:0:0:0: Attached scsi generic sg4 type 0
Mar 27 22:25:10 maz-media kernel: [897539.322499] sd 8:0:0:1: Attached scsi removable disk sdd
Mar 27 22:25:10 maz-media kernel: [897539.322619] sd 8:0:0:1: Attached scsi generic sg5 type 0
```
more /proc/scsi/scsi

```
Host: scsi8 Channel: 00 Id: 00 Lun: 00
  Vendor: SanDisk  Model: Sansa c250       Rev: v03.
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi8 Channel: 00 Id: 00 Lun: 01
  Vendor: SanDisk  Model: Sansa c250       Rev: v03.
  Type:   Direct-Access                    ANSI SCSI revision: 02
```
more /etc/mtab

```
/dev/sdc /mnt/sansa vfat rw,noexec,nosuid,nodev,user=jmazikowski 0 0
```
with /etc/fstab reading

```
/dev/sdc /mnt/sansa auto rw,user,noauto 0 0
```

hope that helps...


----------



## lensman3 (Oct 19, 2007)

It looks like everything is working fine. Except, I expect the mount to be "/dev/sdc1", but it isn't.

So try this:
1) copy a music file as you have done in the past. To the correct directory.
2) At the text command line type "sync". This will flush all pending writes to the correct device. I'm thinking that maybe the song is not being written to the Sandisk until you try to unmount it. Then for Linux to unmount it, it has to write everything which could take a few seconds to minutes, depending on how fast your USB connection is.
3) After the "sync" returns, tt won't give you back the prompt until everything is written (flush). Then do a list of the music folder and see if stuff shows up now. You were seeing the song in the folder when you did the remount. The unmount was "sync"ing the file system.

(But it still confuses me why /dev/sdc isn't dev/sdc1, unless it was originally formated that way.)


----------



## d34thr3c0n (Sep 20, 2005)

When I hooked it up originally, the player displayed "Writing" for about a second, then "Connecting" for another couple seconds, then "Connected" until I ran umount /dev/sdc. Then It said "Writing" for a little bit before saying "Connected" again. After it finished writing it gave me a terminal prompt again and I unplugged the player.

After that, I rebooted it, checked for the new song (did not show up as being on the player) and remounted it. The song was there and I could use mplayer to play it directly from the device, just like a portable disk. The player shows up as a 2GB disk with no partitions (hence sdc with no sdc0, sdc1, etc.) I read about a problem similar to this when I was originally trying to get it to connect to my PC (as opposed to my server like I am now doing) but cannot find that post now. The person who posted it said something about reformatting the player and it working fine, but I did not read all the way thru the post to see exactly how it was formatted, and do not want to brick my device by formatting it wrong (possibly deleting the firmware).


----------

