Skip to content

Instantly share code, notes, and snippets.

@laris
Last active April 15, 2020 07:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laris/c89331cd294295808a165dca13472ebb to your computer and use it in GitHub Desktop.
Save laris/c89331cd294295808a165dca13472ebb to your computer and use it in GitHub Desktop.
OpenWRT-TP-LINK-WR703N-v1-Printer-Scanner.md

TP-LINK WR703N v1 OpenWRT 18.06 Printer and Scanner

Hardware MOD

Bootloader

customized firmware

OpenWRT snapshot firmware (kernel near 18.06 release)

Backup and Restore OpenWrt configuration

https://wiki.openwrt.org/doc/howto/generic.backup

  • Not need to restore all configuration because the old system are LED 17.x
  • maybe have un-compatible issue,
  • just backup the config files and update new system for reference.

backup config - sysupgrade syntax

root@OWWR703NV1:~# sysupgrade
Usage: /sbin/sysupgrade [<upgrade-option>...] <image file or URL>
       /sbin/sysupgrade [-q] [-i] <backup-command> <file>

upgrade-option:
        -f <config>  restore configuration from .tar.gz (file or url)
        -i           interactive mode
        -c           attempt to preserve all changed files in /etc/
        -n           do not save configuration over reflash
        -p           do not attempt to restore the partition table after flash.
        -T | --test
                     Verify image and config .tar.gz but do not actually flash.
        -F | --force
                     Flash image even if image checks fail, this is dangerous!
        -q           less verbose
        -v           more verbose
        -h | --help  display this help

backup-command:
        -b | --create-backup <file>
                     create .tar.gz of files specified in sysupgrade.conf
                     then exit. Does not flash an image. If file is '-',
                     i.e. stdout, verbosity is set to 0 (i.e. quiet).
        -r | --restore-backup <file>
                     restore a .tar.gz created with sysupgrade -b
                     then exit. Does not flash an image. If file is '-',
                     the archive is read from stdin.
        -l | --list-backup
                     list the files that would be backed up when calling
                     sysupgrade -b. Does not create a backup file.
  • Need script more with example, cat /proc/sys/kernel/hostname`-`date +%F`.tar.gz
root@OWWR703NV1:/backup# sysupgrade -b ./backup-`cat /proc/sys/kernel/hostname`-`date +%F`.tar.gz
Saving config files...
root@OWWR703NV1:/backup# ls -ahl
drwxr-xr-x    2 root     root           0 Nov  1 04:36 .
drwxr-xr-x    1 root     root           0 Nov  1 04:29 ..
-rw-r--r--    1 root     root        6.3K Nov  1 04:36 backup-OWWR703NV1-2018-11-01.tar.gz

flash firmwre - mtd syntax

root@OWWR703NV1:~# mtd
Usage: mtd [<options> ...] <command> [<arguments> ...] <device>[:<device>...]

The device is in the format of mtdX (eg: mtd4) or its label.
mtd recognizes these commands:
        unlock                  unlock the device
        refresh                 refresh mtd partition
        erase                   erase all data on device
        verify <imagefile>|-    verify <imagefile> (use - for stdin) to device
        write <imagefile>|-     write <imagefile> (use - for stdin) to device
        jffs2write <file>       append <file> to the jffs2 partition on the device
        fixtrx                  fix the checksum in a trx header on first boot
        fixseama                fix the checksum in a seama header on first boot
        fixwrgg                 fix the checksum in a wrgg header on first boot
Following options are available:
        -q                      quiet mode (once: no [w] on writing,
                                           twice: no status messages)
        -n                      write without first erasing the blocks
        -r                      reboot after successful command
        -f                      force write without trx checks
        -e <device>             erase <device> before executing the command
        -d <name>               directory for jffs2write, defaults to "tmp"
        -j <name>               integrate <file> into jffs2 data when writing an image
        -s <number>             skip the first n bytes when appending data to the jffs2 partiton, defaults to "0"
        -p <number>             write beginning at partition offset
        -l <length>             the length of data that we want to dump
        -o offset               offset of the image header in the partition(for fixtrx)
        -c datasize             amount of data to be used for checksum calculation (for fixtrx / fixseama / fixwrg / fixwrgg)
        -F <part>[:<size>[:<entrypoint>]][,<part>...]
                                alter the fis partition table to create new partitions replacing
                                the partitions provided as argument to the write command
                                (only valid together with the write command)

Example: To write linux.trx to mtd4 labeled as linux and reboot afterwards
         mtd -r write linux.trx linux
  • scp the snapshot firmware to OW and use mtd to update firmware
root@OWWR703NV1:/backup# mtd -r write openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin firmware
Unlocking firmware ...

Writing from openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin to firmware ...
Rebooting ...

setup new snapshot firmware (near 18.06 release version)

Because the snapshot fw don't have luci package, need directly connect to RJ45 port or TTL to setup ssh root@192.168.1.1 change lan network to dhcp and reboot to get IP and ssh remotely.

$ ssh root@192.168.11.8`
BusyBox v1.29.3 () built-in shell (ash)
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r8284-212aa33
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
  • set root passwd
  • scp backup to WR703N to reference to update new system config
  • install diff to compare config root@OpenWrt:~/backup# opkg install diffutils
  • update hostname sed -i 's/OpenWrt/OWWR703NV1/g' /etc/config/system
  • update network cp network /etc/config/network
