# /site/etc/devd/jhs.conf by jhs@@@berklix. # As checked 2011_09_16 # Supercedes /site/etc/usbd.conf # Periodicaly installed by /site/etc/Makefile to # /home/jhs/public_html/src/bsd/fixes/FreeBSD/src/jhs/etc/devd/jhs.conf # http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/jhs/etc/devd/jhs.conf # New syntax in stable & current not in 8.2-rel: usbconfig -d X.Y dump_device_desc # See Also: # man 5 usbd.conf # For a USB descriptor dump: # /usr/ports/sysutils/udesc_dump and "man ugen" # Bug: My /usr/src/etc/usbd.conf has a few devices I havent copied yet. # Bug: # This sometimes mounts multiple discs on wrong points # I suspect a race order problem, # solution till fixed is to plug discs on one at a time. # Bug: # All occurences of $device-name below will fail for any device seen # after a previous physical device that has multiple logical devices. # eg a 35in1 card reader or Integral stick, would screw any subsequent # device. # Caution: # Best do: cd /etc/devd ; ln -s ../../site/etc/devd/jhs.conf # Not cd /etc ; ln -s ../site/etc/devd # else devd will read every file in /site/etc/devd. # Man devd.conf: # `0` is lowest priority. If two statements match the same # event, only the action of the statement with highest priority # will be executed. # Fsck: # I call eg fsck -t ufs /devusb/something because otherwise it can not # figure wjat its FS type is, whereas in /dev it can, as it modifies the # name & probes the modified name for a label. # ----------------------------------------------------------------------------- # Old Public Notes To Add to defunct man usbd.conf # - Power Ratings on all devices # 7.* usbdevs -v # 8.0 usbconfig dump_device_desc # USB spec: <= 500 mA # - When debugging: # - Kill usbd manually (it does not yet # store its pid in /var/run/usbd.pid) # - Run & kill a "usbd -d -v" to flush system of any # possible last USB events latched by kernel, unprocessed by # a running usbd. Then run again: "usbd -d -v" # - devname entries are mostly unused, as only reported on attach, # not detach, so detach fails to be called if devname is specified. # - If you specify more than one attach or detach, only the last is run. # No longer true, ive got my 60G mounting both. # - Hashes as comment line delimeter: # - Are acceptable with some restrictions. # - Do not have to be on left margin. # - Lines do not break entries (unlike in Makefiles). # - Trailing after code cause errors. # - http://www.interfacebus.com/Design_Connector_USB.html # - Slow 10K - 100 K # - Full 500K - 10M # - High 25M-400M 45 ohm to ground # - 1.5 Mbit/s UTP cable 3 metre Human Devices as keyboards, mice, buttons # - Speeds in Meg bits/s: Low=1.5, Full=12, Hi=480, Super 4800 # - USB1= 12 Mbit/s 1.5 M bytes/s (less protocol) STP cable 5 metre. # - USB2=480 Mbit/s 60 M bytes/s (less protocol) # - USB3 4.8 Gbit/s. 400 MByte/s or more after protocol overhead. # http://en.wikipedia.org/wiki/Usb3#USB_3.0 # - Timings observed in Mbyte/sec, using dd if=/dev/zero bs=100k: # 6: host=laps 7.0, using cardbus adaptor, & all of {my 60M USB # external 3.5" " disk, Freecom 3.5" " disk, & gj@ 60G disc box # with firewire & USB sockets}. # 22.5M: Host=fire,Internal USB port, Hub=slim USB2.0, gj@ disk. # 24.5M: internal disk host=laps # 52: host=fire amd64 6.2 SATA internal disk # - Someone using FreeBSD-8-Current Apr 2009: # if=/dev/da0 of=/dev/null bs=64k # 10864546 bytes/sec. # - Writing to Clipman, via Belkin 0.5 Mbyte/Sec = 4 Mbit/sec. # - http://www.usb.org/developers/usb20/ # - http://www.usb.org/developers/docs/ # - usbd does Not accept SIGHUP to reread this file ! # - MOUNT & UNMOUNT # - Umount: should be done by amd, not by detach, as detach crashes # system. (after detach there is no device to umount). # - I tried using mount -r but system still crashes sometime after # removing device, so now I mount writable which is more convenient. # - I havent tried mount -o sync # ohci: USB1 OHCI v1.0 compliant controllers including:, # AcerLabs M5237 (Aladdin-V), AMD-756, OPTi 82C861 (FireLink), # NEC uPD 9210, CMD Tech 670 (USB0670), CMD Tech 673 (USB0673), # NVIDIA nForce3 # uhci: USB1 UHCI v1.1 compliant controllers including: # Intel 82371AB/EB (PIIX4), Intel 82371SB (PIIX3), VIA 83C572 # ehci: USB2 gj@ said 2004.12 not stable. # -o noatime is to save wear on sticks # rec. by "Jonas Lund" # PROBLEMS # - Cannot use $device-name & assume eg # umass0 -> da0 & umass1 -> da1 because # umass0 may be external DVD writer whic goes to cd[01], & # umass1 may be a floppy going to da0 # - If DVD is plugged in at boot, it gets cd0, & the internal atapi # gets cd1, but if DVD get plugged in after boot, the cd0 & 1 # ordering is opposite. # Temporary solution: Only use 1 device of type umass at a time. # Later SOLUTION: # - man scsi camcontrol re. da0 numeric name allocation. # - or explore man devd. # ----------------------------------------------------------------------------- # My trick using eg: # action "mount /dev/`echo $device-name|sed -e s/umass/da/`s1a /usb/disk2" # won''t always work, if eg: # host has scsi disks. # using an 8 or 9 to 1 multi card adapter wih multiple da[x] on one umass. # ----------------------------------------------------------------------------- # Private Notes Of Interest only to jhs@@@berklix # - To read & config later: # http://www.freebsd.org/releases/5.3R/hardware-i386.html#CAMERA # http://localhost/www/en/releases/5.3R/hardware-i386.html#CAMERA # Port Physical Mapping for jhs@ Hosts # Host usbdevs -ves Physical # film uhub1 Inner # film uhub1 Outer # fire uhub4 port 1 main-moard, near ether, inward to middle # fire uhub4 port 2 main-moard, near ether, side # fire uhub4 port 3 main-moard, near PS2, side # fire uhub4 port 4 main-moard, near PS2, inward to middle # fire uhub4 port 5 pci-board, lower, side # fire uhub4 port 6 pci-board, lower, inward to middle # fire uhub4 port 7 pci-board, top, inward to middle # fire uhub4 port 8 pci-board, top, side # laps usb0 port 1 Rear, inward to middle, not corner # laps usb0 port 2 Rear, corner # laps usb1 port 1 Left side # laps usb1 port 2 Synaptics cPad # laps usb2 port 1 ? # laps usb2 port 2 ? # laps usb3 port 1 OHCI Pcmcia Berklin USB2 Rear # laps usb3 port 2 OHCI Pcmcia Berklin USB2 # laps usb3 port 3 OHCI Pcmcia Berklin USB2 # laps usb4 port 1 OHCI Pcmcia Berklin USB2 Front # laps usb4 port 2 OHCI Pcmcia Berklin USB2 # laps usb5 port 1 EHCI Pcmcia Berklin USB2 # laps usb5 port 2 EHCI Pcmcia Berklin USB2 # laps usb5 port 3 EHCI Pcmcia Berklin USB2 # laps usb5 port 4 EHCI Pcmcia Berklin USB2 # laps usb5 port 5 EHCI Pcmcia Berklin USB2 # MS-XP lists 3 controllers: 2482, 2484, 2487 # ============================================================================= # attach 1000 { # media-type "uscanner0" ; # action "touch /tmp/devd-debug-media-type_scanner0" ; # }; # detach 1000 { # media-type "uscanner0" ; # action "rm -f /tmp/devd-debug-media-type_scanner0" ; # }; # attach 1000 { # device-name "uscanner0" ; # action "touch /tmp/devd-debug-device-name_scanner0" ; # }; # detach 1000 { # device-name "uscanner0" ; # action "rm -f /tmp/devd-debug-device-name_scanner0" ; # }; # ----------------------------------------------------------------------------- attach 1000 { # JHS scanner from JES 2009.09 # match "device-name" "uscanner0" ; match "vendor" "0x04b8" ; match "product" "0x011d" ; match "devclass" "0xff" ; match "devsubclass" "0x00" ; match "intclass" "0xff" ; match "intsubclass" "0x00" ; match "release" "0x0100" ; action "chmod 666 /dev/$device-name" ; } ; detach 1000 { # JHS scanner from JES 2009.09 # match "device-name" "uscanner0" ; match "vendor" "0x04b8" ; match "product" "0x011d" ; match "devclass" "0xff" ; match "devsubclass" "0x00" ; match "intclass" "0xff" ; match "intsubclass" "0x00" ; match "release" "0x0100" ; } ; # ============================================================================= attach 1000 { # "JHS: Hub Zediworks" # device-name match "vendor" "0x0409" ; match "product" "0x0058" ; match "devclass" "0x09" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "touch /tmp/devd-debug-usb_hub_zediworks" ; # Hub, Zediworks, USB 2.0, 4 PORT, Bought at Croydon computer fair. # "USB2.0 Hub Controller, NEC Corporation, class 9/0, rev 2.00/1.00," # uhub4: on uhub3 # uhub4: single transaction translator # uhub4: 4 ports with 0 removable, self powered # Current into unpowered hub, with no devs on hub: # Powered Belkin Cardbus Adaptor alone not in laptop PC: # Hub=Zediworks: 0.19 A # Belkin Cardbus Adaptor in PC: # Unpowered Belkin: 0A # Powered Belkin: # Hub=Zediworks: 0.29 A }; detach 1000 { # "JHS: Hub Zediworks" # device-name match "vendor" "0x0409" ; match "product" "0x0058" ; match "devclass" "0x09" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "rm -f /tmp/devd-debug-usb_hub_zediworks" ; }; # ----------------------------------------------------------------------------- attach 1000 { # "JHS: Hub MBO Slim" # device-name match "vendor" "0x04b4" ; match "product" "0x6560" ; match "devclass" "0x09" ; match "devsubclass" "0x00" ; match "release" "0x0008" ; action "touch /tmp/devd-debug-usb_hub_slimMBO" ; # Cypress Semiconductor, class 9/0, rev 2.00/0.08, addr 2 # From gj@ Looks same physically as Zediworks, different paint job. }; attach 1000 { # "JHS: Hub MBO Slim" # device-name match "vendor" "0x04b4" ; match "product" "0x6560" ; match "devclass" "0x09" ; match "devsubclass" "0x00" ; match "release" "0x0008" ; action "rm -f /tmp/devd-debug-usb_hub_slimMBO" ; }; # ----------------------------------------------------------------------------- attach 1000 { # Hub=Slim match "vendor" "0x05e3" ; match "product" "0x0660" ; match "devclass" "0x09" ; match "devsubclass" "0x00" ; match "release" "0x0507" ; action "touch /tmp/devd-debug-usb_hub_slim5e3" ; }; detach 1000 { # Hub=Slim match "vendor" "0x05e3" ; match "product" "0x0660" ; match "devclass" "0x09" ; match "devsubclass" "0x00" ; match "release" "0x0507" ; action "rm -f /tmp/devd-debug-usb_hub_slim5e3" ; }; # USB2.0 Hub, class 9/0, rev 2.00/5.07 # uhub4: single transaction translator # uhub4: 4 ports with 4 removable, self powered # Current into unpowered hub, with no devs on hub: # Powered Belkin Cardbus Adaptor alone not in laptop PC: # Hub=Slim: 0.01 A # Belkin Cardbus Adaptor in PC: # Unpowered Belkin: 0A # Powered Belkin: # Hub=Slim 0.16 A # ----------------------------------------------------------------------------- attach 1000 { # "JHS: Hub Belkin USB-1, Big." # device-name match "vendor" "0x04cc" ; match "product" "0x1122" ; match "devclass" "0x09" ; match "devsubclass" "0x00" ; match "release" "0x0110" ; # Not seen by host=laps unless powered. action "touch /tmp/devd-debug-usb_hub_belkin1" ; }; detach 1000 { # "JHS: Hub Belkin USB-1, Big." # device-name match "vendor" "0x04cc" ; match "product" "0x1122" ; match "devclass" "0x09" ; match "devsubclass" "0x00" ; match "release" "0x0110" ; action "rm -f /tmp/devd-debug-usb_hub_belkin1" ; }; # ============================================================================= # This physical device creates 4 logical devices of name /dev/da[0-9] # If an SD/MMC card is in top right slot, with an msdosfs file systems on it, # the 3rd of the 4 logical devices eg /dev/da3, will also have eg /dev/da3s1. # The attach rule below targets that SD card /dev/da2s1. # If Frank''s FujiFilm XD Picture Card H 1GB is in top slot left of centre, # da[0-3] + da1s1 get created. # The attach rule below does not target that XD card /dev/da1s1. # If this physical device creates its 4 logical devices before other # physical devices are seen, it will likely screw their mounting. attach 1000 { # "JHS: 35in1 Hama USB2.0 card reader from ew@" # device-name "umass[0-9]+" ; match "vendor" "0x05e3" ; match "product" "0x070e" ; match "release" "0x9601" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # match "sernum" "000000009601" ; action "sleep 2; \ rm -f /devusb/card35; \ ln -s /dev/da`echo $device-name 2 + p|sed -e s/umass// | dc`s1 \ /devusb/card35; \ fsck -y -t msdosfs /devusb/card35; \ mkdir /usb/card35; chmod 777 /usb/card35; \ mount -t msdosfs /devusb/card35 /usb/card35" ; }; detach 1000 { # "JHS: 35in1 Hama USB2.0 card reader from ew@" match "vendor" "0x05e3" ; match "product" "0x070e" ; match "release" "0x9601" ; action "rmdir /usb/card35; rm -f /devusb/card35" ; # hope something else has already unmounted. }; # ----------------------------------------------------------------------------- # "chmod 777" is needed after "mkdir" for "mount -t msdosfs" as otherwise # one can not write sub directories as msdosfs doesnt allow per directory # permissions unlike UFS. # ----------------------------------------------------------------------------- # Assume this will also allocate 3rd of 4 slots for SD card. # But I have not tested it. attach 1000 { # "JHS: 15in1 USB2.0 Card Reader (pas@''s)" # device-name "umass[0-9]+" ; match "vendor" "0x0aec" ; match "product" "0x3260" ; match "release" "0x0100" ; action "sleep 2; \ rm -f /devusb/card15; \ ln -s /dev/da`echo $device-name 2 + p|sed -e s/umass// | dc`s1 \ /devusb/card15; \ fsck -y -t msdosfs /devusb/card15; \ mkdir /usb/card15 ; chmod 777 /usb/card15 ; \ mount -t msdosfs /devusb/card15 /usb/card15" ; # JJLATER When next with pas@: # plug in, look in /var/log/messages if Rev 1.* or 2.* }; detach 1000 { # "JHS: 15in1 USB2.0 Card Reader (pas@''s)" match "vendor" "0x0aec" ; match "product" "0x3260" ; match "release" "0x0100" ; action "rmdir /usb/card15 ; rm -f /devusb/card15" ; # hope something else has already unmounted. }; # ----------------------------------------------------------------------------- # Assume this will also allocate 3rd of 4 slots for SD card. # But I have not tested it. attach 1000 { #"Card Reader, 4 port at jes@ 2007.04, does jhs@ camera memory" # device-name match "vendor" "0x0aec" ; match "product" "0x3260" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x018a" ; action "sleep 2; \ rm -f /devusb/cardjoy; \ ln -s /dev/da`echo $device-name 2 + p|sed -e s/umass// | dc`s1 \ /devusb/cardjoy; \ fsck -y -t msdosfs /devusb/cardjoy; \ mkdir /usb/cardjoy ; chmod 777 /usb/cardjoy ; \ mount -t msdosfs /devusb/cardjoy /usb/cardjoy" ; }; detach 1000 { # "Card Reader, 4 port at joy 2007.04, does jhs@ camera memory" match "vendor" "0x0aec" ; match "product" "0x3260" ; match "release" "0x018a" ; action "rmdir /usb/cardjoy ; rm -f /devusb/cardjoy" ; # hope something else has already unmounted. }; # ============================================================================= # Univadis.de multi card reader. Gift give away from msd.de. # With a cards in bottom left SM slot it creates: # /dev/da0 /dev/da1 /dev/da2 /dev/da2s1 /dev/da3 # also add an SD card in bottom right, it creates # /dev/da0 /dev/da0s1 /dev/da1 /dev/da2 /dev/da2s1 /dev/da3 # & one can mount both at once, eg: # mkdir /mnt/da0s1 /mnt/da2s1 # mount -t msdosfs /dev/da0s1 /mnt/da0s1 # mount -t msdosfs /dev/da2s1 /mnt/da2s1 attach 1000 { # match "vendor" "0x058f" ; match "product" "0x6362" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0127" ; # match "sernum" "058F312D81B" ; # match "intclass" "0x08" ; # match "intsubclass" "0x06" ; # The next action sequence assumes no other umass connected. # But even with that assumption, it still does not work properly, # as eg there may be between 0 & 4 of umass[0-3] # (depending if a memory chip in slot) to be allocated to /dev/da[0-3] # action "sleep 2; \ # rm -f /devusb/unicard.`echo $device-name|sed -e s/umass//`; \ # rmdir /usb/unicard.`echo $device-name|sed -e s/umass//` ; \ # ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 \ # /devusb/unicard.`echo $device-name|sed -e s/umass//` ; \ # mkdir /usb/unicard.`echo $device-name|sed -e s/umass//` ; \ # chmod 777 /usb/unicard.`echo $device-name|sed -e s/umass//` ;\ # test -e /dev/`echo $device-name|sed -e s/umass/da/`s1 \ # && ( fsck -y -t msdosfs \ # /devusb/unicard.`echo $device-name|sed -e s/umass//` && \ # mount -t msdosfs \ # /devusb/unicard.`echo $device-name|sed -e s/umass//` \ # /usb/unicard.`echo $device-name|sed -e s/umass//` ) " ; }; detach 1000 { # match "vendor" "0x058f" ; match "product" "0x6362" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0127" ; # match "sernum" "058F312D81B" ; # match "intclass" "0x08" ; # match "intsubclass" "0x06" ; action "rmdir /usb/unicard ; rm -f /devusb/unicard" ; # hope something else has already unmounted. } ; # ============================================================================= # usbdevs -v: power 100 mA attach 1000 { # "JHS: SanDisk Cruzer Adapter" # device-name "umass[0-9]+" ; match "vendor" "0x0781" ; match "product" "0x8888" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "sleep 2; \ rm -f /devusb/cruzer; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 /devusb/cruzer; \ fsck -y -t msdosfs /devusb/cruzer; \ mkdir /usb/cruzer ; chmod 777 /usb/cruzer ; \ mount -t msdosfs /devusb/cruzer /usb/cruzer" ; }; # Maybe the first mount is just a dummy to force it to see the slices ? # SD Memory Cards - device names: umass* da0:umass-sim0:0:0:0 # Cruzer, SanDisk Corp, rev 1.10/1.00 # Host=fire console reports 40.000MB/s transfers detach 1000 { # "JHS: SanDisk Cruzer Adapter" # device-name "umass[0-9]+" ; match "vendor" "0x0781" ; match "product" "0x8888" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; # If AMD or human has not already unmounted it is too late now, # so do not try. action "rmdir /usb/cruzer ; rm -f /devusb/cruzer" ; # hope something else has already unmounted. }; # ----------------------------------------------------------------------------- attach 1000 { # "JHS : pas@ purple stick 2008.08" # device-name "umass[0-9]+" ; match "vendor" "0x0ea0" ; match "product" "0x2168" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; # match "intclass" "0x08" ; # match "intsubclass" "0x06" ; match "release" "0x0200" ; action "sleep 2; \ rm -f /devusb/purple; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 /devusb/purple; \ fsck -y -t msdosfs /devusb/purple; \ mkdir /usb/purple ; chmod 777 /usb/purple ; \ mount -t msdosfs /devusb/purple /usb/purple" ; }; detach 1000 { # "PAS Purple" # device-name "umass[0-9]+" ; match "vendor" "0x0ea0" ; match "product" "0x2168" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0200" ; action "rmdir /usb/purple ; rm -f /devusb/purple" ; # hope something else has already unmounted. }; # ----------------------------------------------------------------------------- # Yellow plastic from pound shop Ramsgate attach 1000 { # "JHS: Yellow" # device-name "umass[0-9]+" ; match "vendor" "0x14cd" ; match "product" "0x6700" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0201" ; action "sleep 2; \ rm -f /devusb/yellow; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 /devusb/yellow; \ fsck -y -t msdosfs /devusb/yellow; \ mkdir /usb/yellow ; chmod 777 /usb/yellow ; \ mount -t msdosfs /devusb/yellow /usb/yellow" ; }; detach 1000 { # "JHS: Yellow" # device-name "umass[0-9]+" ; match "vendor" "0x14cd" ; match "product" "0x6700" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0201" ; action "rmdir /usb/yellow ; rm -f /devusb/yellow" ; # hope something else has already unmounted. }; # ============================================================================= # Warning TomTom are not using differentiating Product Codes ! # So I specify serial number - Ugh ! # ----------------------------------------------------------------------------- # If PC powers up after tomtom, TomTom One does not notice PC, until cable # is disconnected then reconnected, then it asks if it should connect. # --- # TomTom One does not connect until its screen its touched to confirm. # Until that happens, devd creates no /dev/da[0-9]. attach 1000 { # "JHS: GPS for Car TomTom One - new, light, slim grey chassis" match "vendor" "0x1390" ; match "product" "0x0001" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "intclass" "0x08" ; match "intsubclass" "0x06" ; match "release" "0x0001" ; match "sernum" "Y24297C01161" ; match "device-name" "umass" ; action "sleep 2; \ rm -f /devusb/tomtom1; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/` /devusb/tomtom1;\ mkdir /usb/tomtom1 ; chmod 777 /usb/tomtom1 ; \ mount -r -t msdosfs /devusb/tomtom1 /usb/tomtom1" ; }; detach 1000 { # "JHS: GPS for Car TomTom One - new, light, slim grey chassis" match "vendor" "0x1390" ; match "product" "0x0001" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; # match "sernum" "Y24297C01161" ; Not reported on detach. match "release" "0x0001" ; match "intclass" "0x08" ; match "intsubclass" "0x06" ; match "device-name" "umass" ; action "rmdir /usb/tomtom1 ; rm -f /devusb/tomtom1" ; # hope something else has already unmounted. }; # ============================================================================= attach 1000 { # "JHS: GPS for Car TomTom 700 - old, heavy, black chassis" # device-name match "vendor" "0x1390" ; match "product" "0x0001" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0200" ; # match "sernum" "AA8075371733" ; # My serial above, jes@ will have another serial number. # So dont specify so I can mount any. match "intclass" "0x08" ; match "intsubclass" "0x06" ; match "device-name" "umass" ; action "sleep 2; \ rm -f /devusb/tomtom700; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/` /devusb/tomtom700; \ sleep 6 ; \ mkdir /usb/tomtom700 ; chmod 777 /usb/tomtom700 ; \ mount -r -t msdosfs /devusb/tomtom700 /usb/tomtom700" ; # sleep 6 was added 28.04.2009 because on 7.1-RELEASE host=laps, # /dev/da[0-9] does not get created immediately. # 4 worked OK but I made it 6 for safety margin. # One can see the TomTom 700 screen flashing an image # (flat black disk maybe ?) during connect. }; # No fsck, & mount read only, as probably a live device! # usbd -d -v: # /dev/da0 isnt seen by FreeBSD until I turn on TomTom power button. # dd if=/dev/da0 of=/usr1/tomtom.da0 gives size: 2070786048 # Then dd froze for a while & file didnt grow bigger, but screen stopped # flashing. # Note 2 gig should be 2147483648 # Then it started flashing & growing again. # final 2500485120 # 4883760+0 records in & out # 2500485120 bytes / 3781.476143 secs (661246 bytes/sec) # Above using Belkin cardbus/usb2 adapter which hangs a lot. # 2009.04.09 log: # { # I connected via reliable USB1 internal, # (not Belkin USB2 Cardbus that hangs # periodically & might confuse diagnosis) # mount -t msdosfs -r /dev/da1 /mnt ; df: # Filesystem Size Used Avail Capacity Mounted on # /dev/da1 2.5G 1.4G 1.1G 57% /mnt # } detach 1000 { # "JHS: GPS for Car TomTom 700" # device-name match "vendor" "0x1390" ; match "product" "0x0001" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0200" ; # match "sernum" "AA8075371733" # wont show on detach match "intclass" "0x08" ; match "intsubclass" "0x06" ; match "device-name" "umass" ; action "rmdir /usb/tomtom700 ; rm -f /devusb/tomtom700" ; # hope something else has already unmounted. }; # ============================================================================= # FLASH MEMORY STICKS # From: Eric Anderson # Date: Sat, 20 Aug 2005 21:44:18 -0500 (Sun 04:44 CEST) # To: "M. Warner Losh" # Cc: freebsd-hackers@@@freebsd.org, hselasky@@@c2i.net # I''ve been using 64mb compact flash cards (rated at 100k writes) in # about 100 Soekris boxes (running FreeBSD) for about 4 years, and # they are all still working, except for one. Now, most compact flash # cards are rated at 1 million writes. # ---------------------------------------------------------------------------- attach 1000 { # "JHS: Memory Stick - 256 M - Celldisk DOS mk@ personal" # device-name "umass[0-9]+" ; match "vendor" "0x08ec" ; match "product" "0x0834" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "sleep 2; \ rm -f /devusb/celldisk; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 /devusb/celldisk;\ fsck -y -t msdosfs /devusb/celldisk; \ mkdir /usb/celldisk ; chmod 777 /usb/celldisk ; \ mount -t msdosfs /devusb/celldisk /usb/celldisk" ; }; # power 100 mA, config 1, CellDisk(0x0834), IOCELL(0x08ec) # dc: 268435456 # 1024 1024 256 * * p # host=lapd usb1: dd if=/dev/da0 of=celldisk.host=lapd 499712+0 records # 255852544 bytes / 7081.042984 secs (36132 bytes/sec) # dd if=/dev/da2 of=/dev/null 499712+0 records detach 1000 { # "JHS: Memory Stick - 256 M - Celldisk" # device-name "umass[0-9]+" ; match "vendor" "0x08ec" ; match "product" "0x0834" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "rmdir /usb/celldisk ; rm -f /devusb/celldisk" ; # hope something else has already unmounted. }; #------------------------------------------------------------------------------ attach 1000 { #"JHS: Memory Stick - 128 M - SMI" # device-name "umass[0-9]+" ; match "vendor" "0x090c" ; match "product" "0x1000" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x1100" ; action "sleep 2; \ rm -f /devusb/januvia; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 /devusb/januvia; \ fsck -y -t msdosfs /devusb/januvia; \ mkdir /usb/januvia ; chmod 777 /usb/januvia ; \ mount -t msdosfs /devusb/januvia /usb/januvia" ; }; # Promotional stick from MSD with Januvia written on it. # Now with either mk@ or pas@ # "USB DISK, SMI Corporation" # 246784+0 records 126353408 bytes in 187 secs (675365 bytes/sec) # dd if=/dev/da3 of=/dev/null 246784+0 records detach 1000 { # "JHS: Memory Stick - 128 M - SMI" # device-name "umass[0-9]+" ; match "vendor" "0x090c" ; match "product" "0x1000" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x1100" ; action "rmdir /usb/januvia ; rm -f /devusb/januvia" ; # hope something else has already unmounted. }; #------------------------------------------------------------------------------ # xs dd if=/dev/zero of=/dev/da0 1001473+0 records in 1001472+0 records out # 512753664 bytes transferred in 1988.462674 secs (257864 bytes/sec) attach 1000 { # "Memory Stick - 512 M - Kingston - DOS to Marguerite" # device-name "umass[0-9]+" ; match "vendor" "0x0930" ; match "product" "0x6533" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; # action "sleep 2; \ # rm -f /devusb/kingston; \ # ln -s /dev/`echo $device-name|sed -e s/umass/da/`a \ # /devusb/kingston; \ # fsck -y -t ufs /devusb/kingston; \ # mkdir /usb/kingston ; \ # mount -t ufs -o noatime /devusb/kingston /usb/kingston" ; action "sleep 2; \ rm -f /devusb/kingston; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 \ /devusb/kingston; \ fsck -y -t msdosfs /devusb/kingston; \ mkdir /usb/kingston ; \ mount -t msdosfs /devusb/kingston /usb/kingston" ; }; # 100 mA, config 1, USB Flash Memory # dc: 536870912 # 1024 1024 512 * * p # host=laps via belkin usb2: dd if=/dev/da0 of=kingston.512M.da0 # 432464384 bytes / 973.256263 secs (444348 bytes/sec) # host=laps usb1: dd if=/dev/da0 of=kingston.host=laps.usb1 # 412200960 # host=lapd usb1: dd if=/dev/da0 of=kingston.host=lapd.usb1 # FAILS SHORT detach 1000 { # "JHS: Memory Stick - 512 M - Kingston" # device-name "umass[0-9]+" ; match "vendor" "0x0930" ; match "product" "0x6533" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "rmdir /usb/kingston ; rm -f /devusb/kingston" ; }; # ---------------------------------------------------------------------------- # 07.10.2009 laps: # dd if=/dev/da0 of=usr1/tmp/red.stick Saved a copy for fdisk # sysctl kern.geom.debugflags=16 # dd if=8.0-RC1-i386-memstick.img of=/dev/da0 # perfomance test, aborting after about 20 secs: # bs=512 110228 bytes/sec Aborted test # bs=1k 233153 bytes/sec Aborted test # bs=2k 489198 bytes/sec Aborted test # bs=4k 918736 bytes/sec Aborted test # bs=8k 1823585 bytes/sec Aborted test # bs=16k 1970588 bytes/sec Aborted test # bs=32k 2356145 bytes/sec 28163+1 records=922849280 # bs=64k 2565281 bytes/sec Aborted test # bs=128k 2223860 bytes/sec Aborted test # Conclusion bs of 512 is Very inefficient, use 16k or 32k # (maybe it has local cache & works at 16K ?) # date ; xs dd if=8.0-RC1-i386-memstick.img of=/dev/da0 bs=32k ; date # ----------------------------------------------------------------------------- # Bootable /pub/freebsd/ISO-IMAGES-i386/8.0/8.0-RELEASE-i386-memstick.img attach 1000 { # "JHS: Memory Stick - 2G Red DaneElec from jes@ 2009.03 - DOS" # device-name "umass[0-9]+" ; match "vendor" "0x0930" ; match "product" "0x6545" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; match "intclass" "0x08" ; match "intsubclass" "0x06" ; # match "sernum" "001D92A5F59A5B8A0F110373" ; # Not necessary action "sleep 2; rm -f /devusb/red; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`a /devusb/red; \ fsck -y -t ufs /devusb/red; \ mkdir /usb/red ; \ mount -t ufs /devusb/red /usb/red" ; }; # ----------------------------------------------------------------------------- detach 1000 { # "JHS: Memory Stick - Red DaneElec" # device-name "umass[0-9]+" ; match "vendor" "0x0930" ; match "product" "0x6545" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; match "intclass" "0x08" ; match "intsubclass" "0x06" ; # match "sernum" "001D92A5F59A5B8A0F110373" ; Not available. action "rmdir /usb/red ; rm -f /devusb/red" ; # hope something else has already unmounted. }; # ----------------------------------------------------------------------------- # The 2 Lufthansa sticks vary slight as received: # fdisk /dev/da[01] # ******* Working on device /dev/da0 ******* # parameters extracted from in-core disklabel are: # cylinders=497 heads=255 sectors/track=63 (16065 blks/cyl) # # parameters to be used for BIOS calculations are: # cylinders=497 heads=255 sectors/track=63 (16065 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 11 (0x0b),(DOS or Windows 95 with 32 bit FAT) # Stick 1: start 512, size 7988727 (3900 Meg), flag 0 Given to jes@ # Stick 2: start 1024, size 7988215 (3900 Meg), flag 0 With jhs@ # beg: cyl 0/ head 1/ sector 1; # end: cyl 497/ head 254/ sector 63 # dmesg: # da0: 3901MB (7989248 512 byte sectors: 255H 63S/T 497C) # da1: 3901MB (7989248 512 byte sectors: 255H 63S/T 497C) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - attach 1000 { # "JHS: Memory Stick - 4G Lufthansa Promotion < MK AmCham 2010.01" # device-name "umass[0-9]+" ; match "vendor" "0x1aa6" ; match "product" "0x0201" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x1000" ; match "intclass" "0x08" ; match "intsubclass" "0x06" ; match "sernum" " 30905001608871" ; # devd shows 1 space at front action "sleep 2; \ rm -f /devusb/luftjoy; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 \ /devusb/luftjoy ; \ fsck -y -t msdosfs /devusb/luftjoy ; \ mkdir /usb/luftjoy ; chmod 777 /usb/luftjoy ; \ mount -t msdosfs /devusb/luftjoy /usb/luftjoy" ; }; # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # 2011_09_16 content: # blak cd /pub/freebsd/ISO-IMAGES-amd64/8.2 ; # 1087774720 bytes # dd if=FreeBSD-8.2-RELEASE-amd64-memstick.img of=/dev/da1 # 2124560+0 records 1087774720 bytes in 182 mins (99491 bytes/sec) attach 1000 { # "JHS: Memory Stick - 4G Lufthansa Promotion < MK AmCham 2010.01" # device-name "umass[0-9]+" ; match "vendor" "0x1aa6" ; match "product" "0x0201" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x1000" ; match "intclass" "0x08" ; match "intsubclass" "0x06" ; match "sernum" " 571274229212" ; # devd shows 3 spaces at front action "sleep 2; \ rm -f /devusb/luftjulian; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`a \ /devusb/luftjulian ; \ mkdir /usb/luftjulian ; \ fsck -y -t ufs /devusb/luftjulian ; \ mount -t ufs /devusb/luftjulian /usb/luftjulian" ; }; #------------------------------------------------------------------------------ detach 1000 { # "JHS: Memory Stick - 4G Lufthansa Promotion < MK AmCham 2010.01" # device-name "umass[0-9]+" ; match "vendor" "0x1aa6" ; match "product" "0x0201" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x1000" ; match "intclass" "0x08" ; match "intsubclass" "0x06" ; match "sernum" " 30905001608871" ; # sernum is shown on 8.0-RELEASE Processing event ... type=DESTROY # But ignore sernum as I want identical action for both sticks. action "rmdir /usb/luftjoy ; rm -f /devusb/luftjoy" ; # hope something else has already unmounted. }; # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - detach 1000 { # "JHS: Memory Stick - 4G Lufthansa Promotion < MK AmCham 2010.01" # device-name "umass[0-9]+" ; match "vendor" "0x1aa6" ; match "product" "0x0201" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x1000" ; match "intclass" "0x08" ; match "intsubclass" "0x06" ; match "sernum" " 571274229212" ; # sernum is shown on 8.0-RELEASE Processing event ... type=DESTROY # But ignore sernum as I want identical action for both sticks. action "rmdir /usb/luftjulian ; rm -f /devusb/luftjulian" ; # hope something else has already unmounted. }; #============================================================================== attach 1000 { # "JHS: Memory Stick - 512 M - MyFlash" # device-name "umass[0-9]+" ; match "vendor" "0x0457" ; match "product" "0x0150" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; # action "sleep 2; touch /tmp/devd-debug-xx.$cdev ; \ # rm -f /devusb/myflash; \ # ln -s /dev/`echo $device-name|sed -e s/umass/da/`a /devusb/myflash; \ # fsck -y -t ufs /devusb/myflash; \ # mkdir /usb/myflash ; \ # mount -t ufs -o noatime /devusb/myflash /usb/myflash" ; action "sleep 2; touch /tmp/devd-debug-xx.$cdev ; \ rm -f /devusb/myflash; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`a /devusb/myflash; \ fsck -t msdosfs /devusb/myflash; \ mkdir /usb/myflash ; \ mount -t msdosfs /devusb/myflash /usb/myflash" ; }; # New DOS partition I made 2011_04_07 by: # sysctl kern.geom.debugflags=16 # fdisk -i /dev/da0 # I told it ID=6 # newfs_msdos -F 16 /dev/da0s1 # 80 mA, config 1, USB Mass Storage Device(0x0150), # USBest Technology(0x0457) # host=laps via belkin usb2: dd if=/dev/da0 of=myflash.512M.da0 # 1024000+0 records in 1024000+0 records out # 524288000 bytes / 851.107502 secs (616007 bytes/sec) # dc: 536870912 # 1024 1024 512 * * p # USB1: dd if=/dev/da0 of=/usr1/tmp/stick PENDING # USB2: dd if=/dev/da0 of=stick.host=fire 1024000+0 records # 524288000 bytes / 3079.826810 secs (170233 bytes/sec) detach 1000 { # "JHS: Memory Stick - 512 M - MyFlash" # device-name "umass[0-9]+" ; match "vendor" "0x0457" ; match "product" "0x0150" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "rmdir /usb/myflash ; rm -f /devusb/myflash" ; # hope something else has already unmounted. }; # ---------------------------------------------------------------------------- # Stick Name Integral # 2 device numbers are created when this stick is plugged in, eg: da4 & da5, # /dev/da4 # /dev/da4s1 # /dev/da4s1a # /dev/da5 # What we want: # /usbdev/integral.ufs@ -> /dev/da4s1a # /usbdev/integral.dos@ -> /dev/da5 # The attach action gets run twice, first for da4 then da5, # The first sleep 2 is normal, to ensure /dev/da* are there to be linked to. # The second sleep 10 is to ensure the 2nd iteration with da5 is gone # before unlocking. # (I'm not sure if kernel & devd etc guarantee order of da4 then da5, # vut I expect it will mostly work. attach 1000 { #"JHS: Memory Stick - 1 Gig - Integral - Unlocked" # device-name "umass[0-9]+" ; match "vendor" "0x0d7d" ; match "product" "0x1620" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "\ if [ \! -e /devusb/integral.lock ]; then \ \ rm -f /devusb/integral.dos /devusb/integral.ufs; \ mkdir /usb/integral.dos; chmod 777 /usb/integral.dos; \ mkdir /usb/integral.ufs ; \ sleep 2; \ ln -s /dev/da`echo $device-name|sed -e s/umass//`s1a \ /devusb/integral.ufs; \ ln -s /dev/da`echo $device-name 1 + p |sed -e s/umass//|dc` \ /devusb/integral.dos; \ fsck -y -t msdosfs /devusb/integral.dos; \ mount -t msdosfs /devusb/integral.dos /usb/integral.dos ; \ fsck -y -t ufs /devusb/integral.ufs; \ mount -o noatime -t ufs /devusb/integral.ufs /usb/integral.ufs ; \ sleep 10 ; \ rm /devusb/integral.lock ; \ \ fi" ; }; detach 1000 { # "JHS: Memory Stick - 1 Gig - Integral - Unlocked" # device-name "umass[0-9]+" ; match "vendor" "0x0d7d" ; match "product" "0x1620" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "rmdir /usb/integral.dos /usb/integral.ufs ; \ rm -f /devusb/integral.ufs \ /devusb/integral.dos /devusb/integral.lock " ; # hope something else has already unmounted. }; # Sleep is needed on host=laps. # Only works on host=laps, not host=fire, fire has # an external CD umass device so numbering gets messed up. # power 200 mA, config 1, USB DISK Pro # dc 1073741824 # 1024 1024 1024 * * p # host=laps via belkin usb2: dd if=/dev/da0 of=integral.1g.da0 # 1000448+0 recs = 512229376 bytes / 809.536057 secs (632744 bytes/sec) # Stick lockable, when unlocked it appears with # /dev/da0 /dev/da0s1 (978MB) & /dev/da1 (1M). # fdisk da0 # parameters extracted from in-core bsdlabel are: # cylinders=978 heads=64 sectors/track=32 (2048 blks/cyl) # parameters to be used for BIOS calculations are: # cylinders=978 heads=64 sectors/track=32 (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 6 (0x06),(Primary 'big' DOS (>= 32MB)) # start 32, size 2003936 (978 Meg), flag 80 (active) # beg: cyl 0/ head 1/ sector 1; # end: cyl 841/ head 15/ sector 32 # When unlocked it appears with just /dev/da0, dd if=/dev/da0 \ # of=/dev/null 2880 records 1474560 bytes (682835 bytes/sec) # fdisk da0 # ******* Working on device /dev/da0 ******* # parameters extracted from in-core bsdlabel are: # cylinders=1 heads=64 sectors/track=32 (2048 blks/cyl) # parameters to be used for BIOS calculations are: # cylinders=1 heads=64 sectors/track=32 (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 105 (0x69),(unknown) # start 1869771365, size 168689522 (82367 Meg), flag ff # beg: cyl 68/ head 13/ sector 10; # end: cyl 288/ head 115/ sector 43 # The data for partition 2 is: # sysid 115 (0x73),(unknown) # start 1701519481, size 1869881465 (913028 Meg), flag 50 # beg: cyl 371/ head 114/ sector 37; # end: cyl 366/ head 32/ sector 33 # The data for partition 3 is: # sysid 116 (0x74),(unknown) # start 2573, size 0 (0 Meg), flag 20 # beg: cyl 371/ head 114/ sector 37; # end: cyl 372/ head 97/ sector 50 # The data for partition 4 is: # sysid 0 (0000),(unused) # start 0, size 3435113472 (1677301 Meg), flag 0 # beg: cyl 0/ head 0/ sector 0; # end: cyl 0/ head 0/ sector 0 # I have created a quirk table entry for this: /sys/cam/scsi/scsi_da.c # After I converted this from DOS to a BSD partition, # 6.2 now sees: /dev/da0 /dev/da0s1 /dev/da0s1a # /dev/da0s1c /dev/da0s1cs4 /dev/da1 # Host=fire console reports 40.000MB/s transfers # dmesg: 978MB (2003968 512 byte sectors: 64H 32S/T 978C) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # There was a problem, test again later: # xs fsck -y -t ufs /dev/da0s1a # ** /dev/da0s1a # ** Last Mounted on /usb/integral.ufs # ** Phase 1 - Check Blocks and Sizes # ** Phase 2 - Check Pathnames # # CANNOT READ BLK: 38672 # CONTINUE? yes # # THE FOLLOWING DISK SECTORS COULD NOT BE READ: # ** Phase 3 - Check Connectivity # ** Phase 4 - Check Reference Counts # ** Phase 5 - Check Cyl groups # 35969 files, 433290 used, 49889 free (753 frags, 6142 blocks, 0.2% fragmentation) # ----------------------------------------------------------------------------- # Light brown wood effect stick labelled HSM, MK received 2009.03.19, 1 Gig. # This stick lies: # The end of it is write only memory ! # It lets one write the last chunck, # It even lets one read that last chunk, # but the content of the last chunck is all zeroes. # Proven by # http://www.berklix.com/~jhs/src/bsd/jhs/bin/public/testblock/testblock.c # Discovered by chance, while checking a backup on a UFS # file system on a gbde partition. # Stick was given to mk@ in Munich as part of a promotional bundle. # (so no access to more sticks to see if same fault) # Outside of stick is marked www.hsm.eu # but they are doubtless just some firm buying the sticks in as a promotion # Came with a strange Fdisk/MBR allocation. of 3 or 4 slices. # dmesg laps (internal USB-1 Interface): # umass0: Get Max Lun not supported (STALLED) # da0: Removable Direct Access SCSI-2 device # da0: 1010MB (2068480 512 byte sectors: 64H 32S/T 1010C) # end: cyl 1009/ head 63/ sector 32 # bsdlabel -r -w da0 auto # a: 2068464 16 unused 0 0 # c: 2068480 0 unused 0 0 # testblock -I -b 512 /dev/da0a # Wrote 0 bytes after previous 1059053568 (2068464 * 512). # Error after 1032314880 previously read; Byte read 0x0 # dc: # 2016240 512 * p 1032314880 # 2068464 512 * p 1059053568 # 2068480 512 * p 1059061760 # bsdlabel -r -e da0 # # a: 2068464 16 unused 0 0 # 2016240 Good + 52224 Bad # c: 2068480 0 unused 0 0 # "raw" # d: 2016240 16 unused 0 0 # Good # e: 52224 2016256 unused 0 0 # Bad, Zeroes # testblock -I -v -b 512 -r /dev/da0d # OK # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Create Encrypted FS: # gbde init /dev/da0d -i # /sector_size s/.../2048/ # gbde attach /dev/da0d # newfs -U /dev/da0d.bde # gbde detach /dev/da0d # /dev/da0d.bde disapears. # Unplug & replug # umass0 has unknown media type # tunefs -m 0 -o space -n disable /devusb/brown.bde # -n disable" soft updates off while I'm experimenting. # mount -t ufs -o noatime /devusb/brown.bde /usb/brown.ufs # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - attach 1000 { # "JHS: Brown" device-name "umass[0-9]+" ; match "vendor" "0x0000" ; # Manufacturer didnt register ? match "product" "0x7777" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0101" ; match "sernum" "B55E32FD" ; match "intclass" "0x08" ; match "intsubclass" "0x06" ; action "touch /tmp/devd-debug-usb_brown" ; action "sleep 4; \ rm -f /devusb/brown /devusb/brown.ufs /devusb/brown.bde ; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/` \ /devusb/brown ; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`d \ /devusb/brown.ufs ; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`d.bde \ /devusb/brown.bde ; \ gbde attach /dev/da`echo $device-name|sed -e s/umass//`d \ -p `cat /home/jhs/.DOTS/.passwd/gbde/jhs`; \ fsck -y -t ufs /devusb/brown.bde ; \ mkdir /usb/brown.ufs ; \ mount -t ufs -o noatime /devusb/brown.bde /usb/brown.ufs" ; }; detach 1000 { # "JHS: Brown" # device-name "umass[0-9]+" ; match "vendor" "0x0000" ; match "product" "0x7777" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0101" ; match "intclass" "0x08" ; match "intsubclass" "0x06" ; # match "sernum" "B55E32FD" ; # not on detach. action "gbde detach /dev/`echo $device-name|sed -e s/umass/da/`d ; \ rmdir /usb/brown.ufs ; \ rm -f /devusb/brown /devusb/brown.ufs /devusb/brown.bde" ; # hope something else has already umount /usb/brow # hope something else has already gbde detach md0 }; # ---------------------------------------------------------------------------- # Picture Frame/ Viewer sold by Rossman. 20 Euro Dec. 2010 # German leaflet lists: # Manufacturer # http://www.tucantec.de # Useless web site just a flash page. # Model DPF 259706 attach 1000 { match "vendor" "0x1dbd" ; match "product" "0x302b" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; # match "sernum" "000000000000" ; match "release" "0x0215" ; action "sleep 2; \ rm -f /devusb/viewer; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/` /devusb/viewer ; \ fsck -y -t msdosfs /devusb/viewer ; \ mkdir /usb/viewer ; chmod 777 /usb/viewer ; \ mount -t msdosfs /devusb/viewer /usb/viewer" ; }; detach 1000 { match "vendor" "0x1dbd" ; match "product" "0x302b" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; # match "sernum" "000000000000" ; match "release" "0x0215" ; action "rmdir /usb/viewer ; rm -f /devusb/viewer" ; # hope something else has already unmounted. }; # mount -r msdosfs -r /dev/da1 /mnt # ls -l /mnt # drwxr-xr-x 1 root wheel 2048 Jan 1 1980 ./ # -rwxr-xr-x 1 root wheel 20 Jan 1 2000 setup_config.data* # Filesystem 1K-blocks Used Avail Capacity Mounted on # /dev/da1 245806 6 245800 0% /mnt # ------------ # xs mount -t msdosfs -r /dev/da0 /mnt0 # Fails if no SD card in. # auto recognised # ------------ # Experiment on ordering # laps/usb/viewer/hadrian (cd ~/pics/xxx ; tar cf - ) | tar xf - # ------------ # laps/usb/viewer/sorted !fo # foreach i ( `cd ~/pics/dates/2010_06_08_5_hadrians_wall; # echo *` ) # cp ~/pics/dates/2010_06_08_5_hadrians_wall/$i . # sleep 4 # end # ------------ # laps/usb/viewer/reverse foreach i # ( `cd ~/pics/dates/2010_06_08_5_hadrians_wall; # /bin/ls -1 | sort -r`) # cp ~/pics/dates/2010_06_08_5_hadrians_wall/$i . # sleep 4 # end # Result: # Its a dumb viewer, as expected, just like the `dir` # command in MSDOS since time immemorial, it diplays # the pictures in the order the handles (MS parlance) # or file descriptors (Unix parlance) were created # in in directory, Not in an alpha-numeric sorted # order of names. So after you've eg edited a few # files with eg xv etc, perhaps to change portratit # & landscape etc, & maybe delete some files & copied # in some pics from another photographer etc, & renamed # files in order you want, WHile it will look fine # on Unix, As MSDOS is so dumb (& so still is Mickesoft # & much junk based on it), you can't safely just # copy to a mounted msdodfs file system with back to # back tar. Instead you need to explicitly sort then # copy each file one by one into a new empty directory. # ============================================================================ # 2 x Sandisk 2G # Julian's 1st stick as in use years prior to 2011.04: # /var/log/messages:1909MB (3911679 512 byte sectors: 255H 63S/T 243C) # fdisk: # cylinders=243 heads=255 sectors/track=63 (16065 blks/cyl) # sysid 6 (0x06),(Primary DOS, 16 bit FAT (>= 32MB)) # start 63, size 16002 (7 Meg), flag 0 # beg: cyl 0/ head 1/ sector 1; # end: cyl 0/ head 254/ sector 63 # The data for partition 2 is: # sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) # start 16065, size 3887730 (1898 Meg), flag 80 (active) # beg: cyl 1/ head 0/ sector 1; # end: cyl 242/ head 254/ sector 63 # Joy's Sandisk stick given to julian 2011_04_24 # /var/log/messages:1909MB (3911679 512 byte sectors: 255H 63S/T 243C) # Arrived from Joy with fdisk showing: # cylinders=243 heads=255 sectors/track=63 (16065 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 6 (0x06),(Primary DOS, 16 bit FAT (>= 32MB)) # start 129, size 3910911 (1909 Meg), flag 0 # beg: cyl 0/ head 2/ sector 4; # end: cyl 969/ head 63/ sector 63 # I ran: # fdisk -B -i -u -v /dev/da0 # id 6 # start 63 yes # size 16002 # id 165 # start 16065 # size 3887730 # newfs_msdos -F 16 -c 2 /dev/da0s1 # gbde init /dev/da0s2 -i # sector_size = 2048 # gbde attach /dev/da0s2; newfs -U /dev/da0s2.bde # ---------------------------------------------------------------------------- # dmesf: 1909MB (3911679 512 byte sectors: 255H 63S/T 243C) attach 1000 { # "JHS: Memory Stick - 2 Gig SanDisk - UFS Backup" # device-name "umass[0-9]+" ; match "vendor" "0x0781" ; match "product" "0x5151" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0010" ; match "intclass" "0x08" ; match "intsubclass" "0x06" ; match "sernum" "2004452871050E227E10" ; # My one Died: "sernum" "2004431840050E227A6C" action "sleep 4; \ rm -f /devusb/sanjoy.dos /devusb/sanjoy.bde \ /devusb/sanjoy.name ; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 \ /devusb/sanjoy.dos ; \ fsck -y -t msdosfs /devusb/sanjoy.dos ; \ mkdir /usb/sanjoy.dos ; chmod 777 /usb/sanjoy.dos ; \ mount -t msdosfs /devusb/sanjoy.dos /usb/sanjoy.dos ; \ echo /dev/'$device-name's2|sed -e s/umass/da/ > \ /devusb/sanjoy.name ; \ gbde attach `cat /devusb/sanjoy.name` \ -p `cat /home/jhs/.DOTS/.passwd/gbde/jhs`; \ ln -s `cat /devusb/sanjoy.name`.bde /devusb/sanjoy.bde ; \ fsck -y -t ufs /devusb/sanjoy.bde ; \ mkdir /usb/sanjoy.ufs ; \ mount -t ufs -o noatime /devusb/sanjoy.bde /usb/sanjoy.ufs" ; }; # If mount fails: fsck -b 160 /devusb/sanjoy.bde # power 100 mA # 3911679+0 records = 2002779648 bytes # Damn slow when doing rdist backup, but only 1/3 slower than integral # when doing large raw dd: # dd if=/dev/zero of=/usb/integral/junk (4302944 bytes/sec) # dd if=/dev/zero of=/usb/sandisk/junk (3700233 bytes/sec) # time rdist 2sandisk 1.277u 2.391s 29:00.93 0.2% 78+1267k 3+0io 0pf+0w # time rdist 2integral 1.193u 2.364s 2:56.36 2.0% 87+1417k 32+0io 0pf+0w # ---------------------------------------------------------------------------- detach 1000 { # "JHS: Memory Stick - 2 Gig SanDisk - UFS Backup" # device-name "umass[0-9]+" ; match "vendor" "0x0781" ; match "product" "0x5151" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; }; #============================================================================== # Joy has 2 of these sticks & will give one to Phillip # 2011_09_16 dmesg reports: # da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 # da0: Removable Direct Access SCSI-2 device # da0: 40.000MB/s transfers # da0: 953MB (1952768 512 byte sectors: 64H 32S/T 953C) # 2011_09_16 fdisk /dev/da0 reports: # cylinders=953 heads=64 sectors/track=32 (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 6 (0x06),(Primary DOS, 16 bit FAT (>= 32MB)) # start 128, size 1952640 (953 Meg), flag 0 # beg: cyl 0/ head 2/ sector 3; # end: cyl 968/ head 20/ sector 20 # 2011_09_16 content: # host=blak, front top socket # cd /pub/freebsd/ISO-IMAGES-i386/8.2 ; # bytes: 958617600 # dd if=FreeBSD-8.2-RELEASE-i386-memstick.img of=/dev/da0 # 1872300+0 records 958617600 bytes in 88 mins (180132 bytes/sec) attach 1000 {# Joy's 1G # Kingston DataTraveler stick given to julian 2011_04_24 match "vendor" "0x0951" ; match "product" "0x1603" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "sernum" "00100000000000000000038E" ; match "release" "0x0200" ; # match "intclass" "0x08" ; # match "interface" "0" ; # match "intsubclass" "0x06" ; action "sleep 2 ; \ rm -f /devusb/traveler ; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 /devusb/traveler;\ fsck -y -t msdosfs /devusb/traveler ; \ mkdir /usb/traveler ; chmod 777 /usb/traveler ; \ mount -t msdosfs /devusb/traveler /usb/traveler" ; }; detach 1000 { # "JHS: Memory Stick - ZOGI 2G < MSD" # device-name "umass[0-9]+" ; match "vendor" "0x0951" ; match "product" "0x1603" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0200" ; action "rmdir /usb/traveler ; rm -f /devusb/traveler" ; # hope something else has already unmounted. }; #============================================================================== attach 1000 { # "JHS: Memory Stick - ZOGI 2G < MSD" Being glued. match "vendor" "0x058f" ; match "product" "0x6387" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "sernum" "47F0CAFA" ; match "release" "0x0103" ; action "sleep 2; \ rm -f /devusb/zogi; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 /devusb/zogi;\ fsck -y -t msdosfs /devusb/zogi; \ mkdir /usb/zogi ; chmod 777 /usb/zogi ; \ mount -t msdosfs /devusb/zogi /usb/zogi" ; }; # Mounted as msdosfs: # date ; xs testblock -v bla ; date Block size 61440 11 mins # date ; xs time testblock -v -b 512 bla ; date 52 min # date ; xs time testblock -v -b 1k bla ; date 15 min # date ; xs time testblock -v -b 2k bla ; date 12 min # date ; xs time testblock -v -b 8k bla ; date 13 min detach 1000 { # "JHS: Memory Stick - ZOGI 2G < MSD" # device-name "umass[0-9]+" ; match "vendor" "0x058f" ; match "product" "0x6387" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; # match "sernum" "47F0CAFA" ; match "release" "0x0103" ; action "rmdir /usb/zogi ; rm -f /devusb/zogi" ; # hope something else has already unmounted. }; #============================================================================== # Stick showed only /dev/da0, no da0s1. # /var/log/messages: # da0: Serial Number 67843FC2 # da0: 40.000MB/s transfers # da0: 4038MB (8269824 512 byte sectors: 255H 63S/T 514C) # fdisk: # cylinders=514 heads=255 sectors/track=63 (16065 blks/cyl) # Warning: BIOS sector numbering starts with sector 1 # Information from DOS bootblock is: # The data for partition 1 is: # sysid 105 (0x69),(unknown) # beg: cyl 68/ head 13/ sector 10; # end: cyl 288/ head 115/ sector 43 # The data for partition 2 is: # sysid 115 (0x73),(unknown) # start 1701519481, size 1869881465 (913028 Meg), flag 50 # beg: cyl 371/ head 114/ sector 37; # end: cyl 366/ head 32/ sector 33 # end: cyl 0/ head 0/ sector 0 # So I zeroed all partitions with # xs fdisk -i /dev/da0 # Plugged into MS-Acer which formatted it to # cylinders=514 heads=255 sectors/track=63 (16065 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 11 (0x0b),(DOS or Windows 95 with 32 bit FAT) # start 63, size 8257347 (4031 Meg), flag 80 (active) # beg: cyl 0/ head 1/ sector 1; # end: cyl 513/ head 254/ sector 63 attach 1000 { # JHS: Stick M bought from Mueller 2011.01 match "vendor" "0x058f" ; match "product" "0x6387" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "intclass" "0x08" ; # match "interface" "0" ; # match "intsubclass" "0x06" ; match "release" "0x0103" ; # match "sernum" "67843FC2" ; action "sleep 5 ; \ rm -f /devusb/mueller ; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 /devusb/mueller; \ mkdir /usb/mueller ; chmod 777 /usb/mueller ; \ mount -t msdosfs /devusb/mueller /usb/mueller" ; }; detach 1000 { # JHS: Stick M bought from Mueller 2011.01 match "vendor" "0x058f" ; match "product" "0x6387" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "intclass" "0x08" ; # match "interface" "0" ; # match "intsubclass" "0x06" ; match "release" "0x0103" ; # hope something else has already umount /usb/mueller action "rmdir /usb/mueller ; rm -f /devusb/mueller" ; }; #============================================================================== # Sandisk 8G bought @ Conrad Tue 24 Feb 2009 # As received: # fdisk /dev/da0 # cylinders=977 heads=255 sectors/track=63 (16065 blks/cyl) # Warning: BIOS sector numbering starts with sector 1 # Information from DOS bootblock is: # The data for partition 1 is: # sysid 11 (0x0b),(DOS or Windows 95 with 32 bit FAT) # start 44, size 15679396 (7655 Meg), flag 0 # beg: cyl 0/ head 0/ sector 45; # end: cyl 975/ head 254/ sector 63 # The data for partition 2, 3, 4 is: # # 44 + 15679396 = 15679436 # --------- # As I reconfigured: # dmesg: da0: 7667MB (15704063 512 byte sectors: 255H 63S/T 977C) # Determination of sizes; # F1:1.5 G, aligned to cylinder # /pub/freebsd/ISO-IMAGES-i386/8.0/8.0-RELEASE-i386-memstick.img 923 Meg # Allow 1.5G for future expansion. # F2: Rest of stick, aligned to cylinder # F3: remnant, not aligned # ------------------------------------------ # The data for partition 1 is: # sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) # start 63, size 2988027 (1458 Meg), flag 80 (active) # beg: cyl 0/ head 1/ sector 1; # end: cyl 185/ head 254/ sector 63 # The data for partition 2 is: # sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) # start 2988090, size 12707415 (6204 Meg), flag 0 # beg: cyl 186/ head 0/ sector 1; # end: cyl 976/ head 254/ sector 63 # The data for partition 3 is: # sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) # start 15695505, size 8558 (4 Meg), flag 0 # beg: cyl 977/ head 137/ sector 54; # end: cyl 978/ head 18/ sector 43 # As checked 2011_09_16 # ------------------------------------------ # bsdlabel -r -w -B /dev/da0s2 # bsdlabel -e /dev/da0s2 # 4.2BSD # newfs /dev/da0s2a # mount -o noatime -t ufs /dev/da0s2a /mnt ; cd /mnt # date; testblock -v -w -n junk; date # if=/usr1/tmp/8.0-RELEASE-i386-memstick.img # of=/dev/da0s1 bs=64k conv=sync # bsdlabel -r -w -B /dev/da0s3 # bsdlabel -e /dev/da0s3 # 4.2BSD # newfs /dev/da0s3a # ------------------------------------------ attach 1000 { # device-name "umass[0-9]+" ; match "vendor" "0x0781" ; match "product" "0x5406" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0200" ; action "sleep 4; \ rm -f /devusb/sanblack.img /devusb/sanblack.ufs ; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1a \ /devusb/sanblack.img ; \ fsck -y -t ufs /devusb/sanblack.img ; \ mkdir /usb/sanblack.img ; \ mount -t ufs /devusb/sanblack.img /usb/sanblack.img ; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s2a \ /devusb/sanblack.ufs ; \ fsck -y -t ufs /devusb/sanblack.ufs ; \ mkdir /usb/sanblack.ufs ; \ mount -t ufs /devusb/sanblack.ufs /usb/sanblack.ufs" ; }; detach 1000 { # device-name "umass[0-9]+" ; match "vendor" "0x0781" ; match "product" "0x5406" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0200" ; action "rmdir /usb/sanblack.img /usb/sanblack.ufs ; \ rm -f /devusb/sanblack.img /devusb/sanblack.ufs" ; # hope something else has already unmounted. }; #============================================================================== # "JHS: Memory Stick - 2 Gig Sony - Many Defunct **" # match "vendor" "0x1043" ; # match "product" "0x8012" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # match "release" "0x0100" ; # da0: Removable Direct Access SCSI-2 device # da0: 1.000MB/s transfers # da0: 2038MB (4173824 512 byte sectors: 255H 63S/T 259C) # usbd -d -v -v : power 100 mA, config 1 # dc 2147483648 # 1024 1024 1024 2 * * * p # USB1: dd if=/dev/da0 of=/usr1/tmp/stick PENDING # USB2: 2138177536 pas@ stick, not my stick # jes@: 2130018304 jes@ stick, bytes free on the DOS FS. # JHS: 2136997888 = 4173824 x 512 Stick wont r. or w. # JES did get money back from the guy at the Croydon computer fair. # .jpg of bill dated 2/4/2006 # for 4 x 55 pound = 220. # No VAT marked ! # Stapled on, a business card # P 0870 80 30 231 # E sales@mantisonline.co.uk # W www.mantis-online.co.uk # No other info like human name, company name, address, tax reg no. # Just a mobile phone number ! # 2010.11.04 web: Asiatic character set. # whois mantis-online.co.uk: # Domain name: # mantis-online.co.uk # Registrant: # VALUE DOMAIN # Trading as: # VALUE-DOMAIN COM # Registrant type: # UK Individual # Registrant's address: # Honmachi TS Bld. 6F Bakurou-machi 4-7-5, Chuo-ku # Osaka-fu # Osaka-shi # 541-0059 # Japan # Registrar: # eNom, Inc. [Tag = ENOM] # URL: http://www.enom.com # Relevant dates: # Registered on: 28-Aug-2008 # Renewal date: 28-Aug-2012 # Last updated: 09-Sep-2010 # Registration status: # Registered until renewal date. # Name servers: # ns1.priceseo.com # ns2.priceseo.com # Bought at a computer Sunday 'flea' market in Croydon England, # in retrospect I wonder if manufacturer Sony might have withdrawn them # from sale, marked the batch for destruction, & possibly some criminal # 'liberated' them for resale again ? # # (Such things do happen, eg In Germany years back, pre USB # era, CT Mag reported reported Betruger/Placebo cache chips. # They were just ceramic with no silicon in, it was reported # importers (in Munich I think) were afraid to sue chinese # exporters, fear of Triads! maybe last bit was speculation, # but wan't My speculation, I read it, whatever, can't remember # more now) #============================================================================== # 4G Rossman mp3 player "MP X30 V Multimedia Player" # Garantiekarte "ODYS X30V/ EAN 4260087125126" # Sernum: Both Melanie's & Julian's report same serial number. # Vendor: Paper manual says Odys.de # /usr/share/misc/usbdevs says vendor 0x10d6= ACTIONS. # This creates 2 /dev/da[0-9] entries, da0 is internal, # da1 presumably external micro SD card, but manual says only up to 2G # & my card is 4G so I can not test. # J & M: # FW: CD514K40m_V3.1 # Date: 2010/08/04 # Core: 9.5.54 # Date: 2008/09/05 # Serial on case & cardboard: # J: 3708012301397 # M: 3708012301350 attach 1000 { # # device-name "umass[0-9]+" ; match "vendor" "0x10d6" ; # Actions match "product" "0x1101" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; match "sernum" "4512482adf0fe" ; # match "intclass" "0x08" ; # match "intsubclass" "0x05" ; action "sleep 5 ; \ rm -f /devusb/mp3 /devusb/mp3.ext ; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/` /devusb/mp3 ; \ ln -s /dev/da`echo $device-name 1 + n | sed -e s/umass// | dc` \ /devusb/mp3.ext ; \ mkdir /usb/mp3 /usb/mp3.ext ; \ chmod 777 /usb/mp3 /usb/mp3.ext ; \ mount -t msdosfs /devusb/mp3 /usb/mp3" ; }; # JJLATER some code seems to run twice ? # First I see: /devusb/mp3@ -> /dev/ugen5.4 # Then /devusb/mp3 -> /dev/da1 # JJLATER if I buy a 2G microSD mount -t msdosfs /devusb/mp3.ext /usb/mp3.ext detach 1000 { # # device-name "umass[0-9]+" ; match "vendor" "0x10d6" ; match "product" "0x1101" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; # match "sernum" "4512482adf0fe" ; # match "intclass" "0x08" ; # match "intsubclass" "0x05" ; action "rmdir /usb/mp3 ; rm -f /devusb/mp3 /devusb/mp3.ext" ; }; #============================================================================== # Snippet from 8.2-RELEASE//var/db/pkg/sane-backends-1.0.21_2/+DISPLAY # attach 100 { # device-name "ugen[0-9].[0-9]"; # match "vendor" "0x04b8"; # match "product" "0x080e"; # action "usb_devaddr=`echo $device-name | sed 's#^ugen##'` && \ # chown cups:saned /dev/usb/${usb_devaddr}.* && \ # chmod 660 /dev/usb/${usb_devaddr}.*"; # }; # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # I probably dont need the above, but my numbers are from # xs sane-find-scanner -q # From graphics/sane-backends # found USB scanner (vendor=0x03f0 [HP], product=0x8711 # [Deskjet 2050 J510 series]) at libusb:/dev/usb:/dev/ugen1.2 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # attach 100 { # device-name "ugen[0-9].[0-9]"; # match "vendor" "0x03f0" ; # match "product" "0x8711" ; # action "usb_devaddr=`echo $device-name | sed 's#^ugen##'` && \ # chown cups:saned /dev/usb/${usb_devaddr}.* && \ # chmod 660 /dev/usb/${usb_devaddr}.*" ; # }; # ---------------------------------------------------------------------------- # fdisk /dev/da0 # cylinders=1011 heads=255 sectors/track=63 (16065 blks/cyl) # sysid 11 (0x0b),(DOS or Windows 95 with 32 bit FAT) # start 8192, size 16236544 (7928 Meg), flag 0 # beg: cyl 0/ head 130/ sector 3; # end: cyl 1011/ head 47/ sector 60 # timing test on host=blak # cd /usb/dlock.dos ; dd if=/dev/zero of=junk bs=100k # 41944+0 records 4294963200 bytes (6885200 bytes/sec) =55 M bit/s # 4013875200 Aug 5 12:39 junk2 6912332 bytes/sec attach 1000 { # "JHS: Memory Stick - 8G Dlock from Virginie & Roman # device-name "umass[0-9]+" ; match "vendor" "0x05e3" ; match "product" "0x0727" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0250" ; match "sernum" "000000000250" ; # match "intclass" "0x08" ; # match "interface" "0" ; # match "intprotocol" "0x50" ; # match "intsubclass" "0x06" ; action "sleep 4; \ rm -f /devusb/dlock.dos /devusb/dlock.bde /devusb/dlock.name ; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 \ /devusb/dlock.dos ; \ fsck -y -t msdosfs /devusb/dlock.dos ; \ mkdir /usb/dlock.dos ; chmod 777 /usb/dlock.dos ; \ mount -t msdosfs /devusb/dlock.dos /usb/dlock.dos" ; # echo /dev/'$device-name's2|sed -e s/umass/da/ > \ # /devusb/dlock.name ; \ # gbde attach `cat /devusb/dlock.name` \ # -p `cat /home/jhs/.DOTS/.passwd/gbde/jhs`; \ # ln -s `cat /devusb/dlock.name`.bde /devusb/dlock.bde ; \ # fsck -y -t ufs /devusb/dlock.bde ; \ # mkdir /usb/dlock.ufs ; \ # mount -t ufs -o noatime /devusb/dlock.bde /usb/dlock.ufs ; \ # }; # If mount fails: fsck -b 160 /devusb/dlock.bde detach 1000 { # "JHS: Memory Stick - 8G from Virginie & Roman # device-name "umass[0-9]+" ; match "vendor" "0x05e3" ; match "product" "0x0727" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0250" ; # match "sernum" "000000000250" ; # match "intclass" "0x08" ; # match "interface" "0" ; # match "intprotocol" "0x50" ; # match "intsubclass" "0x06" ; action "\ umount -f /usb/dlock.dos ; \ rm -f /devusb/dlock.dos ; \ " ; # umount -f /usb/dlock.ufs ; \ # gbde detach `cat /devusb/dlock.name` ; \ # rmdir /usb/dlock.dos /usb/dlock.ufs ; \ # rm -f /devusb/dlock.dos /devusb/dlock.name ; \ # # Hope something else has already unmounted. # Even if the action statement is empty, something crashes the system, # I think gbde detach needs to be run manually before unplugging. }; # If mount fails: fsck -b 160 /devusb/dlock #============================================================================== attach 1000 { # "JHS: MP3 Player - X4-Tech Clipman" # device-name "umass[0-9]+" ; match "vendor" "0x10d6" ; # Actions match "product" "0x1100" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "sleep 30; \ rm -f /devusb/clipman; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/` /devusb/clipman; \ mkdir /usb/clipman ; chmod 777 /usb/clipman ; \ mount -t msdosfs /devusb/clipman /usb/clipman" ; }; # Give it a real long sleep, cos devd is very slow to create the /dev/da* # especially if processor is also fscking a hard disc. # http://www.berklix.com/~jhs/txt/clipman/#usbd.conf # "USB 2.0 (FS) FLASH DISK" # FSCK: # Omit fsck -t msdosfs /dev/`echo $device-name|sed -e s/umass/da/` # as this is a live device with a processor & may get confused. # devname doesnt get reported on detach. # Manual says only format as FAT or FAT32 not as NTFS. detach 1000 { # "JHS: MP3 Player - X4-Tech Clipman" # device-name "umass[0-9]+" ; match "vendor" "0x10d6" ; match "product" "0x1100" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "rmdir /usb/clipman ; rm -f /devusb/clipman" ; # hope something else has already unmounted. }; # ============================================================================= attach 1000 { # "JHS: MP3 Player - MSD Univadis - Sigmatel" # http://www.berklix.com/~jhs/txt/univadis/ # A more meaningful name for the world would be Sigmatel # As that seems to be chipset designer, but mine has word # univadis written on so is easier to remember localy. # match "device-name" "umass[0-9]+" ; match "vendor" "0x066f" ; match "product" "0x8000" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; # match "intclass" "0x08" ; # match "intsubclass" "0x06" ; match "release" "0x1001" ; action "sleep 10; \ rm -f /devusb/univadis; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 /devusb/univadis; \ mkdir /usb/univadis ; chmod 777 /usb/univadis ; \ mount -t msdosfs -o longnames /devusb/univadis /usb/univadis" ; }; detach 1000 { # "JHS: MP3 Player - MSD Univadis" # match "device-name" "umass[0-9]+" ; match "vendor" "0x066f" ; match "product" "0x8000" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; # match "intclass" "0x08" ; # match "intsubclass" "0x06" ; match "release" "0x1001" ; action "rmdir /usb/univadis ; rm -f /devusb/univadis" ; # hope something else has already unmounted. }; # ============================================================================= attach 1000 { # "JHS: gj@''s Music Back Up Disc, 77 Gig" # device-name "umass[0-9]+" ; match "vendor" "0x04b4" ; match "product" "0x6830" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0420" ; action "sleep 3; \ bsdlabel /dev/`echo $device-name|sed -e s/umass/da/`c; \ rm -f /devusb/gary77; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1a /devusb/gary77; \ fsck -p -t ufs /devusb/gary77; \ mkdir /usb/gary77 ; \ mount -r -o noatime -t ufs /devusb/gary77 /usb/gary77" ; }; # Cypress AT2LP RC42 detach 1000 { # "JHS: gj@''s Music Back Up Disc, 77 Gig" # device-name "umass[0-9]+" ; match "vendor" "0x04b4" ; match "product" "0x6830" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0420" ; action "rmdir /usb/gary77 ; rm -f /devusb/gary77" ; # hope something else has already unmounted. }; # ----------------------------------------------------------------------------- # "JHS: gj@''s 60G SAMSUNG MP0603H 0811 57M 40.000MB/s transfers Box with USB2 & Firewire" attach 1000 { # device-name "umass[0-9]+" ; match "vendor" "0x05e3" ; match "product" "0x0702" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0033" ; # match "intclass" "0x08" ; # match "intsubclass" "0x06" ; action "sleep 3; \ bsdlabel /dev/`echo $device-name|sed -e s/umass/da/`c; \ rm -f /devusb/gary60; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1a /devusb/gary60; \ fsck -p -t ufs /devusb/gary60; \ mkdir /usb/gary60 ; \ mount -o noatime -t ufs /devusb/gary60 /usb/gary60" ; }; detach 1000 { # device-name "umass[0-9]+" ; match "vendor" "0x05e3" ; match "product" "0x0702" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0033" ; # match "intclass" "0x08" ; # match "intsubclass" "0x06" ; action "rmdir /usb/gary60 ; rm -f /devusb/gary60" ; # hope something else has already unmounted. }; # ----------------------------------------------------------------------------- attach 1000 { # "JHS: pas@''s (Ex jes@ 2006.11) Western 80G" # device-name "umass[0-9]+" ; match "vendor" "0x1058" ; match "product" "0x0404" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0602" ; action "sleep 3; \ rm -f /devusb/western; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 /devusb/western; \ fsck -n -t msdosfs /devusb/western; \ mkdir /usb/western ; chmod 777 /usb/western ; \ mount -r -t msdosfs /devusb/western /usb/western" ; # No fsck -y as pas@ }; detach 1000 { # "JHS: pas@''s (Ex jes@ 2006.11) Western 80G" # device-name "umass[0-9]+" ; match "vendor" "0x1058" ; match "product" "0x0404" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0602" ; action "rmdir /usb/western ; rm -f /devusb/western" ; # hope something else has already unmounted. }; # ----------------------------------------------------------------------------- attach 1000 { # "JHS: Disc - Freecom, 120 Gig" # device-name "umass[0-9]+" ; match "vendor" "0x07ab" ; match "product" "0xfc02" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x1110" ; action "sleep 8; \ bsdlabel /dev/`echo $device-name|sed -e s/umass/da/`c; \ rm -f /devusb/freecom; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`a /devusb/freecom; \ sleep 4; fsck -y -t ufs /devusb/freecom; \ mkdir /usb/freecom ; \ mount -t ufs /devusb/freecom /usb/freecom" ; }; # I think 3 secs not long enough to spin up & dev to appear. # Problem $device-name reports umass0 is allocated for dvd-ram, # umass1 gets allocated for da0 # FREECOM USB2-IDE Controller 1.000MB/s transfers # SAMSUNG SV1204H RK10 1.000MB/s transfers, 40.000MB/s transfers # testblock -v -n took ~ 6 hours with belkin usb2 card. detach 1000 { # "JHS: Disc - Freecom, 120 Gig" # device-name "umass[0-9]+" ; match "vendor" "0x07ab" ; match "product" "0xfc02" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x1110" ; # I think 3 secs not long enough to spin up & dev to appear. action "rmdir /usb/freecom ; rm -f /devusb/freecom" ; # hope something else has already unmounted. }; # ----------------------------------------------------------------------------- # This disc has been removed from enclosure & put in host=lapo # new disc in enclosure is an ntfs from lapo #--------- # # name=disk250 250G purchased 18.03.2009 # # Paper Label says: WD2500BEVE-00W2TO LBA 488397168 5V 0.55A EIDE WD Scorpio # # www.westerndigital.com # # bsdlabel -w -r da0 auto; bsdlabel -e da0 # # To a: Add "4.2BSD 2048 16384" to become: # # a: 234441632 16 4.2BSD 2048 16384 # # c: 234441648 0 unused 0 0 # # bsdlabel -e da0 # # /dev/da0: # # 8 partitions: # # size offset fstype [fsize bsize bps/cpg] # # a: 488397152 16 4.2BSD 2048 16384 0 # # c: 488397168 0 unused 0 0 # # newfs /dev/da0a # # mount -t ufs /dev/da0a /mnt # attach 1000 { # disk250 # # device-name "umass[0-9]+" ; # match "vendor" "0x0402" ; # match "product" "0x5621" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # match "release" "0x0103" ; # # match "sernum" "sernum=00042222200000041582" ; # action "sleep 3; rm -f /devusb/disk250; \ # ln -s /dev/`echo $device-name|sed -e s/umass/da/`a /devusb/disk250; \ # fsck -y -t ufs /devusb/disk250; \ # mkdir /usb/disk250 ; \ # mount -t ufs /devusb/disk250 /usb/disk250" ; # }; # # fsck -y takes too long on a big disc with many small files, # # especially at USB-1 speed, & if plugged in at boot time, it will # # try to fix & mount before going multiuser & take maybe a week !, # # so do fsck manually after boot necessary ! # detach 1000 { # JHS: disk250 # # device-name "umass[0-9]+" ; # match "vendor" "0x0402" ; # match "product" "0x5621" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # match "release" "0x0103" ; # action "rmdir /usb/disk250 ; rm -f /devusb/disk250" ; # hope something else has already unmounted. # }; attach 1000 { # disk250 # device-name "umass[0-9]+" ; match "vendor" "0x0402" ; match "product" "0x5621" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0103" ; action "sleep 3; rm -f /devusb/disk121; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1 /devusb/disk121; \ mkdir /usb/disk121 ; chmod 777 /usb/disk121 ; \ mount -t ntfs /devusb/disk121 /usb/disk121" ; }; detach 1000 { # JHS: disk121 # device-name "umass[0-9]+" ; match "vendor" "0x0402" ; match "product" "0x5621" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0103" ; action "rmdir /usb/disk121 ; rm -f /devusb/disk121" ; # hope something else has already unmounted. }; # ----------------------------------------------------------------------------- # name=disk120 120 G laptop disc. Samsung HM120JC # bsdlabel -w -r da0 auto; bsdlabel -e da0 # To a: Add "4.2BSD 2048 16384 8" to become: # a: 234441632 16 4.2BSD 2048 16384 8 # c: 234441648 0 unused 0 0 # newfs /dev/da0a # cd /dev; /bin/ls -1 da* # da0 da0a da0c da0cs1 da0cs1c da0s1 da0s1c # Unplug; Reinsert # da0 da0a da0c da0cs1 da0cs1c da0s1 da0s1c # Mount & wait # ls -1 da* # da0 da0a da0c da0cs1 da0cs1c # da0: 114473MB (234441648 512 byte sectors: 255H 63S/T 14593C) # 2011_09_16 content: # cd /pub/freebsd/dists/current/.. ; rdist6 -f ~/xtra/Distfile dists2d120 attach 1000 { # Silver enclosure disk120 - was Toshiba internal until March 2009 # # device-name "umass[0-9]+" ; match "vendor" "0x067b" ; match "product" "0x2507" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "sleep 3; rm -f /devusb/disk120; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`a /devusb/disk120; \ fsck -y -t ufs /devusb/disk120; \ mkdir /usb/disk120 ; \ mount -t ufs /devusb/disk120 /usb/disk120" ; }; detach 1000 { # JHS: disk120 - was Toshiba internal until March 2009 # device-name "umass[0-9]+" ; match "vendor" "0x067b" ; match "product" "0x2507" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "rmdir /usb/disk120 ; rm -f /devusb/disk120" ; # hope something else has already unmounted. }; # ----------------------------------------------------------------------------- # name=disk60 Fixed Direct Access SCSI-0 device # 40.000MB/s transfers # 57231MB (117210240 512 byte sectors: 255H 63S/T 7296C) (57231MB) # Storage Device, Prolific Technology Inc.: # Toshiba MK6021GAS HDD2183 B ZE01 DC +5V 0.7A, 8.455MB # (Cyl 16383, H16, S63) 60.00 GB (LBA 117,210,240 Sectors) # Speeds: # Reading to another drive on same USB2 hub 6.3 Megabyte/sec # Reading big files with tar to /dev/null 9.4 Megabyte/sec # Writing with testblock -v -n -w -b 60K 9.3 Megabyte/sec # GJ wrote his SATA to this disc got 20 Megabyte/sec # (but on a different enclosure (chip set) & faster dual core CPU). # 40.000MB/s transfers # As this enclosure hangs the bus I leave soft updates off: tunefs -p attach 1000 { # JHS: Disk - 60 Gig, Ex Toshiba Disc # Enclosures hangs USB, blue case # device-name "umass[0-9]+" ; match "vendor" "0x058f" ; match "product" "0x6390" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; # match "intclass" "0x08" ; # match "intsubclass" "0x06" ; # match "interface" "0" ; action "touch /tmp/devd-debug-warning_bad_usb_enclosure ; \ sleep 3; rm -f /devusb/disk60; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`a \ /devusb/disk60; \ fsck -y -t ufs /devusb/disk60; \ mkdir /usb/disk60 ; \ mount -t ufs /devusb/disk60 /usb/disk60" ; }; detach 1000 { match "vendor" "0x058f" ; match "product" "0x6390" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "rmdir /usb/disk60 ; rm -f /devusb/disk60 \ /tmp/devd-debug-warning_bad_usb_enclosure" ; # hope something else has already unmounted. }; # ----------------------------------------------------------------------------- # Commented out devd thinks both disk look the same. # As this enclosure hangs the bus I leave soft updates off: tunefs -p # Paper label 5V 0.7 A # attach 1000 { # "JHS: Hard Disk 2 Gig, Enclosures hangs USB black case" # # device-name "umass[0-9]+" ; # match "vendor" "0x058f" ; # match "product" "0x6390" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # match "release" "0x0100" ; # # match "intclass" "0x08" ; # # match "intsubclass" "0x06" ; # # match "interface" "0" ; # action "touch /tmp/devd-debug-warning_bad_usb_enclosure;\ # sleep 3; rm -f /devusb/disk2; \ # ln -s /dev/`echo $device-name|sed -e s/umass/da/`s1d /devusb/disk2;\ # fsck -y -t ufs /devusb/disk2; \ # mkdir /usb/disk2 ; \ # mount -t ufs -p /devusb/disk2 /usb/disk2" ; # }; # detach 1000 { # "JHS: Disk 2 Gig" # match "vendor" "0x058f" ; # match "product" "0x6390" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # match "release" "0x0100" ; # action "rmdir /usb/disk2 ; rm -f /devusb/disk2" ; # hope something else has already unmounted. # }; # ----------------------------------------------------------------------------- # attach 1000 { # 2 identical Enclosures I JHS have, because USB hangs etc # # blue case & black case # # device-name "umass[0-9]+" ; # match "vendor" "0x058f" ; # match "product" "0x6390" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # match "release" "0x0100" ; # # match "intclass" "0x08" ; # # match "intsubclass" "0x06" ; # # match "interface" "0" ; # action "touch /tmp/devd-debug-warning_bad_usb_enclosure" ; # }; # /var/log/messages & console: # umass0: BBB reset failed, TIMEOUT # umass0: BBB bulk-in clear stall failed, IOERROR # umass0: BBB bulk-out clear stall failed, IOERROR # umass0: BBB reset failed, TIMEOUT # umass0: BBB bulk-out clear stall failed, IOERROR # umass0: BBB reset failed, TIMEOUT # g_vfs_done():da0a[WRITE(offset=65536, length=2048)]error = 5 # g_vfs_done():da0a[WRITE(offset=6144000, length=16384)]error = 5 # g_vfs_done():da0a[WRITE(offset=6160384, length=6144)]error = 5 # g_vfs_done():da0a[WRITE(offset=198229819392, length=16384)]error = 5 # ----------------------------------------------------------------------------- attach 1000 { # "JHS: jes@ 300G External 2006.11" # device-name "umass[0-9]+" ; match "vendor" "0x0bc2" ; match "product" "0x0503" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0300" ; action "sleep 3; \ rm -f /devusb/joy; \ ln -s /devusb/joy /dev/`echo $device-name|sed -e s/umass/da/`s1; \ mkdir /usb/joy ; chmod 777 /usb/joy ; \ mount -t ntfs /devusb/joy /usb/joy" ; }; # Seagate External Drive, Jabil Circuit # parameters extracted from in-core bsdlabel are: # cylinders=38913 heads=255 sectors/track=63 (16065 blks/cyl) # Figures below won''t work with BIOS for partitions not in cyl 1 # parameters to be used for BIOS calculations are: # cylinders=38913 heads=255 sectors/track=63 (16065 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 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA)) # start 63, size 625137282 (305242 Meg), flag 80 (active) # beg: cyl 0/ head 1/ sector 1; # end: cyl 0/ head 254/ sector 63 detach 1000 { # "JHS: jes@ 300G External 2006.11" # device-name "umass[0-9]+" ; match "vendor" "0x0bc2" ; match "product" "0x0503" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0300" ; action "rmdir /usb/joy ; rm -f /devusb/joy" ; # hope something else has already unmounted. }; # ============================================================================= attach 1000 { # "JHS: DVD Rewriter - LG" # device-name "umass[0-9]+" ; match "vendor" "0x152e" ; match "product" "0xe003" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0001" ; # action "sleep 2 ; mkdir /usb/dvd ; mount -t cd9660 /dev/cd1 /usb/dvd" # DVD writer, Manufacturer=LG, Model=GSA-5163D, P/N 3890H-1921A Ver. A # External - USB-2.0 & Firewire=IEEE 1394 # 16X Super Multi DVD/CD Rewriter # Tri-DVD Formats DVD+-RW / DVD-RAM # 8.5 GB DVD+R Double layer # DVD+R 16x # DVD-R 16x # DVD+RW 8x # DVD-RW 6x # DVD-RAM 5x # DVD-ROM 16x # DVD+R DL 4x # CD-R 40x # CD-RW 24x # CD-ROM 40x # Up to 4 hours of MPEG-2 video. # Software Included: # Ahead''s Recording Software ( Nero Express, InCD ) # Cyberlink''s Authoring & Playback Software # ( PowerProducer Gold, PowerDVD) # Backup Software ( Nero BackitUp ) # Key < jes@ after install on her XP [laptop?]: # ms91919999575433 19/3/05 # "Super Multi DVD Rewriter, HL-DT-ST DVDRAM GSA-5163D, rev 2.00/0.01" # Manufacturer = LG # Speed analysis: # host=laps + belkin pcmcia card with ehci driver: # /var/log/messages: cd1: 1.000MB/s transfers # dd if=vts_01_1.vob of=/dev/null # 1 gig file # host=laps external USB2 7232404 bytes/sec # host=laps internal USB1 1058483 bytes/sec # host=laps internal atapi drive 1759765 bytes/sec # host=film internal atapi drive 4575677 bytes/sec # dd if=/dev/cd1 of=/dev/null bs=2k # host=laps external USB2 644871 bytes/sec # Industry norm: # Single speed CDROM is 150 K byte/sec. # Single speed DVD is 1385 K byte/sec. # Drive paper spec for DVD-R read is 10x ie 13.85 M byte/sec # Dont know what jes@''s plain white DVD media specifies # but clearly 7.2 is far short of 13.8 # I'm not cable bandwidth limited, as # USB1=12 Mbit/s, USB2=480Mbit/sec = 60 M bytes/s # Possibly I'm USB system process limited in laptop. }; detach 1000 { # "JHS: DVD Rewriter - LG" # device-name "umass[0-9]+" ; match "vendor" "0x152e" ; match "product" "0xe003" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0001" ; # action "rmdir /usb/dvd" ; # hope something else has already unmounted. }; # ============================================================================= attach 1000 { # "JHS: DVD Dual Layer - Freecom - Black" # device-name "umass[0-9]+" ; match "vendor" "0x07ab" ; match "product" "0xfccc" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0407" ; match "sernum" "1000000000000000203BC" ; match "intclass" "0x08" ; match "intsubclass" "0x02" ; action "touch /tmp/devd-debug-dvd_dual_layer" ; }; detach 1000 { # "JHS: DVD Dual Layer - Freecom - Black" # device-name "umass[0-9]+" ; match "vendor" "0x07ab" ; match "product" "0xfccc" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0407" ; # match "sernum" "1000000000000000203BC" ; # I doubt sernum shows on detach, so commented out until I test. match "intclass" "0x08" ; match "intsubclass" "0x02" ; action "rm -f /tmp/dvd_dual_layer" ; }; # ============================================================================= attach 1000 { # "JHS: Floppy" # device-name "umass[0-9]+" ; match "vendor" "0x0644" ; match "product" "0x0000" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0000" ; action "sleep 2; \ bsdlabel `echo $device-name|sed -e s/umass/da/`; \ rm -f /devusb/floppy; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/`c \ /devusb/floppy; \ mkdir /usb/floppy ; \ mount -o noatime -t ufs /devusb/floppy /usb/floppy" ; }; detach 1000 { # "JHS: Floppy" # device-name "umass[0-9]+" ; match "vendor" "0x0644" ; match "product" "0x0000" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0000" ; action "rmdir /usb/floppy ; rm -f /devusb/floppy " ; # hope something else has already unmounted. }; # ============================================================================= # TEAC FD-05PUB, rev 1.10/0.00 da0 at umass-sim0 bus 0 target 0 lun 0 # Assume UFS format floppy. 4.10 fixit floppy has UFS on C, not A ! # bsdlabel is needed else mount fails. # ============================================================================= # "Canon Digital Camera, Canon Inc. rev 1.10/0.01" # Digital Ixus II # Also known as Power Shost SD100 I think. # rotate Swich up to blue ie viewing mode. attach 1000 { # "JHS: Camera - Canon" device-name "ugen[0-9]+" ; match "vendor" "0x04a9" ; match "product" "0x3072" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0001" ; # "sernum" None shown on connect action "echo 'You may want to try digikam or gtkam'" ; }; # xs gphoto2 --auto-detect # Shows nothing. # ============================================================================= attach 1000 { # Camera Technika Model CD-30 # Bought for ~ 8 pounds in UK/TW/Tesco 2008 # gphoto2 --auto-detect # "Che-Ez Snap SNAP-U" device-name "ugen[0-9]+" ; match "vendor" "0x2770" ; match "product" "0x905c" ; match "devclass" "0xff" ; match "devsubclass" "0xff" ; match "release" "0x0100" ; # "sernum" # Nothing reported. # action "echo 'Start digikam or gtkam'" ; action "chmod 666 /dev/$device-name /dev/$device-name.[0-3] ; \ logger 'User should call digikam'" ; # logger line goes to /var/log/messages. } ; # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - detach 1000 { # Camera Technika Model CD-30 device-name "ugen[0-9]+" ; match "vendor" "0x2770" ; match "product" "0x905c" ; match "devclass" "0xff" ; match "devsubclass" "0xff" ; match "release" "0x0100" ; action "rm -f /tmp/devd-debug-camera_technika" ; } ; # ============================================================================= # gphoto2 --auto-detect does not see it, not suprising as it is umass. # Camera "Odys SLIM5L ProII" = name on chassis attach 1000 { device-name "umass[0-9]+" ; match "vendor" "0x0595" ; match "product" "0x2002" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "intclass" "0x08" ; match "intsubclass" "0x05" ; match "release" "0x0000" ; match "sernum" "Default 1234567" ; action "logger 'should mount -t msdosfs'" ; action "sleep 2; \ rm -f /devusb/odys; \ ln -s /dev/`echo $device-name|sed -e s/umass/da/` /devusb/odys; " ; # mkdir /usb/odys ; chmod 777 /usb/odys ; # mount -t msdosfs -r /devusb/odys /usb/odys; # mount did not happen, not suprising as camera kep turning off # to save batteries. } ; # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - detach 1000 { # Camera "Odys SLIM5L ProII" = name on chassis device-name "umass[0-9]+" ; match "vendor" "0x0595" ; match "product" "0x2002" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "intclass" "0x08" ; match "intsubclass" "0x05" ; match "release" "0x0000" ; # match "sernum" "Default 1234567" ; action "logger 'should umount'" ; action "rmdir /usb/odys ; rm -f /devusb/odys" ; # hope something else has already unmounted. } ; # ============================================================================= attach 1000 { # "JHS: Mobile Phone Adapter - Sony" device-name "ugen[0-9]+" ; match "vendor" "0x054c" ; match "product" "0x0437" ; match "devclass" "0xff" ; match "devsubclass" "0x00" ; match "release" "0x0001" ; action "echo 'You may want to start xgnokii'" ; # OLD match "vendor" "0x067b" ; # OLD match "product" "0x2303" ; # OLD match "release" "0x0100" ; # PL2303 Serial adapter (ATEN/IOGEAR UC232A), Prolific Technology Inc., # rev 1.10/1.00 Manufacturer: Sony Model: QN-3USB }; # ============================================================================= attach 1000 { # "JHS: Alcatel SpeedTouch DSL Modem" device-name "ugen[0-9]+" ; match "vendor" "0x06b9" ; match "product" "0x4061" ; match "devclass" "0xff" ; match "devsubclass" "0x00" ; # match "release" "0x0400" ; action "/usr/local/sbin/modem_run -f /usr/local/libdata/mgmt.o" ; # "Speed Touch 330, THOMSON, rev 1.10/4.00" Distributor = British Telecom # ~jhs/tech/usb_dsl/ copy of doc < http://www.speedtouch.com # SpeedTouch 330 USB DSL /usr/ports/net/pppoa # http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pppoa.html # Idea for later: # device "USB ethernet" # devname "[ackr]ue[0-9]+" # action "/etc/pccard_ether $device-name start" ; # To set up ppp to dial up at startup. add to /etc/rc.conf # ppp_enable="YES" # ppp_mode="ddial" # ppp_profile="adsl" # You need to have sample ppp.conf supplied with net/pppoa port. }; # ============================================================================= # "JHS: Bluetooth USB Stick, Cambridge Silicon Radio Ltd. (pas@ < Vobis)" attach 1000 { device-name "ugen[0-9]+" ; match "vendor" "0x0a12" ; match "product" "0x0001" ; match "devclass" "0xe0" ; match "devsubclass" "0x01" ; match "release" "0x0525" ; # match "protocol" "0x0001" ; action "sleep 2; \ mkdir /usb/0/dos /usb/0/dummy ; \ chmod 777 /usb/0/dos /usb/0/dummy ; \ mount /usb/0/dummy; mount /usb/0/dos" ; # rev 1.10/5.25 # pas@ never got this working under MS. }; detach 1000 { # device-name "ugen[0-9]+" ; match "vendor" "0x0a12" ; match "product" "0x0001" ; match "devclass" "0xe0" ; match "devsubclass" "0x01" ; match "release" "0x0525" ; # match "protocol" "0x0001" ; action "rmdir /usb/0/dos /usb/0/dummy ; \ rm -f /usb/0/dummy; mount /usb/0/dos" ; # hope something else has already unmounted. }; # ============================================================================= # MICE & KEYBOARDS # External keyboard is American layout. # Toshiba internal keyboard is English & black, can''t be relabelled. # /usr/share/syscons/keymaps/ # usbd starts before xdm, xmodmap fails at boot, # but might work later, xauth permitting. # ----------------------------------------------------------------------------- attach 1000 { # "JHS: Targus AMP02EU Notebook Wireless Presenter - Mouse component" device-name "ums[0-9]+" ; match "vendor" "0x05fe" ; match "product" "0x1010" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x4101" ; action "moused -p /dev/$device-name \ -I /var/run/moused.$device-name.pid ; vidcontrol -m on" ; # device "JHS: Targus AMP02EU Notebook Wireless Presenter - keyboard component" # devname "ukbd[0-9]+" # match "vendor" "0x05fe" ; # match "product" "0x1010" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # match "release" "0x4101" ; }; # If the 2 things wont speak, you have to push the button on the tip # of the USB half, then a LED blinks inside the crack between 2 halves # of the shell, then push button on back of hand held presenter. # # Be aware if slide on front top is slid up to pointer rather than # mouse mode, if you then push top righ a laser comes out so dont # point that at eyes. # # ----------------------------------------------------------------------------- attach 1000 { # "JHS: Wireless Mouse" device-name "ums[0-9]+" ; match "vendor" "0x05fe" ; match "product" "0x0011" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0010" ; action "moused -p /dev/$device-name \ -I /var/run/moused.$device-name.pid;vidcontrol -m on" ; # Wireless mouse given jhs@ by ew@ Serial 20122103 # No Manufacturer marked on base or mouse. # Base has an extended top to fit IR hole of mouse to align electrodes. # Wireless mouse from Jim to test. Serial 20114842 # Marked "Addison Technology" on base & mouse. # I did not have his transformer to test, so used mine from # Zediworks hub. His has a bigger power socket, no compatible with mine. # Both: # Marked "RF Optical Mouse" on both # CE 0560. # Work OK on both zinc carbon & 1.2V NiCad. # LED Left Red: Power, Flashes when charging mouse. # LED Right Green: On when USB plug is in. Flashes fast when # searching mouse & when returned to base. # (On Jim''s with Nicad I also noticed if mouse was put in base # straight, red LED hard on (till charged ?), whereas if put # in off central, left or right , red LED flashed slowly.) # Mine can''t be put in out of alignement because of extra base # plastic into the IR hole of mouse. # Switch under base in position 1. (I tried position 2: # when syncing, base doesn''t hear mouse). # Jim''s base is happy to sync to my mouse & vice versa # (but they do need a resync so fortunately do not interfere). # Resync sequence (may not be official but works for me): # Plug in power & USB Green LED on continuously # Push & release button in base. Green flashes slowly (a few per sec.) # Push & release button in mouse. Green flashes fast for a second # then stays on continuously. # To activate power on mouse squeeze side buttons. # Failed Google search for manual: Addison Technology RF Optical Mouse # http://www.ciao.de/ADDISON_Technology_RF_Optical_Mouse__2199265 # http://www.addison-technology.com/ Dead # http://www.addison-technology.com/rightclick.cfm?id=509 Dead # http://www.addison-tech.com/ irrelevant cable co. # usbd reports: PS2/USB Browser Combo Mouse, Cypress Sem: }; # ----------------------------------------------------------------------------- attach 1000 { # "JHS: PS2 Mouse & Keyboard Adaptor - Buddy" # device names: ukbd0,ums1 # device-name "ums[0-9]+" ; match "vendor" "0x04b4" ; match "product" "0x8328" ; match "release" "0x0001" ; action "kbdcontrol -k /dev/kbd1 -l us.iso < /dev/console; \ /usr/local/bin/xmodmap -display :0 \ /home/jhs/.xmodmap/host=laps.init" ; #detach "kbdcontrol -k /dev/kbd0 -l uk.iso \ # < /dev/console;/usr/local/bin/xmodmap \ # -display laps:0 /home/jhs/.xmodmap/english" # http://www.delock.de # "Buddy (TM) PS/2 Keyboard-PS/2 Mouse - Cypress Semiconductor" # Original cost: 10 or 12 Euro in schiller. # Periodicaly stops (just unplug & replug & works again). # 2 more at 3.5 pound (March 2005) by young lad + smoker in wheelchair # @ http://www.computerfairs.com, they work, # but not yet tested to see if they too periodicaly stop. }; # ----------------------------------------------------------------------------- attach 1000 { # "JHS: Keyboard: Havit Model AL-2199" # power 100 mA, rev 2.30 # device-name "ukbd[0-9]+" ; match "vendor" "0x1241" ; match "product" "0x1203" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0230" ; # match "intclass" "0x03" ; # match "intsubclass" "0x00" ; action "touch /tmp/devd-debug-kbd-havit-attach ; \ /usr/local/bin/xmodmap -display :0 /home/jhs/.xmodmap/host=laps.init"; # --------- # touch /tmp/dev-xx-$device-name seems to get called 3 times with # all of these in this order: ugen1.3 ukbd0 uhid0 # kbdcontrol -k /dev/kbd2 -l us.iso < /dev/console; # kbdcontrol: cannot open /dev/kbd2: Device busy # xmodmap: If an X session is not already running it will complain: # No protocol specified # xmodmap: unable to open display ':0' }; # A fresh booted laps 8.0 has all of: # crw------- 1 root wheel 0, 45 Mar 7 17:24 /dev/atkbd0 # lrwxr-xr-x 1 root wheel 6 Mar 7 17:24 /dev/kbd0 -> atkbd0 # lrwxr-xr-x 1 root wheel 7 Mar 7 17:24 /dev/kbd1 -> kbdmux0 # crw------- 1 root wheel 0, 14 Mar 7 17:24 /dev/kbdmux0 # After inserting keyboard it adds: # lrwxr-xr-x 1 root wheel 5 Mar 7 17:29 /dev/kbd2 -> ukbd0 # crw------- 1 root wheel 0, 125 Mar 7 17:28 /dev/ukbd0 detach 1000 { # "JHS: Keyboard: Havit Model AL-2199" # power 100 mA, rev 2.30 # device-name "device-name[0-9]+" ; # ugen1.3 match "vendor" "0x1241" ; match "product" "0x1203" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0230" ; # match "intclass" "0x03" ; # match "intsubclass" "0x00" ; # match "intsubclass" "0x01" ; action "rm /tmp/devd-debug-kbd-havit-attach ; \ /usr/local/bin/xmodmap -display :0 /home/jhs/.xmodmap/english" ; # --------- # kbdcontrol -k /dev/kbd2 -l uk.iso < /dev/console # kbdcontrol: cannot open /dev/kbd2: No such file or directory # xmodmap: If an X session is not already running it will complain: # No protocol specified # xmodmap: unable to open display ':0' }; # ----------------------------------------------------------------------------- # device "JHS: Toshiba inbuilt mouse pad" # CREATE ENTRY LATER # I guess host=laps inbuilt mouse pad is a USB, as # with nothing plugged usbdevs -v shows: # Controller /dev/usb0: # addr 1: full speed, self powered, config 1, # UHCI root hub(0x0000), Intel(0x0000), rev 1.00 # port 1 powered port 2 powered # Controller /dev/usb1: # addr 1: full speed, self powered, config 1, # UHCI root hub(0x0000), Intel(0x0000), rev 1.00 # port 1 powered # port 2 addr 2: full speed, power 100 mA, config 1, # Synaptics cPad(0x0003), Synaptics Inc.(0x06cb), rev 0.11 # Controller /dev/usb2: # addr 1: full speed, self powered, config 1, # UHCI root hub(0x0000), Intel(0x0000), rev 1.00 # port 1 powered port 2 powered # With other USB mice plugged in at boot, it showed up as ums2. # After a reboot with no USB plugged in at boot time, it showed up as /dev/ums0 # After usbd_enable="NO" in /etc/rc.conf & another reboot, # ums0 still appeared , # presumably created by these : ps -laxww | grep usb # 0 35 0 0 8 0 0 8 usbevt DL ?? 0:00.00 [usb0] # 0 36 0 0 8 0 0 8 usbtsk DL ?? 0:00.00 [usbtask] # 0 37 0 0 8 0 0 8 usbevt DL ?? 0:00.00 [usb1] # 0 38 0 0 8 0 0 8 usbevt DL ?? 0:00.00 [usb2] # ----------------------------------------------------------------------------- # Kensington USB Wheel Mouse - Blue < jes@ attach 1000 { # "JHS: Mouse - Blue < jes@" device-name "ums[0-9]+" ; match "vendor" "0x047d" ; match "product" "0x1012" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; action "moused -p /dev/$device-name \ -I /var/run/moused.$device-name.pid; \ vidcontrol -m on" ; # 100 mA }; # ----------------------------------------------------------------------------- attach 1000 { # "JHS: Stick Mouse: JVC Handy Mouse HC-MM55U" device-name "ums[0-9]+" ; match "vendor" "0x04f1" ; match "product" "0x0001" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0001" ; action "moused -p /dev/$device-name \ -I /var/run/moused.$device-name.pid; \ vidcontrol -m on" ; # This mouse is not recognised on most of my systems. # On host=laps with 6.0BETA2, it also isnt, if connected straight # but after I put it through a zediworks hub (powered or # unpowered irrelevant!) it then works ! # On 8.1, direct on USB 1 it didnt work, # via USV-2 vardbus & sediworks hub it did work. # usbdevs -v : low speed, power 100 mA, config 1, rev 0.01 }; # ============================================================================= # Logitech mouse RX250A from mk 2011-02-18 from EG # M/N: M-BAD58B # P/N: 810-000208 # PID: LZ946HG21S0 # 5V 100mA attach 1000 { # device-name "ums[0-9]+" ; match "vendor" "0x046d" ; match "product" "0xc050" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "intclass" "0x03" ; match "intsubclass" "0x01" ; match "release" "0x2720" ; action "moused -p /dev/$device-name \ -I /var/run/moused.$device-name.pid -t logitech -3 ; \ vidcontrol -m on" ; }; # -3: This thing has a wheel, (which unlike my Mickeysoft does not # physicaly click) I havent configured the wheel. # JJLATER: Remove a not of spcificity & snd-pr for defaults/ # ============================================================================= attach 1000 { # "JHS: Mouse Generic" device-name "ums[0-9]+" ; action "moused -p /dev/$device-name \ -I /var/run/moused.$device-name.pid; \ vidcontrol -m on" ; # The entry below starts moused when a mouse is plugged in. Moused # stops automatically (actually it bombs :) when the device disappears. }; # ============================================================================= # # HP ScanJet 4400c, Hewlett-Packard - Dead & dumped. # attach 1000 { # "JHS: Scanner - HP ScanJet 4400c, Hewlett-Packard" # # device-name # match "vendor" "0x03f0" ; # match "product" "0x0705" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # match "release" "0x0100" ; # # 6.1-RELEASE custom kernel, patched, adds /dev/uscanner0 # }; # ----------------------------------------------------------------------------- # HP PSC 2110 all-in-one printer scanner copier # From Jim Lucas 2010.01.03 - Since scrapped as hardware error. # FreeBSD 8.0-RELEASE kernel=LAPS.small devd -d -D shows: # ugen3.3 # ulpt0 # man ulpt USB printer support # unlpt0 # man unlpt No manual entry for unlpt # usb/3.3.0 usb/3.3.1 usb/3.3.2 usb/3.3.3 usb/3.3.4 usb/3.3.5 usb/3.3.6 # attach 1000 { # # match "device-name" "ugen3.3" ; # match "vendor" "0x03f0" ; # match "product" "0x2811" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # # match "sernum" "MY25GB607Z0F" ; # match "release" "0x0100" ; # action "touch /tmp/devd-debug-HP-PSC-2110" ; # }; # detach 1000 { # # match "device-name" "ugen3.3" ; # match "vendor" "0x03f0" ; # match "product" "0x2811" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # # match "sernum" "MY25GB607Z0F" ; # match "release" "0x0100" ; # action "rm -f /tmp/devd-debug-HP-PSC-2110" ; # }; # ============================================================================= # device "JHS: Printer - Brother HL-P2500 - Hardware gone" # device-name "ugen[0-9]+" ; # match "vendor" "0x04f9" ; # match "product" "0x000a" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # match "release" "0x0100" ; # "Brother Industries rev 1.00/1.00" # ----------------------------------------------------------------------------- # HP/deskjet_970_cxi_printer # Adds: /dev/ ugen1.2 + ulpt0 + unlpt0 # See: ~/tech/hp_deskjet_970xxi_printer attach 1000 { # "JHS: Printer imported 2010.02.28" # device-name match "vendor" "0x03f0 " ; match "product" "0x1004 " ; match "devclass" "0x00 " ; match "devsubclass" "0x00 " ; # match "sernum" "MY07E1D1J8JQ" " ; match "release" "0x0100 " ; action "touch /tmp/devd_debug_hp_deskjet_970_cxi" ; }; detach 1000 { # "JHS: Printer imported 2010.02.28" # device-name match "vendor" "0x03f0 " ; match "product" "0x1004 " ; match "devclass" "0x00 " ; match "devsubclass" "0x00 " ; # match "sernum" "MY07E1D1J8JQ" " ; match "release" "0x0100 " ; action "rm /tmp/devd_debug_hp_deskjet_970_cxi" ; }; # ============================================================================= # Dymo LabelWriter 320 www.dymo.com given to jes@ may have been given further. # # ulpt # attach 1000 { # "JHS: Dymo LabelWriter 320" # # device-name # match "vendor" "0x0922" ; # match "product" "0x0010" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # match "release" "0x0046" ; # # action "echo dont know what to do" ; # }; # ============================================================================= # Default For Pretty Log Printing attach 1000 { # "JHS: USB device - Generic" }; # ============================================================================= # YV Adaptor: Hauppage! WinTV USB attach 1000 { # "JHS: TV from Francis" # device-name match "vendor" "0x0573" ; match "product" "0x4d21" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0100" ; }; # ============================================================================= # "AVM ISDN-Controller FRITZ!Card USB, AVM Berlin:" attach 1000 { # "JHS ISDN from Francis" # device-name match "vendor" "0x057c" ; match "product" "0x0c00" ; match "devclass" "0xff" ; match "devsubclass" "0xff" ; match "release" "0x0300" ; # match "protocol" "0x00ff" ; }; # ============================================================================= attach 1000 { # JHS Black radio Stick & Hot Spot Finder # "USB2.0 WLAN, ZyDAS" # man 4 zyd # Paint job on front: ConnecTec TEW-429UB # dmesg: ZyDAS USB2.0 WLAN # ugen0 + ugen0.1 + ugen0.2 + ugen0.3 + ugen0.4 # device-name "ugen[0-9]+" ; match "vendor" "0x157e" ; match "product" "0x300b" ; match "devclass" "0xff" ; match "devsubclass" "0xff" ; match "release" "0x4802" ; # match "protocol" "0x00ff" ; action "touch /tmp/devd-debug-radio-attach" ; # usbdevs -v: power 500 mA, config 1, USB2.0 WLAN(0x300b), # ZyDAS(0x157e), rev 48.02 # Numbers on back label: MM051021300083 0014D1C0AB9C }; detach 1000 { # "JHS Black radio Stick" # match device-name=ugen0 match "vendor" "0x157e" ; match "product" "0x300b" ; match "devclass" "0xff" ; match "devsubclass" "0xff" ; match "release" "0x4802" ; # match "protocol" "0x00ff" ; action "rm -f /tmp/devd-debug-radio-detach" ; }; # ============================================================================= # Tchibo stick After plugging in I see: # crw-rw---- 1 uucp dialer 0, 177 Nov 5 00:35 /dev/cuaU0.0 # crw-rw---- 1 uucp dialer 0, 178 Nov 5 00:35 /dev/cuaU0.0.init # crw-rw---- 1 uucp dialer 0, 179 Nov 5 00:35 /dev/cuaU0.0.lock # crw-rw---- 1 uucp dialer 0, 183 Nov 5 00:35 /dev/cuaU0.1 # crw-rw---- 1 uucp dialer 0, 184 Nov 5 00:35 /dev/cuaU0.1.init # crw-rw---- 1 uucp dialer 0, 185 Nov 5 00:35 /dev/cuaU0.1.lock # crw-rw---- 1 uucp dialer 0, 189 Nov 5 00:35 /dev/cuaU0.2 # crw-rw---- 1 uucp dialer 0, 190 Nov 5 00:35 /dev/cuaU0.2.init # crw-rw---- 1 uucp dialer 0, 191 Nov 5 00:35 /dev/cuaU0.2.lock # crw-rw---- 1 uucp dialer 0, 195 Nov 5 00:35 /dev/cuaU0.3 # crw-rw---- 1 uucp dialer 0, 196 Nov 5 00:35 /dev/cuaU0.3.init # crw-rw---- 1 uucp dialer 0, 197 Nov 5 00:35 /dev/cuaU0.3.lock # attach 1000 { # # u3g0 # # device-name "u3g[0-9]+" ; # match "vendor" "0x12d1" ; # match "product" "0x140c" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # match "release" "0x0000" ; # # match "intclass" "0xff" ; # # match "intsubclass" "0xff" ; # action "touch /tmp/tchibo_net_stick_wlan" ; # }; # detach 1000 { # # u3g0 # ugen5.3 # # device-name "u3g[0-9]+" ; # match "vendor" "0x12d1" ; # match "product" "0x140c" ; # match "devclass" "0x00" ; # match "devsubclass" "0x00" ; # match "release" "0x0000" ; # # match "intclass" "0xff" ; # # match "intsubclass" "0xff" ; # action "rm /tmp/tchibo_net_stick_wlan" ; # }; # -------------------- # 4 G chip in the side of the umts modem: # First of all just da0 appears, # after "mount -t msdosfs /dev/da0 /mnt" # then da0s1 also appears # xs fdisk da0 # ******* Working on device /dev/da0 ******* # parameters extracted from in-core disklabel are: # cylinders=490 heads=255 sectors/track=63 (16065 blks/cyl) # # parameters to be used for BIOS calculations are: # cylinders=490 heads=255 sectors/track=63 (16065 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 11 (0x0b),(DOS or Windows 95 with 32 bit FAT) # start 8192, size 7874560 (3845 Meg), flag 0 # beg: cyl 1/ head 2/ sector 3; # end: cyl 977/ head 67/ sector 3 # ============================================================================= attach 1000 { match "vendor" "0x12d1" ; match "product" "0x1446" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0000" ; # ugen5.2 action "touch /tmp/tchibo_net_stick_umass" ; }; detach 1000 { match "vendor" "0x12d1" ; match "product" "0x1446" ; match "devclass" "0x00" ; match "devsubclass" "0x00" ; match "release" "0x0000" ; # ugen5.2 action "rm /tmp/tchibo_net_stick_umass" ; }; # ============================================================================= # I bought a 4 G micro SDHC card to go in. 12,49 Euro # Model TS4GUSDC6 Class 6 # http://transcendusa.com # http://transcend.com.tw # Cardboard says: # 15x11x1 mm # 0.4g # 2.7V - 3.6 V # -25 C. - +85 C. # 10,000 insert cycles. # Compatible with Secure Digital V2.0 # The guy at conrad.de told me 15 Meg/sec read, 8Meg/sec write, # as compared with sandisk 10M/sec r&w # http://www.conrad.de/ce/de/product/411849/TRANSCEND-MICRO-SDHC-KARTE-4GB-CL6-WA/SHOP_AREA_19818&promotionareaSearchDetail=005 # Class 6 Übertragungsstandard # 30 Jahre bedingte Herstellergarantie # Lesen 15 MB/s # Schreiben 8 MB/s # Typ SDHC # By comparison a class 2 device can only do # http://www.conrad.de/ce/de/product/412797/TRANSCEND-MICRO-SDHC-KARTE-4GB-CLASS2/SHOP_AREA_19818&promotionareaSearchDetail=005 # Lesen 2 MB/s # Schreiben 2 MB/s # Typ microSDHC # ----------------------------------------------------------------------------- # ls /dev/da* # da0 # fsck /dev/da0 # ls /dev/da* # da0, Still Nothing else. # Seen by FreeBSD as: # ******* Working on device /dev/da0 ******* # parameters extracted from in-core disklabel are: # cylinders=490 heads=255 sectors/track=63 (16065 blks/cyl) # # parameters to be used for BIOS calculations are: # cylinders=490 heads=255 sectors/track=63 (16065 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 11 (0x0b),(DOS or Windows 95 with 32 bit FAT) # start 8192, size 7874560 (3845 Meg), flag 0 # beg: cyl 1/ head 2/ sector 3; # end: cyl 977/ head 67/ sector 3 # The data for partition 2 is: # # The data for partition 3 is: # # The data for partition 4 is: # # ============================================================================= # N24 Net Stick given to eww@ nor in australia. # '+ugen0.3 # match "devclass" "0x00" # match "device-name" "ugen0.3" # match "devsubclass" "0x00" # match "product" "0x1003" # match "vendor" "0x12d1" # /sys/dev/usb/usbdevs: vendor HUAWEI 0x12d1 Huawei Technologies # match "release" "0x0000" # ============================================================================= # Dual Band Wireless LAN Adapter WLM-10U2, came with Toshiba TV 40VL743G # '+ugen1.4 # match "vendor" "0x0930" # match "product" "0x0a07" # match "devclass" "0x00" # match "devsubclass" "0x00" # match "sernum" "1.0" # match "release" "0x0101" # /dev/usb/1.4.0 # /dev/usb/1.4.1 # /dev/usb/1.4.2 # /dev/usb/1.4.3 # /dev/usb/1.4.4 # /dev/ugen1.4 # ============================================================================= detach 500 { action "rm /tmp/devd-debug-product=$product \ /tmp/devd-debug-device-name=$device-name" ; }; # ============================================================================= # From: Hans Petter Selasky # Date: Wed, 18 Jun 2008 01:48:46 +0200 # To: freebsd-usb@@@freebsd.org # # The blocksize for USB Flash is typically 512 bytes due to wMaxPacketSize being # 512 bytes at High Speed USB. # The SCSI command set allows you to read up to 32MByte in one go, but FreeBSD # typically does not read/write more than 64K. # ============================================================================= # My USB tp PS2 Keyboard+Mouse adaptors uses 17mA. # My very slim USB keyboard use 17mA. # PS2 Keyboards use 20 to 100 mA # ============================================================================= # I guess my Belkin Hi-Speed USB 2.0 Notebook Card is an earlier version of # http://catalog.belkin.com/IWCatProductPage.process?Product_Id=123940 # It runs extremely hot. # umass errs, g_vfs_done()da0a[WRITE(offset= # ) ] for brackets.c # this card used to run hot on FreeBSD-6, in this # Toshiba Satellite S5100-603, & I think BSD + this laptop # cooked my brothers identical Belkin card too last year. # The laptop BTW: # http://www.berklix.com/~jhs/hardware/toshiba/satellite.s5100-603/ # FreeBSD-7.1-RELEASE is still cooking by default. # 7.1-RELEASE /var/log/messages : # Belkin after insertion: # cardbus0: Warning: CIS pointer 0 (no CIS present) # cardbus0: Warning: Bogus CIS ignored # cardbus0: at device 0.0 (no driver attached ) # cardbus0: Warning: CIS pointer 0 (no CIS present) # cardbus0: Warning: Bogus CIS ignored # cardbus0: at device 0.1 (no driver attached ) # cardbus0: Warning: CIS pointer 0 (no CIS present) # cardbus0: Warning: Bogus CIS ignored # ehci0: # mem 0xfce05000-0xfce050ff irq 11 at device 0.2 on cardbus0 # ehci0: [GIANT-LOCKED] # ehci0: [ITHREAD] # usb3: EHCI version 1.0 # usb3: wrong number of companions (2 != 0) # usb3: on ehci0 # usb3: USB revision 2.0 # uhub3: on usb3 # uhub3: 5 ports with 5 removable, self powered # ----------------------------------------------------------------------------- # "M. Warner Losh" # Cardbus runs at 3.3V only. There''s X.X and Y.Y low-voltage specs, but # nobody seems to implement them. PC Card (the 16-bit version) runs at # 3.3V or 5.0V. The usual reason for cards running really hot is too # much current draw over the bus for supplied devices. Many of the # cards have an external power supply that can be used to provide more # power over a path that is made for it rather than exceeding the # CardBus specs to pull the power in over that power bus. # ============================================================================= # NOTES TO MERGE IN # It gets too warm when just plugged into laptop''s cardbus, # nothing external connected, (but not painfully hot as when # pulled out after heavy use with no external power, # connected to a powered hub driving an unpowered 2.5 disc). # (But yes of course lots of stuff in a laptop to keep it hot). # # Belkin doesnt seem to get hot, sitting idle under XP # But I dont know how to load Belkin to do disc intensive IO under XP. # (more accurately I have not looked for eg GCC under XP # to compile my # http://www.berklix.com/~jhs/src/bsd/jhs/bin/public/testblock/ ) # I wonder if XP turns off the card when not needed, # & if that might be viable in BSD ?. # # Powerd: I was not running powerd until last few days. # PC fan went on & off OK before & still does. # # Yes, this Belkin has a power socket, I hardly ever used it till now: # Only ever used the Belkin via 1 or 2 powered hubs, which I # assumed would buffer it + laptop from excess load. I had # assumed laptop supplies the Belkin at a well regulated 5V, # & I measured a few 5V supplies for hubs as { 5.36, 5.41 & # 5.22 V }, (So unless disc pulled down hub voltage below # 5.0, hub would not load down the Belkin, pulling extra # current, but I suppose an over voltage is also potential # unwanted heat (& at square law V^2 / R for heat), # if hubs were to feeds back to Belkin at full V (but hubs # would not, as discs pull hub V. down from eg 5.36 to 5.2).) # # Both Belkin sockets deliver no voltage, unless Belkin is # externaly powered. (& a memory stick requiring little # current produces no /dev/da* so power supply from Belkin # is not some OS related turn- on- if- something detected thing), # but more simple: power must be supplied from { external # socket or a device (in my case a powered hub) }. # ------------------ # # I swapped the disc to a different USB to IDE converter, omitted case, # disc does not get hot, but USB to IDE chip painfully hot (on good converter) # + another power doubler cable, straight into PC, no hub, # it wrote then read all remaining FS free space of 217 G succesfully. # # I swapped my other previously failing 120 G disc out of bad enclosure, # into a known good enclosure, NO problems now on that either, have written # 106 with no hang, & read verified 60 G as I type. # ------------------