From owner-freebsd-questions@FreeBSD.ORG Sat Feb 6 23:28:31 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D555106566B for ; Sat, 6 Feb 2010 23:28:31 +0000 (UTC) (envelope-from jmc-freebsd2@milibyte.co.uk) Received: from relay.pcl-ipout01.plus.net (relay.pcl-ipout01.plus.net [212.159.7.99]) by mx1.freebsd.org (Postfix) with ESMTP id AE5228FC0C for ; Sat, 6 Feb 2010 23:28:29 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAAuKbUtUXebi/2dsb2JhbADWA4RUBA Received: from relay03.plus.net ([84.93.230.226]) by relay.pcl-ipout01.plus.net with ESMTP; 06 Feb 2010 23:28:28 +0000 Received: from [84.92.153.232] (helo=curlew.milibyte.co.uk) by relay03.plus.net with esmtp (Exim) id 1Ndu4i-00018O-5v; Sat, 06 Feb 2010 23:28:28 +0000 Received: by curlew.milibyte.co.uk with local (Exim 4.71) (envelope-from ) id 1Ndu4h-0000Pm-SJ; Sat, 06 Feb 2010 23:28:28 +0000 From: Mike Clarke To: freebsd-questions@freebsd.org, Polytropon Date: Sat, 6 Feb 2010 23:28:27 +0000 User-Agent: KMail/1.9.10 References: <201002061511.11639.jmc-freebsd2@milibyte.co.uk> <20100206192540.bb4ce11b.freebsd@edvax.de> In-Reply-To: <20100206192540.bb4ce11b.freebsd@edvax.de> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201002062328.27744.jmc-freebsd2@milibyte.co.uk> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: jmc-freebsd2@milibyte.co.uk X-SA-Exim-Scanned: No (on curlew.milibyte.co.uk); SAEximRunCond expanded to false X-Plusnet-Relay: 41f9707fb00b2dcca4144e493d906a8d Cc: Subject: Re: Detecting cards in USB card reader X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 23:28:31 -0000 On Saturday 06 February 2010, Polytropon wrote: > I can understand this. Maybe accessing the "SCSI layer" of > the card reader can help? If > > =A0=A0=A0=A0=A0=A0=A0=A0% camcontrol reset all > > will cause the same effect (of creating the correct nodes in > /dev), you can be more precise (e. g. just reset da0); see > > =A0=A0=A0=A0=A0=A0=A0=A0% man camcontrol > > for further (and maybe more elegant) details. Neither reset nor rescan have any effect with camcontrol. Without a=20 suitable incantation like 'cat /dev/null > /dev/da0' I just=20 have /dev/da0 but no /dev/da0s1 after inserting a card. The system=20 knows that the media is there, "fdisk /dev/da0" can see the slice even,=20 but there's no device node for it. This is what happens after inserting a 16MB card in the reader: curlew:/root# ls -l /dev/da0* crw-r----- 1 root operator 0, 176 6 Feb 23:15 /dev/da0 curlew:/root# fdisk /dev/da0 ******* Working on device /dev/da0 ******* parameters extracted from in-core disklabel are: cylinders=3D15 heads=3D64 sectors/track=3D32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=3D15 heads=3D64 sectors/track=3D32 (2048 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 1 (0x01),(Primary DOS with 12 bit FAT) start 32, size 31264 (15 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 488/ head 1/ sector 32 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: curlew:/root# ls -l /dev/da0* crw-r----- 1 root operator 0, 176 6 Feb 23:15 /dev/da0 Still no device for slice 1 until after I attempt to open da0 for=20 writing: curlew:/root# cat /dev/null > /dev/da0 curlew:/root# ls -l /dev/da0* crw-r----- 1 root operator 0, 176 6 Feb 23:15 /dev/da0 crw-r----- 1 root operator 0, 129 6 Feb 23:18 /dev/da0s1 I can use this to initialise the card reader but I'd feel more=20 comfortable with something a bit less dangerous looking. =2D-=20 Mike Clarke