我想安装 ATMEL 大容量存储设备 (USB),以便可以访问记录到我佩戴的医疗设备中的数据。
以下是我运行的命令和相应的输出。
raspberrypi:~$ sudo tail -f /var/log/messages
Nov 7 13:37:40 raspberrypi kernel: [ 17.802765] Bluetooth: HCI socket layer initialized
Nov 7 13:37:40 raspberrypi kernel: [ 17.802784] Bluetooth: L2CAP socket layer initialized
Nov 7 13:37:40 raspberrypi kernel: [ 17.802850] Bluetooth: SCO socket layer initialized
Nov 7 13:37:40 raspberrypi kernel: [ 17.820587] Bluetooth: HCI UART driver ver 2.3
Nov 7 13:37:40 raspberrypi kernel: [ 17.820606] Bluetooth: HCI UART protocol H4 registered
Nov 7 13:37:40 raspberrypi kernel: [ 17.820613] Bluetooth: HCI UART protocol Three-wire (H5) registered
Nov 7 13:37:40 raspberrypi kernel: [ 17.820891] Bluetooth: HCI UART protocol Broadcom registered
Nov 7 13:37:40 raspberrypi kernel: [ 18.177844] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Nov 7 13:37:40 raspberrypi kernel: [ 18.177858] Bluetooth: BNEP filters: protocol multicast
Nov 7 13:37:40 raspberrypi kernel: [ 18.177892] Bluetooth: BNEP socket layer initialized
Nov 7 13:39:18 raspberrypi kernel: [ 105.079798] Indeed it is in host mode hprt0 = 00021d01
Nov 7 13:39:18 raspberrypi kernel: [ 105.279732] usb 1-1: new full-speed USB device number 2 using dwc_otg
Nov 7 13:39:23 raspberrypi kernel: [ 110.319777] Indeed it is in host mode hprt0 = 00021d01
Nov 7 13:39:39 raspberrypi kernel: [ 126.329904] Indeed it is in host mode hprt0 = 00021501
Nov 7 13:39:39 raspberrypi kernel: [ 126.529832] usb 1-1: new high-speed USB device number 3 using dwc_otg
Nov 7 13:39:39 raspberrypi kernel: [ 126.530038] Indeed it is in host mode hprt0 = 00001101
Nov 7 13:39:39 raspberrypi kernel: [ 126.760386] usb 1-1: config 1 interface 1 altsetting 0 bulk endpoint 0x1 has invalid maxpacket 128
Nov 7 13:39:39 raspberrypi kernel: [ 126.760411] usb 1-1: config 1 interface 1 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 128
Nov 7 13:39:39 raspberrypi kernel: [ 126.760429] usb 1-1: config 1 interface 2 altsetting 0 bulk endpoint 0x4 has invalid maxpacket 64
Nov 7 13:39:39 raspberrypi kernel: [ 126.760720] usb 1-1: New USB device found, idVendor=03eb, idProduct=6132
Nov 7 13:39:39 raspberrypi kernel: [ 126.760756] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Nov 7 13:39:39 raspberrypi kernel: [ 126.760766] usb 1-1: Product: Atmel
Nov 7 13:39:39 raspberrypi kernel: [ 126.783258] usb-storage 1-1:1.2: USB Mass Storage device detected
Nov 7 13:39:39 raspberrypi kernel: [ 126.796442] scsi host0: usb-storage 1-1:1.2
Nov 7 13:39:39 raspberrypi kernel: [ 126.885081] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Nov 7 13:39:39 raspberrypi kernel: [ 126.897924] usbcore: registered new interface driver cdc_acm
Nov 7 13:39:39 raspberrypi kernel: [ 126.897939] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
Nov 7 13:39:40 raspberrypi kernel: [ 127.227046] random: crng init done
Nov 7 13:39:40 raspberrypi kernel: [ 127.841156] scsi 0:0:0:0: Direct-Access ATMEL Mass Storage MSD 0.01 PQ: 0 ANSI: 6
Nov 7 13:39:40 raspberrypi kernel: [ 127.847971] sd 0:0:0:0: [sda] 728832 512-byte logical blocks: (373 MB/356 MiB)
Nov 7 13:39:40 raspberrypi kernel: [ 127.848837] sd 0:0:0:0: [sda] Write Protect is off
Nov 7 13:39:40 raspberrypi kernel: [ 127.873403] sd 0:0:0:0: [sda] Attached SCSI removable disk
Nov 7 13:39:40 raspberrypi kernel: [ 127.895118] sd 0:0:0:0: Attached scsi generic sg0 type 0
从这个输出我确定磁盘位于 /dev/sda 但我不确定无效的最大数据包行意味着什么。
当我尝试安装时:
raspberrypi:~$ sudo mount /dev/sda /media/usb-drive/
mount: wrong fs type, bad option, bad superblock on /dev/sda, missing codepage or helper program, or other error
In some cases useful info is found in syslog - try dmesg | tail or so.
所以我运行 dmesg:
raspberrypi:~$ dmesg | tail
[1034.801104] F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0xffffffff)
[1034.801108] F2FS-fs (sda): Can't find valid F2FS filesystem in 2th superblock
[1108.115588] F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0xffffffff)
[1108.115606] F2FS-fs (sda): Can't find valid F2FS filesystem in 1th superblock
然后,按照其他故障排除帖子的建议运行了一系列命令。
raspberrypi:~$ sudo parted /dev/sda -l
Error: /dev/sda: unrecognised disk label
Model: ATMEL Mass Storage MSD (scsi)
Disk /dev/sda: 373MB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
我不确定无法识别的磁盘标签是什么意思。
raspberrypi:~$ sudo file -sL /dev/sda
/dev/sda: ISO-8859 text, with very long lines, with no line terminators
这是否意味着我可以使用 dd 将整个磁盘复制为一个文件,然后用 python 脚本解析它?
raspberrypi:~$ sudo fdisk /dev/sda -l
Disk /dev/sda: 355.9 MiB, 373161984 bytes, 728832 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
更多信息...
raspberrypi:~$ sudo lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
mmcblk0
|-mmcblk0p2 ext4 673b8ab6-6426-474b-87d3-71bff0fcebc3 /
`-mmcblk0p1 vfat boot 109A-9113 /boot
...
raspberrypi:~$ sudo strings -a /dev/sda | head -n 40
<ZioPatch>
<Device SerialNumber="NNNNNNNNNN" FW="0005" HW="0004"></Device>
<Layout PageSize="2048" ControlBlockSize="128" Endian="Little" BitOrder="LS">
</Layout>
<PatientData SampleRateHz="199.805" ADCmin="-1.50" ADCmax="1.50" SampleBits="10" PacketSizeBytes="5" ButtonPressResolutionMS="320" LeadOffResolutionMS="640"></PatientData>
<Control>
<!-- every page -->
<DiagsArea Size="20"></DiagsArea>
<AGCGainArea Size="1"></AGCGainArea>
<AccelerometerArea Size="32"></AccelerometerArea>
<ExtraArea Size="19"></ExtraArea>
<FWversionArea Size="4"></FWversionArea>
<ECCArea Size="2"></ECCArea>
<!--impedance values array of int16-->
<ImpedanceLevelArea Size="30"></ImpedanceLevelArea>
<RealTimeClockArea Size="6"></RealTimeClockArea><!--24 hour clock-->
<BatteryLevelArea Size="2"></BatteryLevelArea>
<!--least significant bit corresponds to the last sample-->
<DigitalGainArea Size="4"></DigitalGainArea>
<ButtonPressBitsArea Size="4"></ButtonPressBitsArea>
<PageSeqNumberArea Size="4"></PageSeqNumberArea>
</Control>
</ZioPatch>
17091870B27FB400000027
Rec Length--
&irQ
fm^7
aXj
`XF!
E=KS
6uT< q
`h"
%I:E
v]'1
f%!2
ein^
r\w%
t]7U
u]GM
u]WU
最后一个看起来很有希望,但不确定我的探索下一步应该是什么。