From owner-freebsd-usb@freebsd.org Mon Apr 5 06:03:44 2021 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FACF5C29BD for ; Mon, 5 Apr 2021 06:03:44 +0000 (UTC) (envelope-from woodsb02@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FDKpm1Qzbz3J2J for ; Mon, 5 Apr 2021 06:03:44 +0000 (UTC) (envelope-from woodsb02@freebsd.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: woodsb02) by smtp.freebsd.org (Postfix) with ESMTPSA id 22AA42DC44 for ; Mon, 5 Apr 2021 06:03:44 +0000 (UTC) (envelope-from woodsb02@freebsd.org) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailauth.nyi.internal (Postfix) with ESMTP id C5D3827C0054 for ; Mon, 5 Apr 2021 02:03:43 -0400 (EDT) Received: from imap6 ([10.202.2.56]) by compute2.internal (MEProxy); Mon, 05 Apr 2021 02:03:43 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudejuddguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesrgdtre erreertdenucfhrhhomhepfdeuvghnucghohhoughsfdcuoeifohhoughssgdtvdesfhhr vggvsghsugdrohhrgheqnecuggftrfgrthhtvghrnhepueehjeekhffhveevjeevtefhfe etgeekvdethefgleehgedvveelgefhffehuedvnecuffhomhgrihhnpehsphgrrhhkfhhu nhdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegsvghnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddutdelfeeiiedv keekqddvgeejkedvvdektddqfihoohgushgstddvpeepfhhrvggvsghsugdrohhrghesfi hoohgushdrrghm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 307CA24005D; Mon, 5 Apr 2021 02:03:43 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-273-g8500d2492d-fm-20210323.002-g8500d249 Mime-Version: 1.0 Message-Id: Date: Mon, 05 Apr 2021 14:03:23 +0800 From: "Ben Woods" To: freebsd-usb@freebsd.org Subject: mount_msdosfs not working for USB device SparkFun Pro nRF52840 Mini Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2021 06:03:44 -0000 Hi FreeBSD USB peeps, I recently bought myself a small bluetooth development board to tinker with - a SparkFun Pro nRF52840 Mini: https://www.sparkfun.com/products/15025 But I am having difficulty mounting the mass storage device it presents when in bootloader mode (accessible by double tapping the reset button). In this mode it presents 3 devices at once - a USB serial (CDC), a DFU (device firmware upgrade) and a mass-storage device (MSD). When I attempt to mount the FAT32 formatted mass storage device I get the error: mount_msdosfs: /dev/da1: Invalid argument I suspect the issue is a USB quirk, and I may just need to use usbconfig with the right command to fix it. I'm hoping someone is able to help me get this mounting, or troubleshoot further? Cheers, Ben --- Output below from bootloader mode --- # camcontrol devlist at scbus0 target 0 lun 0 (pass0,da0) at scbus1 target 0 lun 0 (pass1,da1) # ls -lah /dev/da1* crw-r----- 1 root operator 0xc9 5 Apr 13:56 /dev/da1 # mount -t msdosfs /dev/da1 /mnt mount_msdosfs: /dev/da1: Invalid argument # mount -t msdosfs /dev/msdosfs/NRF52BOOT /mnt mount_msdosfs: /dev/msdosfs/NRF52BOOT: Invalid argument # fstyp -lu /dev/da1 msdosfs NRF52BOOT # file -s /dev/da1 /dev/da1: DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "UF2 UF2 ", root entries 64, sectors 7998 (volumes <=32 MB), Media descriptor 0xf8, sectors/FAT 32, sectors/track 1, heads 1, serial number 0x420042, label: "NRF52BOOT ", FAT (16 bit) # dmesg ugen0.10: at usbus0 umodem0 on uhub1 umodem0: on usbus0 umodem0: data interface 1, has no CM over data, has no break umass1 on uhub1 umass1: on usbus0 umass1: SCSI over Bulk-Only; quirks = 0x0000 umass1:1:1: Attached to scbus1 da1 at umass-sim1 bus 1 scbus1 target 0 lun 0 da1: Removable Direct Access SCSI-2 device da1: Serial Number C1599CE596019A19 da1: 1.000MB/s transfers da1: 3MB (8000 512 byte sectors) da1: quirks=0x2 # usbconfig -d 0.10 dump_all_desc ugen0.10: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x00ef bDeviceSubClass = 0x0002 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x1b4f idProduct = 0x5284 bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 bNumConfigurations = 0x0001 Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0062 bNumInterfaces = 0x0003 bConfigurationValue = 0x0001 iConfiguration = 0x0000 bmAttributes = 0x0080 bMaxPower = 0x0032 Additional Descriptor bLength = 0x08 bDescriptorType = 0x0b bDescriptorSubType = 0x00 RAW dump: 0x00 | 0x08, 0x0b, 0x00, 0x02, 0x02, 0x02, 0x01, 0x00 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x0002 bInterfaceSubClass = 0x0002 bInterfaceProtocol = 0x0001 iInterface = 0x0004 Additional Descriptor bLength = 0x05 bDescriptorType = 0x24 bDescriptorSubType = 0x00 RAW dump: 0x00 | 0x05, 0x24, 0x00, 0x20, 0x01 Additional Descriptor bLength = 0x05 bDescriptorType = 0x24 bDescriptorSubType = 0x01 RAW dump: 0x00 | 0x05, 0x24, 0x01, 0x00, 0x01 Additional Descriptor bLength = 0x04 bDescriptorType = 0x24 bDescriptorSubType = 0x02 RAW dump: 0x00 | 0x04, 0x24, 0x02, 0x02 Additional Descriptor bLength = 0x05 bDescriptorType = 0x24 bDescriptorSubType = 0x06 RAW dump: 0x00 | 0x05, 0x24, 0x06, 0x00, 0x01 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 Interface 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x000a bInterfaceSubClass = 0x0000 bInterfaceProtocol = 0x0000 iInterface = 0x0000 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0002 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0082 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Interface 2 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0002 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x0008 bInterfaceSubClass = 0x0006 bInterfaceProtocol = 0x0050 iInterface = 0x0005 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0003 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0001 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0083 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0001 bRefresh = 0x0000 bSynchAddress = 0x0000 -- From: Ben Woods woodsb02@freebsd.org