/etc/config/network
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd72:befc:a8b5::/48'

config interface 'lan'
        option _orig_ifname 'eth0'
        option _orig_bridge 'false'
        option delegate '0'
        option ifname 'eth0'
        option macaddr '38:83:45:36:FA:AA'
        option hostname 'OWWR703NV1'
        option proto 'dhcp'

config interface 'wlan'
        option _orig_ifname 'wlan0'
        option _orig_bridge 'false'
        option delegate '0'
        option ifname 'wlan0'
        option macaddr '38:83:45:36:FA:AB'
        option hostname 'OWWR703NV1WIFI'
        option proto 'dhcp'
  • restore /etc/config/wireless
/etc/config/wireless
config wifi-device 'radio0'
        option type 'mac80211'
        option channel 'auto'
        option hwmode '11g'
        option path 'platform/ar933x_wmac'
        option htmode 'HT20'
        option disabled '0'

config wifi-iface 'default_radio0'
        option ssid 'wifi ssid'
        option encryption 'psk2'
        option device 'radio0'
        option mode 'sta'
        option bssid 'xx:xx:xx:xx:xx:xx'
        option key 'wifipasswd'
        option network 'lan wlan'
        option macaddr '38:83:45:36:FA:AB'

update official 18.06 and local repo package

  • official 18.06 release package
/etc/opkg/distfeeds.conf
src/gz openwrt_base http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/base
src/gz openwrt_luci http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/luci
src/gz openwrt_packages http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages
src/gz openwrt_routing http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/routing
src/gz openwrt_telephony http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/telephony
  • local snapshot kernel mod package
/etc/opkg/customfeeds.conf
# add your custom package feeds here
#
# src/gz example_feed_name http://www.example.com/path/to/files
src/gz openwrt_kmods http://192.168.11.1:8080/ar71xx_tiny/kmods/4.9.131-1-9f19674baa84e4c02f875148d3407b3d
src/gz packages http://192.168.11.1:8080/ar71xx_tiny/packages

update essential pkg

  • default installed
