Re: mount_msdosfs oddity

From: Szilveszter Adam <sziszi_at_bsd.hu>
Date: Mon, 5 Mar 2007 06:25:09 +0100
Hello Lars,

While I do not have the phone in question, I do have some experience
with regard to SE (and Ericsson) phones + FreeBSD.

On Sun, Mar 04, 2007 at 11:06:02PM +0100, Lars Engels wrote:
> my Sony Ericsson W810i cell phone comes with a USB cable and presents
> the internal memory and the memory stick as two umass devices (da0,
> da1). When I try to mount one of them (mount -t msdosfs), I am getting
> the error message:
> (41) lars_at_ttyp6 # mount -t msdosfs /dev/da0 mnt/usb
> mount_msdosfs: /dev/da0: Invalid argument
> Which is okay because it's not possible to mount da0 directly.
> But after that a new device da0s1 shows up, which returns the same
> error message when I try to mount it.

So, if I understand you correctly, the da0s1 device does not show up
until you try to open it.

> (44) lars_at_ttyp6 # file -s /dev/da0s1
> /dev/da0s1: x86 boot sector
> 
> This does not look like an msdosfs partition...

Indeed, but let's look farther below:

> umass0: <Sony Ericsson Sony Ericsson W810, class 0/0, rev 2.00/0.00,
> addr 2> on uhub0
> umass1: <Sony Ericsson Sony Ericsson W810, class 0/0, rev 2.00/0.00,
> addr 2> on uhub0

So we find two devices. The older models, like my K750i only expose one
device (the memory stick duo), the internal memory was only accessible
via BT/IR or via the windows drivers that SE supplied. (But even then, I
prefer to use an outside card reader, but that's beside the point)
However, I know that in the case of the W810, the phone can be accessed
in two modes, in "umass mode" when phone functionality is off and in
"modem mode" when access to the internal memory is blocked. (perhaps
also to the memory card?) When attaching the phone to the PC, you have
to choose between these modes. Did you set the "umass mode" in this
case?

> (probe0:umass-sim0:0:0:0): Uninitialized Transport 5:26?
> da0 at umass-sim0 bus 0 target 0 lun 0
> da0: <SEMC Int.Memory 0000> Removable Direct Access SCSI-0 device
> da0: 1.000MB/s transfers
> da0: Attempt to query device size failed: NOT READY, Medium not present

Ouch. So the code tries to find out how big the internal memory is, but
fails. It acts like eg a card reader with no card in it.

> Opened disk da0 -> 6

And so it gives up. (6 is probably the error code)
At this point I strongly suspect that there is no da0s1 device, but
could you check this? (With ls -la da* /dev) The da0 device does hold a
partition table, but it is either just faked, or read wrongly. (I
strongly suspect that the internal memory is larger than just 18 megs,
it surely is on my K750i)  

Now it tries with the memory card:

> da1 at umass-sim1 bus 1 target 0 lun 0
> da1: <SEMC Mem-Stick 0000> Removable Direct Access SCSI-0 device
> da1: 1.000MB/s transfers
> da1: Attempt to query device size failed: NOT READY, Medium not present

Here, either there is really no memory card in the phone, or we cannot
query it either.

> Opened disk da1 -> 6

Same dance, we give up again.

> I assume that mount_msdosfs is lacking some way to mount these
> partitions. Goggle told me that mounting it works on FreeBSD.
> Not to mention that I can also mount it with Windows XP...

I do not think this a problem with the msdosfs driver or mount. There is
simply no device there to mount. Now why this happens is more
interesting.

So again: have you set the phone to "Mass storage mode" upon connecting?
At this point the phone probably just shuts down so it is noticeable. (I
have a nagging suspicion here, but will not present it yet) 

-- 
Regards:

Szilveszter ADAM
Budapest
Hungary
Received on Mon Mar 05 2007 - 04:25:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:06 UTC