From owner-freebsd-current@FreeBSD.ORG Mon Mar 5 05:25:12 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 414F216A401 for ; Mon, 5 Mar 2007 05:25:12 +0000 (UTC) (envelope-from sziszi@bsd.hu) Received: from mail00d.mail.t-online.hu (mail00d.mail.t-online.hu [84.2.42.5]) by mx1.freebsd.org (Postfix) with ESMTP id D959013C4A3 for ; Mon, 5 Mar 2007 05:25:11 +0000 (UTC) (envelope-from sziszi@bsd.hu) Received: from baranyfelhocske.buza.adamsfamily.xx (catv540331AB.pool.t-online.hu [84.3.49.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail00d.mail.t-online.hu (Postfix) with ESMTP id 012A7BDC30 for ; Mon, 5 Mar 2007 06:25:09 +0100 (CET) Received: from baranyfelhocske.buza.adamsfamily.xx (localhost [127.0.0.1]) by baranyfelhocske.buza.adamsfamily.xx (8.13.8/8.13.8) with ESMTP id l255P9Ta001570 for ; Mon, 5 Mar 2007 06:25:09 +0100 (CET) (envelope-from sziszi@bsd.hu) Received: (from sziszi@localhost) by baranyfelhocske.buza.adamsfamily.xx (8.13.8/8.13.8/Submit) id l255P9Et001569 for freebsd-current@freebsd.org; Mon, 5 Mar 2007 06:25:09 +0100 (CET) (envelope-from sziszi@bsd.hu) X-Authentication-Warning: baranyfelhocske.buza.adamsfamily.xx: sziszi set sender to sziszi@bsd.hu using -f Date: Mon, 5 Mar 2007 06:25:09 +0100 From: Szilveszter Adam To: freebsd-current@freebsd.org Message-ID: <20070305052509.GA1116@baranyfelhocske.buza.adamsfamily.xx> Mail-Followup-To: Szilveszter Adam , freebsd-current@freebsd.org References: <20070304220602.GI21974@e.0x20.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070304220602.GI21974@e.0x20.net> User-Agent: Mutt/1.5.14 (2007-02-12) 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 05:25:12 -0000 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@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@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: addr 2> on uhub0 > umass1: 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: 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: 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