$ opkg list-installed
base-files - 196-r8284-212aa33
busybox - 1.29.3-3
diffutils - 3.6-1
dnsmasq - 2.80test8-2
dropbear - 2017.75-8
firewall - 2018-08-13-1c4d5bcd-1
fstools - 2018-05-23-dd02dad3-3
fwtool - 1
hostapd-common - 2018-05-21-62566bc2-4
ip6tables - 1.6.2-3
iptables - 1.6.2-3
iw - 4.14-1
iwinfo - 2018-07-31-65b8333f-1
jshn - 2018-07-25-c83a84af-2
jsonfilter - 2018-02-04-c7e938d6-1
kernel - 4.9.131-1-9f19674baa84e4c02f875148d3407b3d
kmod-ath - 4.9.131+4.19-rc5-1-1
kmod-ath9k - 4.9.131+4.19-rc5-1-1
kmod-ath9k-common - 4.9.131+4.19-rc5-1-1
kmod-cfg80211 - 4.9.131+4.19-rc5-1-1
kmod-gpio-button-hotplug - 4.9.131-2
kmod-ip6tables - 4.9.131-1
kmod-ipt-conntrack - 4.9.131-1
kmod-ipt-core - 4.9.131-1
kmod-ipt-nat - 4.9.131-1
kmod-lib-crc-ccitt - 4.9.131-1
kmod-mac80211 - 4.9.131+4.19-rc5-1-1
kmod-nf-conntrack - 4.9.131-1
kmod-nf-conntrack6 - 4.9.131-1
kmod-nf-ipt - 4.9.131-1
kmod-nf-ipt6 - 4.9.131-1
kmod-nf-nat - 4.9.131-1
kmod-nf-reject - 4.9.131-1
kmod-nf-reject6 - 4.9.131-1
kmod-nls-base - 4.9.131-1
kmod-ppp - 4.9.131-1
kmod-pppoe - 4.9.131-1
kmod-pppox - 4.9.131-1
kmod-slhc - 4.9.131-1
kmod-usb-core - 4.9.131-1
kmod-usb-ehci - 4.9.131-1
kmod-usb2 - 4.9.131-1
libblobmsg-json - 2018-07-25-c83a84af-2
libc - 1.1.20-1
libgcc - 7.3.0-1
libip4tc - 1.6.2-3
libip6tc - 1.6.2-3
libiwinfo - 2018-07-31-65b8333f-1
libjson-c - 0.12.1-2
libjson-script - 2018-07-25-c83a84af-2
libnl-tiny - 0.1-5
libpthread - 1.1.20-1
libubox - 2018-07-25-c83a84af-2
libubus - 2018-10-06-221ce7e7-1
libuci - 2018-08-11-4c8b4d6e-1
libuclient - 2018-08-03-ae1c656f-1
libxtables - 1.6.2-3
logd - 2018-02-14-128bc35f-2
mtd - 23
netifd - 2018-10-07-d0fa124e-1
odhcp6c - 2018-07-14-67ae6a71-16
odhcpd-ipv6only - 1.12-3
openwrt-keyring - 2018-05-18-103a32e9-1
opkg - 2017-12-07-3b417b9f-2
ppp - 2.4.7-13
ppp-mod-pppoe - 2.4.7-13
procd - 2018-08-06-e29966f0-1
swconfig - 11
uboot-envtools - 2018.03-2
ubox - 2018-02-14-128bc35f-2
ubus - 2018-10-06-221ce7e7-1
ubusd - 2018-10-06-221ce7e7-1
uci - 2018-08-11-4c8b4d6e-1
uclient-fetch - 2018-08-03-ae1c656f-1
usign - 2015-07-04-ef641914-1
wireless-regdb - 2017-10-20-4343d359
wpad-mini - 2018-05-21-62566bc2-4
  • remove ipkg to save space
    • opkg remove ppp ppp-mod-pppoe kmod-pppoe kmod-pppox kmod-ppp
    • diffutils
  • additional system utils
    • usbutils - check usb device
    • ca-bundle ca-certificates libustream-openssl - CA
    • fdisk - to check usb storage partition
  • additional kernel modules
    • kmod-fs-msdos
    • kmod-fs-vfat
    • kmod-fs-ntfs
    • kmod-fs-ext4
    • kmod-fs-nfs*
    • kmod-fs-cifs
  • usb
opkg list-installed |grep usb
kmod-usb-core - 4.9.131-1
kmod-usb-ehci - 4.9.131-1
kmod-usb2 - 4.9.131-1

opkg list|grep kmod-usb|grep hci
kmod-usb-ehci - 4.9.131-1 - EHCI controller support
kmod-usb-gadget-ehci-debug - 4.9.131-1 - Kernel support for USB EHCI debug port Gadget.
kmod-usb-ohci - 4.9.131-1 - Kernel support for USB OHCI controllers
kmod-usb-ohci-pci - 4.9.131-1 - Kernel support for PCI OHCI controllers
kmod-usb-uhci - 4.9.131-1 - Kernel support for USB UHCI controllers

opkg install kmod-usb-ohci kmod-usb-uhci
  • USB Hub + USB disk
[13033.059387] usb 1-1: new high-speed USB device number 6 using ehci-platform
[13033.252136] hub 1-1:1.0: USB hub found
[13033.255192] hub 1-1:1.0: 4 ports detected
[13033.579381] usb 1-1.1: new high-speed USB device number 7 using ehci-platform
[13033.829373] usb 1-1.2: new high-speed USB device number 8 using ehci-platform
root@OWWR703NV1:/etc/opkg# lsusb -tv
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 7, If 0, Class=Mass Storage, Driver=, 480M
        |__ Port 2: Dev 8, If 0, Class=Mass Storage, Driver=, 480M
