From owner-freebsd-current@FreeBSD.ORG Mon Mar 5 17:26:45 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5AE5316A403 for ; Mon, 5 Mar 2007 17:26:45 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.67.217]) by mx1.freebsd.org (Postfix) with ESMTP id B488813C48E for ; Mon, 5 Mar 2007 17:26:44 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: by mail.0x20.net (Postfix, from userid 1002) id 61DFD375A4; Mon, 5 Mar 2007 18:07:17 +0100 (CET) Date: Mon, 5 Mar 2007 18:07:17 +0100 From: Lars Engels To: Szilveszter Adam Message-ID: <20070305170717.GC52745@e.0x20.net> Mail-Followup-To: Lars Engels , Szilveszter Adam , freebsd-current@freebsd.org References: <20070304220602.GI21974@e.0x20.net> <20070305052509.GA1116@baranyfelhocske.buza.adamsfamily.xx> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ADZbWkCsHQ7r3kzd" Content-Disposition: inline In-Reply-To: <20070305052509.GA1116@baranyfelhocske.buza.adamsfamily.xx> X-Editor: VIM - Vi IMproved 7.0 X-Operation-System: FreeBSD 5.5-RELEASE User-Agent: Mutt/1.5.11 Cc: freebsd-current@freebsd.org Subject: Re: mount_msdosfs oddity X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2007 17:26:45 -0000 --ADZbWkCsHQ7r3kzd Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 05, 2007 at 06:25:09AM +0100, Szilveszter Adam wrote: > Hello Lars, >=20 > While I do not have the phone in question, I do have some experience > with regard to SE (and Ericsson) phones + FreeBSD. >=20 > 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@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. >=20 > So, if I understand you correctly, the da0s1 device does not show up > until you try to open it. Yes, this is right. >=20 > > (44) lars@ttyp6 # file -s /dev/da0s1 > > /dev/da0s1: x86 boot sector > >=20 > > This does not look like an msdosfs partition... >=20 > Indeed, but let's look farther below: >=20 > > umass0: > addr 2> on uhub0 > > umass1: > addr 2> on uhub0 >=20 > 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? >=20 When I connect the phone, it lets me choose "File Transfer Mode" and "Phone Mode". After selecting the FT-mode, the umass devices show up. > > (probe0:umass-sim0:0:0:0): Uninitialized Transport 5:26? > > da0 at umass-sim0 bus 0 target 0 lun 0 > > da0: Removable Direct Access SCSI-0 device > > da0: 1.000MB/s transfers > > da0: Attempt to query device size failed: NOT READY, Medium not present >=20 > 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. >=20 > > Opened disk da0 -> 6 >=20 > 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) =20 You are right, at this time, there is only the da0 device. da0s1 appears, when I try to mount da0. >=20 > Now it tries with the memory card: >=20 > > da1 at umass-sim1 bus 1 target 0 lun 0 > > da1: Removable Direct Access SCSI-0 device > > da1: 1.000MB/s transfers > > da1: Attempt to query device size failed: NOT READY, Medium not present >=20 > Here, either there is really no memory card in the phone, or we cannot > query it either. There is a 512MB card inserted. >=20 > > Opened disk da1 -> 6 >=20 > Same dance, we give up again. >=20 > > 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... >=20 > 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. >=20 > 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)=20 The phone acts strange, when I select the "Mass storage mode". You are right, that it shuts down and comes up in mass storage mode, and then devd reports a lot of connects. The same on Win XP, with a lot of bells ringing for every new device detected. Lars --ADZbWkCsHQ7r3kzd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF7E5FKc512sD3afgRAtc2AJ9rFzdloU/9EFhtJxV8xeK1HXHyHgCgwrH/ I/yhvaNpFRnx8k7GtkHh3wk= =nwwh -----END PGP SIGNATURE----- --ADZbWkCsHQ7r3kzd--