D-Link DUB-H7 7x Ports USB Hub ( only version 1 works, silver case)

 

D-Link DFB-H7 Combo Hub

 

Compile software:

Download OpenWrt-SDK & Yun

mkdir ~/hub-ctrl
cd ~/hub-ctrl
wget http://www.gniibe.org/oitoite/ac-power-control-by-USB-hub/hub-ctrl.c
mips-openwrt-linux-uclibc-gcc   hub-ctrl.c -o hub-ctrl \
-I${CFLAGS} -L${LDFLAGS} \
-Wl,-rpath-link=${LDFLAGS}  -lusb
mips-openwrt-linux-uclibc-strip hub-ctrl
scp hub-ctrl root@192.168.0.102:/mnt/sda1

Control per port power/per indicator LED of USB Hub

or download pre-compiled software:

wget  -O hub-ctrl https://www.dropbox.com/s/dqlfrm91v5s7t2b/hub-ctrl?dl=0 --no-check-certificate
chmod 755 hub-ctrl
root@Arduino:/mnt/sda1# ./hub-ctrl -h
Usage: ./hub-ctrl [{-h HUBNUM | -b BUSNUM -d DEVNUM}] \
          [-P PORT] [{-p [VALUE]|-l [VALUE]}]

./hub-ctrl -v
...

Hub #2 at 001:003

 INFO: individual power switching.

 Hub Port Status:

   Port 1: 0000.0000

   Port 2: 0000.0000

   Port 3: 0000.0000

   Port 4: 0000.0000

 

./hub-ctrl -h 2 -P 1 -p 1
./hub-ctrl -v
...

Hub #2 at 001:003

 INFO: individual power switching.

 Hub Port Status:

   Port 1: 0000.0100 power

   Port 2: 0000.0000

   Port 3: 0000.0000

   Port 4: 0000.0000

USB Port 1 POWER SWITCHING on and LED is on.

Confirm USB Hub supports Per-port power switching:

 

root@Arduino:/mnt/sda1# lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 002: ID 058f:6254 Alcor Micro Corp. USB Hub

Bus 001 Device 003: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub

...

 

lsusb -d 05e3:0606 -v  |grep 'Per-port power switching'
Per-port power switching

If return empty then no support.

Write comment (0 Comments)

Reset Yun:

/usr/bin/reset-to-factory-anyway
/sbin/reboot

 

opkg update 
opkg install kmod-rt2800-lib kmod-rt2800-usb kmod-rt2x00-lib kmod-rt2x00-usb
cd /etc/modules.d
mv 24-rt2x00-lib 22-rt2x00-lib
mv 26-rt2x00-usb 23-rt2x00-usb
mv 27-rt2800-lib 24-rt2800-lib
mv 28-rt2800-usb 25-rt2800-usb

reboot Yun:

/sbin/reboot

backup Yun wireless setting:

mv /etc/config/wireless /var 
wifi detect > /etc/config/wireless
nano /etc/config/wireless

config wifi-device  radio1
...
option disabled 0


reboot Yun then test

Tenda W311MI (Ralink RT5370 base USB Adapter)

http://www.amazon.com/Tenda-W311M-150Mbps-Wireless-Adapter/dp/B006GCYAOS

$13.61  2 days free shipping

 

Write comment (0 Comments)

SCM SCL3711 Fulfilled by Amazon. Price: $38.95 

Identive SCM SCL3711

Openwrt/YunOS has very good lib to support NFC, unfortunately it is out date.

Install updated software:

cd /mnt/sda1
wget -O  nfc.tar.gz https://www.dropbox.com/s/moyx9otp7fpptzn/nfc.tar.gz?dl=0 --no-check-certificate
tar -zxvf nfc.tar.gz

cd nfc
opkg install libnfc_1.7.0-1_ar71xx.ipk
opkg install libnfc-bin_1.7.0-1_ar71xx.ipk
opkg install libnfc-examples_1.7.0-1_ar71xx.ipk
opkg install libfreefare_0.4.0-1_ar71xx.ipk
opkg install libfreefare-examples_0.4.0-1_ar71xx.ipk

Testing with mifare card:

root@Arduino:/mnt/sda1# /usr/bin/nfc-poll
/usr/bin/nfc-poll uses libnfc 1.1.0-30-ge81b29b
NFC reader: SCM Micro / SCL3711-NFC&RW opened
NFC device will poll during 30000 ms (20 pollings of 300 ms for 5 modulations)
ISO/IEC 14443A (106 kbps) target:
    ATQA (SENS_RES): 00  04
       UID (NFCID1): d4  b0  48  2f
      SAK (SEL_RES): 08

 The User space applications come with libs:

/usr/bin/mifare-desfire-access
/usr/bin/mifare-desfire-write-ndef
/usr/bin/mifare-desfire-read-ndef
/usr/bin/mifare-classic-write-ndef
/usr/bin/mifare-desfire-create-ndef
/usr/bin/mifare-desfire-ev1-configure-ats
/usr/bin/mifare-classic-read-ndef
/usr/bin/mifare-desfire-ev1-configure-default-key
/usr/bin/mifare-ultralight-info
/usr/bin/mifare-desfire-format
/usr/bin/mifare-desfire-ev1-configure-random-uid
/usr/bin/mifare-desfire-info
/usr/bin/mifare-classic-format
/usr/bin/nfc-mfultralight
/usr/bin/nfc-mfclassic
/usr/bin/nfc-list
/usr/bin/nfc-emulate-uid
/usr/bin/nfc-anticol
/usr/bin/nfc-poll
/usr/bin/nfc-relay
/usr/bin/nfc-relay-picc
/usr/bin/nfc-dep-target
/usr/bin/nfc-emulate-tag
/usr/bin/nfc-emulate-forum-tag4
/usr/bin/nfc-dep-initiator

 The reader is SCM SCL3711:

 

 

 

 

Write comment (0 Comments)