root@OWWR703NV1:/etc/opkg# lsusb
Bus 001 Device 008: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2
Bus 001 Device 007: ID abcd:1234 Unknown
Bus 001 Device 006: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • kmod-usb-storage
root@OWWR703NV1:/etc/opkg# opkg list|grep usb|grep storage
kmod-usb-gadget-mass-storage - 4.9.131-1 - Kernel support for USB Gadget Mass Storage
kmod-usb-storage - 4.9.131-1 - Kernel support for USB Mass Storage devices
kmod-usb-storage-extras - 4.9.131-1 - Say Y here if you want to have some more drivers, such as for SmartMedia card readers
kmod-usb-storage-uas - 4.9.131-1 - Say Y here if you want to include support for USB Attached SCSI (UAS/UASP), a higher performance protocol available on many newer USB 3.0 storage devices

now found the usb disk

[13612.965972] kmodloader: loading kernel modules from /etc/modules.d/*
[13612.991776] SCSI subsystem initialized
[13613.011745] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[13613.018150] scsi host0: usb-storage 1-1.1:1.0
[13613.021952] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[13613.029608] scsi host1: usb-storage 1-1.2:1.0
[13613.033251] usbcore: registered new interface driver usb-storage
[13613.040915] kmodloader: done loading kernel modules from /etc/modules.d/*
[13613.168393] kmodloader: loading kernel modules from /etc/modules.d/*
[13613.176797] kmodloader: done loading kernel modules from /etc/modules.d/*
[13614.070929] scsi 1:0:0:0: Direct-Access     Kingston DataTraveler 3.0      PQ: 0 ANSI: 6
[13614.082166] scsi 0:0:0:0: Direct-Access     General  UDisk            5.00 PQ: 0 ANSI: 2
[13614.092802] sd 1:0:0:0: [sda] 30218842 512-byte logical blocks: (15.5 GB/14.4 GiB)
[13614.100361] sd 0:0:0:0: [sdb] 15976448 512-byte logical blocks: (8.18 GB/7.62 GiB)
[13614.107869] sd 1:0:0:0: [sda] Write Protect is off
[13614.111385] sd 1:0:0:0: [sda] Mode Sense: 4f 00 00 00
[13614.111988] sd 0:0:0:0: [sdb] Write Protect is off
[13614.116397] sd 0:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[13614.117704] sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[13614.127555] sd 0:0:0:0: [sdb] No Caching mode page found
[13614.131860] sd 0:0:0:0: [sdb] Assuming drive cache: write through
[13614.144558]  sdb: sdb1
[13614.150774]  sda: sda1
[13614.156593] sd 0:0:0:0: [sdb] Attached SCSI removable disk
[13614.161771] sd 1:0:0:0: [sda] Attached SCSI removable disk
# cat /proc/partitions
major minor  #blocks  name

  31        0        128 mtdblock0
  31        1       1414 mtdblock1
  31        2      14777 mtdblock2
  31        3      12864 mtdblock3
  31        4         64 mtdblock4
  31        5      16192 mtdblock5
   8        0   15109421 sda
   8        1   15108096 sda1
   8       16    7988224 sdb
   8       17    7987200 sdb1

SANE

sane-daemon sane-frontends sane-net sane-test jpeg-tools

HPLIP

wget https://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/hplip-common_3.18.9-1_mips_24kc.ipk
wget https://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/hplip-sane_3.18.9-1_mips_24kc.ipk
root@OWWR703NV1:~/local-repo# ls -l
-rw-r--r--    1 root     root        146609 Nov  1 12:18 hplip-common_3.18.9-1_mips_24kc.ipk
-rw-r--r--    1 root     root         67999 Nov  1 12:17 hplip-sane_3.18.9-1_mips_24kc.ipk
root@OWWR703NV1:~/local-repo# opkg install hplip-common_3.18.9-1_mips_24kc.ipk hplip-sane_3.18.9-1_mips_24kc.ipk

HP AIO (All in One) DeskJet F2100 Printer

[15546.458025] usb 1-1.4: new full-speed USB device number 9 using ehci-platform
root@OWWR703NV1:~/local-repo# lsusb
Bus 001 Device 008: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2
Bus 001 Device 009: ID 03f0:7d04 Hewlett-Packard DeskJet F2100 Printer series
Bus 001 Device 007: ID abcd:1234 Unknown
Bus 001 Device 006: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@OWWR703NV1:~/local-repo# scanimage -L
device `hpaio:/usb/Deskjet_F2100_series?serial=CN82E4R35204TK' is a Hewlett-Packard Deskjet_F2100_series all-in-one
root@OWWR703NV1:/www# scanimage --test
scanimage: scanning image of size 638x877 pixels at 24 bits/pixel
scanimage: acquiring RGB frame, 8 bits/sample
scanimage: reading one scanline, 1914 bytes...  PASS
scanimage: reading one byte...          PASS
scanimage: stepped read, 2 bytes...     PASS
scanimage: stepped read, 4 bytes...     PASS
scanimage: stepped read, 8 bytes...     PASS
scanimage: stepped read, 16 bytes...    PASS
scanimage: stepped read, 32 bytes...    PASS
scanimage: stepped read, 64 bytes...    PASS
scanimage: stepped read, 128 bytes...   PASS
scanimage: stepped read, 256 bytes...   PASS
scanimage: stepped read, 512 bytes...   PASS
scanimage: stepped read, 1024 bytes...  PASS
scanimage: stepped read, 2048 bytes...  PASS
scanimage: stepped read, 2047 bytes...  PASS
scanimage: stepped read, 1023 bytes...  PASS
scanimage: stepped read, 511 bytes...   PASS
scanimage: stepped read, 255 bytes...   PASS
scanimage: stepped read, 127 bytes...   PASS
scanimage: stepped read, 63 bytes...    PASS
scanimage: stepped read, 31 bytes...    PASS
scanimage: stepped read, 15 bytes...    PASS
scanimage: stepped read, 7 bytes...     PASS
scanimage: stepped read, 3 bytes...     PASS

Fujitsu Snapscan S1100

  • sane-epjitsu
  • SANE: Backends (Drivers)

    Backend: epjitsu (31) Manual page: sane-epjitsu Comment: Backend updated for SANE release 1.0.26, see sane-epjitsu manpage

    Manufacturer Model Interface USB id Status Comment
    Fujitsu ScanSnap S1100 USB 0x04c5/0x1200 Good

    Comment: Letter-size ADF. Hardware provides simplex, 300/600 dpi in color on USB power. Software creates other resolutions, plus grayscale and binary modes. All buttons and sensors are exposed. Scanner always scans in triplex color, fast USB required.

  • device detect
[18403.421757] usb 1-1.3: new high-speed USB device number 10 using ehci-platform
root@OWWR703NV1:/tmp# lsusb -tv
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 10, If 0, Class=Vendor Specific Class, Driver=, 480M
root@OWWR703NV1:/tmp# lsusb
Bus 001 Device 010: ID 04c5:1200 Fujitsu, Ltd
Bus 001 Device 006: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • sane detect fail
root@OWWR703NV1:/tmp# scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
root@OWWR703NV1:/tmp# scanimage -L
device `epjitsu:libusb:001:010' is a FUJITSU ScanSnap S1100 scanner

Printer

  • kmod-usb-printer
root@OWWR703NV1:/tmp# lsusb
Bus 001 Device 011: ID 03f0:7d04 Hewlett-Packard DeskJet F2100 Printer series
Bus 001 Device 006: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

[21214.298643] usb 1-1.2: new full-speed USB device number 11 using ehci-platform
[21214.457411] usblp 1-1.2:1.1: usblp0: USB Bidirectional printer dev 11 if 1 alt 0 proto 2 vid 0x03F0 pid 0x7D04

root@OWWR703NV1:/tmp# ls -l /dev/usb/
crw-------    1 root     root      180,   0 Nov  1 13:58 lp0
  • p910nd luci-app-p910nd
root@OWWR703NV1:/tmp# opkg list|grep p910nd|grep -v i18n
luci-app-p910nd - git-18.303.64118-b3d4b84-1 - p910nd - Printer server module
p910nd - 0.97-5 - p910nd is a small daemon that copies any data received on the port it is listening on to the corresponding printer port. It is primarily intended for diskless Linux hosts running as printer drivers but there is no reason why it could not be used on diskful hosts. Port 9100 is copied to /dev/lp0, 9101 to /dev/lp1 and 9102 to /dev/lp2. The default is port 9100 to /dev/lp0.
root@OWWR703NV1:/tmp#
  • xinetd sed -i 's/yes/no/g' /etc/xinetd.d/sane-port
root@OWWR703NV1:/etc/xinetd.d# cat /etc/services |grep sane
sane-port       6566/tcp        sane saned
root@OWWR703NV1:/etc/xinetd.d# /etc/init.d/xinetd enable
root@OWWR703NV1:/etc/xinetd.d# /etc/init.d/xinetd start
root@OWWR703NV1:/etc/xinetd.d# ps |grep xinetd
5493 root      1008 S    /usr/sbin/xinetd -pidfile /var/run/xinetd.pid
root@OWWR703NV1:/etc/xinetd.d# netstat -natp|grep 6566
tcp        0      0 0.0.0.0:6566            0.0.0.0:*               LISTEN      5493/xinetd

openwrt-scan-server

uhttpd
root@OWWR703NV1:~/openwrt-scan-server# /etc/init.d/uhttpd enable
root@OWWR703NV1:~/openwrt-scan-server# /etc/init.d/uhttpd start
  • libjpeg
  • ImageMagick ?

Samba 4

https://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/samba4-admin_4.9.1-4_mips_24kc.ipk
https://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/samba4-client_4.9.1-4_mips_24kc.ipk
https://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/samba4-libs_4.9.1-4_mips_24kc.ipk
https://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/samba4-server_4.9.1-4_mips_24kc.ipk
https://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/samba4-utils_4.9.1-4_mips_24kc.ipk
root@OWWR703NV1:~/local-repo# opkg install samba4-libs_4.9.1-4_mips_24kc.ipk samba4-server_4.9.1-4_mips_24kc.ipk samba4-utils_4.9.1-4_mips_24kc.ipk samba4-client_4.9.1-4_mips_24kc.ipk samba4-admin_4.9.1-4_mips_24kc.ipk
Installing samba4-libs (4.9.1-4) to root...
Installing samba4-server (4.9.1-4) to root...
Installing libtirpc (1.0.3-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/libtirpc_1.0.3-1_mips_24kc.ipk
Installing terminfo (6.1-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/base/terminfo_6.1-1_mips_24kc.ipk
Installing libncurses (6.1-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/base/libncurses_6.1-1_mips_24kc.ipk
Installing libuuid (2.32-2) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/base/libuuid_2.32-2_mips_24kc.ipk
Installing libcomerr (1.44.1-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/base/libcomerr_1.44.1-1_mips_24kc.ipk
Installing libss (1.44.1-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/base/libss_1.44.1-1_mips_24kc.ipk
Installing krb5-libs (1.16.1-3) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/krb5-libs_1.16.1-3_mips_24kc.ipk
Installing libpopt (1.16-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/base/libpopt_1.16-1_mips_24kc.ipk
Installing libcap (2.25-2) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/libcap_2.25-2_mips_24kc.ipk
Installing libgmp (6.1.2-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/base/libgmp_6.1.2-1_mips_24kc.ipk
Installing libnettle (3.3-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/base/libnettle_3.3-1_mips_24kc.ipk
Installing libgpg-error (1.12-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/libgpg-error_1.12-1_mips_24kc.ipk
Installing libgcrypt (1.6.6-2) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/libgcrypt_1.6.6-2_mips_24kc.ipk
Installing libpam (1.2.0-2) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/libpam_1.2.0-2_mips_24kc.ipk
Installing libexpat (2.2.5-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/libexpat_2.2.5-1_mips_24kc.ipk
Installing libdbus (1.10.4-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/libdbus_1.10.4-1_mips_24kc.ipk
Installing dbus (1.10.4-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/dbus_1.10.4-1_mips_24kc.ipk
Installing libavahi-dbus-support (0.6.32-3) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/libavahi-dbus-support_0.6.32-3_mips_24kc.ipk
Installing libdaemon (0.14-5) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/libdaemon_0.14-5_mips_24kc.ipk
Installing avahi-dbus-daemon (0.6.32-3) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/avahi-dbus-daemon_0.6.32-3_mips_24kc.ipk
Installing libavahi-client (0.6.32-3) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/libavahi-client_0.6.32-3_mips_24kc.ipk
Installing libattr (20170915-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/libattr_20170915-1_mips_24kc.ipk
Installing attr (20170915-1) to root...
Downloading http://mirrors.cnnic.cn/lede/releases/packages-18.06/mips_24kc/packages/attr_20170915-1_mips_24kc.ipk
Installing samba4-libs (4.9.1-4) to root...
Installing samba4-utils (4.9.1-4) to root...
Installing samba4-libs (4.9.1-4) to root...
Installing samba4-client (4.9.1-4) to root...
Installing samba4-libs (4.9.1-4) to root...
Installing samba4-admin (4.9.1-4) to root...
Installing samba4-libs (4.9.1-4) to root...
Configuring terminfo.
Configuring libpam.
Configuring libexpat.
Configuring libdbus.
Configuring dbus.
Unknown group "netdev" in message bus configuration file
Configuring libavahi-dbus-support.
Configuring libdaemon.
Configuring avahi-dbus-daemon.
Configuring libgpg-error.
Configuring libgcrypt.
Configuring libncurses.
Configuring libuuid.
Configuring libcomerr.
Configuring libss.
Configuring krb5-libs.
Configuring libcap.
Configuring libavahi-client.
Configuring libgmp.
Configuring libnettle.
Configuring libattr.
Configuring attr.
Configuring libtirpc.
Configuring libpopt.
Collected errors:
 * verify_pkg_installable: Only have 3816kb available on filesystem /overlay, pkg samba4-libs needs 4812
 * opkg_install_cmd: Cannot install package samba4-libs.
 * verify_pkg_installable: Only have 1404kb available on filesystem /overlay, pkg samba4-libs needs 4812
 * opkg_install_cmd: Cannot install package samba4-server.
 * verify_pkg_installable: Only have 1404kb available on filesystem /overlay, pkg samba4-libs needs 4812
 * opkg_install_cmd: Cannot install package samba4-utils.
 * verify_pkg_installable: Only have 1404kb available on filesystem /overlay, pkg samba4-libs needs 4812
 * opkg_install_cmd: Cannot install package samba4-client.
 * verify_pkg_installable: Only have 1468kb available on filesystem /overlay, pkg samba4-libs needs 4812
 * opkg_install_cmd: Cannot install package samba4-admin.

 root@OWWR703NV1:~/local-repo# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.0M      2.0M         0 100% /rom
tmpfs                    29.3M    748.0K     28.6M   2% /tmp
/dev/mtdblock3           12.6M     10.9M      1.7M  87% /overlay
overlayfs:/overlay       12.6M     10.9M      1.7M  87% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@OWWR703NV1:~/local-repo# du -hs
5.3M    .
root@OWWR703NV1:~# mv local-repo /tmp/
root@OWWR703NV1:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.0M      2.0M         0 100% /rom
tmpfs                    29.3M      6.0M     23.3M  20% /tmp
/dev/mtdblock3           12.6M      5.6M      7.0M  44% /overlay
overlayfs:/overlay       12.6M      5.6M      7.0M  44% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@OWWR703NV1:/tmp/local-repo#
root@OWWR703NV1:/tmp/local-repo# opkg install --force-reinstall samba4-libs_4.9.1-4_mips_24kc.ipk samba4-server_4.9.1-4_mips_24kc.ipk samba4-utils_4.9.1-4_mips_24kc.ipk samba4-client_4.9.1-4_mips_24kc.ipk samba4-admin_4.9.1-4_mips_24kc.ip
k
No packages removed.
Installing samba4-libs (4.9.1-4) to root...
Installing samba4-server (4.9.1-4) to root...
Installing samba4-utils (4.9.1-4) to root...
Installing samba4-client (4.9.1-4) to root...
Installing samba4-admin (4.9.1-4) to root...
Configuring samba4-libs.
Configuring samba4-client.
Configuring samba4-server.
Configuring samba4-utils.
Configuring samba4-admin.

Misc

  • 分割分区 首先, 利用 dd 将固件 bin 文件分为 kernel 和 rootfs 两个分区 dd if=openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin of=i1 bs=1 count=1048576 dd if=openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin of=i2 bs=1 skip=1048576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment