LEDE / OpenWRT NAT and OpenVPN performance on TP-Link TL-WR1043ND V4

Results measured with iperf 3.1.3.
LuCI lede-17.01 branch (git-17.152.82987-7f6fc16)
LEDE Reboot 17.01.2 r3435-65eec8bd5f
WiFi: 40MHz, channel 1, client: Broadcom 802.11ac
WAN connected to 1GBit switch.

TP-Link TL-WR1043ND V4:

  • Chip: Qualcomm Atheros QCA9563
  • CPU Frequency: 750MHz
  • Flash: 16MB
  • RAM: 64MB
  • WiFi: QCA9563 [bgn 3×3:3]
  • LAN Switch: QCA8337N

Stock firmware TL-WR1043ND(EU) V4 3.16.9 Build 20160607 Rel.58297n

WiFi speed is the same on LEDE and stock firmware. To much networks nearby to measure it properly.

WAN to LAN redirected port

[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 40.2 MBytes 337 Mbits/sec
[ 5] 1.00-2.00 sec 42.5 MBytes 356 Mbits/sec
[ 5] 2.00-3.00 sec 42.9 MBytes 360 Mbits/sec
[ 5] 3.00-4.00 sec 42.2 MBytes 354 Mbits/sec
[ 5] 4.00-5.00 sec 40.0 MBytes 335 Mbits/sec
[ 5] 5.00-6.00 sec 42.1 MBytes 354 Mbits/sec
[ 5] 6.00-7.00 sec 43.0 MBytes 360 Mbits/sec
[ 5] 7.00-8.00 sec 42.8 MBytes 359 Mbits/sec
[ 5] 8.00-9.00 sec 41.6 MBytes 349 Mbits/sec
[ 5] 9.00-10.00 sec 43.1 MBytes 361 Mbits/sec
[ 5] 10.00-10.05 sec 1.88 MBytes 349 Mbits/sec

LAN to WAN via NAT

[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 34.2 MBytes 286 Mbits/sec
[ 5] 1.00-2.00 sec 35.4 MBytes 298 Mbits/sec
[ 5] 2.00-3.00 sec 35.2 MBytes 295 Mbits/sec
[ 5] 3.00-4.00 sec 35.8 MBytes 300 Mbits/sec
[ 5] 4.00-5.00 sec 35.8 MBytes 300 Mbits/sec
[ 5] 5.00-6.00 sec 35.8 MBytes 301 Mbits/sec
[ 5] 6.00-7.00 sec 35.7 MBytes 300 Mbits/sec
[ 5] 7.00-8.00 sec 34.8 MBytes 292 Mbits/sec
[ 5] 8.00-9.00 sec 35.7 MBytes 300 Mbits/sec
[ 5] 9.00-10.00 sec 35.6 MBytes 299 Mbits/sec
[ 5] 10.00-10.05 sec 1.78 MBytes 300 Mbits/sec

LEDE 17.01.2 r3435-65eec8bd5f

On the LEDE Reboot 17.01.2 r3435-65eec8bd5f i ve got better results from WAN to LAN and reverse option in iperf:

WAN to LAN redirected port

via nat is ~370Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 51.6 MBytes 432 Mbits/sec
[ 4] 1.00-2.00 sec 53.5 MBytes 449 Mbits/sec
[ 4] 2.00-3.00 sec 52.4 MBytes 439 Mbits/sec
[ 4] 3.00-4.00 sec 53.1 MBytes 445 Mbits/sec
[ 4] 4.00-5.00 sec 51.4 MBytes 432 Mbits/sec
[ 4] 5.00-6.00 sec 52.8 MBytes 443 Mbits/sec
[ 4] 6.00-7.00 sec 52.2 MBytes 438 Mbits/sec
[ 4] 7.00-8.00 sec 50.6 MBytes 425 Mbits/sec
[ 4] 8.00-9.00 sec 49.9 MBytes 418 Mbits/sec
[ 4] 9.00-10.00 sec 50.5 MBytes 424 Mbits/sec

LAN to WAN via NAT

[ 5] 0.00-1.00 sec 37.4 MBytes 314 Mbits/sec
[ 5] 1.00-2.00 sec 39.8 MBytes 334 Mbits/sec
[ 5] 2.00-3.00 sec 39.5 MBytes 331 Mbits/sec
[ 5] 3.00-4.00 sec 40.3 MBytes 338 Mbits/sec
[ 5] 4.00-5.00 sec 39.0 MBytes 327 Mbits/sec
[ 5] 5.00-6.00 sec 40.1 MBytes 336 Mbits/sec
[ 5] 6.00-7.00 sec 39.1 MBytes 328 Mbits/sec
[ 5] 7.00-8.00 sec 39.9 MBytes 334 Mbits/sec
[ 5] 8.00-9.00 sec 39.0 MBytes 328 Mbits/sec
[ 5] 9.00-10.00 sec 40.4 MBytes 339 Mbits/sec
[ 5] 10.00-10.06 sec 2.28 MBytes 341 Mbits/sec

WiFi (LAN) to WAN via NAT

[ 4] 0.00-1.00 sec 6.88 MBytes 57.7 Mbits/sec
[ 4] 1.00-2.01 sec 6.25 MBytes 52.2 Mbits/sec
[ 4] 2.01-3.01 sec 6.62 MBytes 55.1 Mbits/sec
[ 4] 3.01-4.01 sec 6.75 MBytes 56.9 Mbits/sec
[ 4] 4.01-5.01 sec 6.50 MBytes 54.5 Mbits/sec
[ 4] 5.01-6.01 sec 5.88 MBytes 49.1 Mbits/sec
[ 4] 6.01-7.01 sec 5.88 MBytes 49.3 Mbits/sec
[ 4] 7.01-8.01 sec 5.88 MBytes 49.3 Mbits/sec
[ 4] 8.01-9.01 sec 6.25 MBytes 52.6 Mbits/sec
[ 4] 9.01-10.01 sec 6.00 MBytes 50.2 Mbits/sec

WAN to WiFi (LAN) redirected port

[ 5] 0.00-1.00 sec 7.30 MBytes 61.3 Mbits/sec
[ 5] 1.00-2.00 sec 7.62 MBytes 63.8 Mbits/sec
[ 5] 2.00-3.00 sec 7.53 MBytes 63.1 Mbits/sec
[ 5] 3.00-4.00 sec 7.15 MBytes 60.0 Mbits/sec
[ 5] 4.00-5.00 sec 7.01 MBytes 58.8 Mbits/sec
[ 5] 5.00-6.00 sec 6.95 MBytes 58.3 Mbits/sec
[ 5] 6.00-7.00 sec 7.46 MBytes 62.4 Mbits/sec
[ 5] 7.00-8.00 sec 6.50 MBytes 54.7 Mbits/sec
[ 5] 8.00-9.00 sec 7.25 MBytes 60.8 Mbits/sec
[ 5] 9.00-10.00 sec 7.21 MBytes 60.4 Mbits/sec
[ 5] 10.00-10.07 sec 498 KBytes 58.2 Mbits/sec

LAN to LAN

[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 99.1 MBytes 831 Mbits/sec
[ 4] 1.00-2.00 sec 105 MBytes 880 Mbits/sec
[ 4] 2.00-3.00 sec 109 MBytes 911 Mbits/sec
[ 4] 3.00-4.00 sec 110 MBytes 925 Mbits/sec
[ 4] 4.00-5.00 sec 110 MBytes 921 Mbits/sec
[ 4] 5.00-6.00 sec 110 MBytes 922 Mbits/sec
[ 4] 6.00-7.00 sec 110 MBytes 920 Mbits/sec
[ 4] 7.00-8.00 sec 110 MBytes 924 Mbits/sec
[ 4] 8.00-9.00 sec 110 MBytes 922 Mbits/sec
[ 4] 9.00-10.00 sec 110 MBytes 925 Mbits/sec

WiFi (LAN) to LAN

[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.01 sec 8.88 MBytes 73.8 Mbits/sec
[ 4] 1.01-2.02 sec 9.00 MBytes 75.0 Mbits/sec
[ 4] 2.02-3.01 sec 9.62 MBytes 81.0 Mbits/sec
[ 4] 3.01-4.01 sec 9.00 MBytes 75.9 Mbits/sec
[ 4] 4.01-5.00 sec 9.50 MBytes 80.0 Mbits/sec
[ 4] 5.00-6.00 sec 8.88 MBytes 74.4 Mbits/sec
[ 4] 6.00-7.00 sec 9.38 MBytes 78.9 Mbits/sec
[ 4] 7.00-8.01 sec 9.00 MBytes 74.7 Mbits/sec
[ 4] 8.01-9.01 sec 9.75 MBytes 82.0 Mbits/sec
[ 4] 9.01-10.00 sec 8.62 MBytes 72.6 Mbits/sec

VPN

Cipher AES-256-CBC
dh2048
SSL Certs

WAN via VPN to LAN

[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 2.12 MBytes 17.8 Mbits/sec
[ 4] 1.00-2.00 sec 2.00 MBytes 16.8 Mbits/sec
[ 4] 2.00-3.00 sec 1.88 MBytes 15.7 Mbits/sec
[ 4] 3.00-4.00 sec 1.75 MBytes 14.7 Mbits/sec
[ 4] 4.00-5.00 sec 1.75 MBytes 14.7 Mbits/sec
[ 4] 5.00-6.00 sec 2.00 MBytes 16.8 Mbits/sec
[ 4] 6.00-7.00 sec 2.00 MBytes 16.8 Mbits/sec
[ 4] 7.00-8.00 sec 2.00 MBytes 16.8 Mbits/sec
[ 4] 8.00-9.00 sec 1.75 MBytes 14.7 Mbits/sec
[ 4] 9.00-10.00 sec 1.62 MBytes 13.6 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 18.9 MBytes 15.8 Mbits/sec sender
[ 4] 0.00-10.00 sec 18.8 MBytes 15.8 Mbits/sec receiver

LAN to VPN via WAN

[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 1.61 MBytes 13.5 Mbits/sec
[ 5] 1.00-2.00 sec 1.63 MBytes 13.7 Mbits/sec
[ 5] 2.00-3.00 sec 1.31 MBytes 11.0 Mbits/sec
[ 5] 3.00-4.00 sec 1.65 MBytes 13.8 Mbits/sec
[ 5] 4.00-5.00 sec 1.71 MBytes 14.3 Mbits/sec
[ 5] 5.00-6.00 sec 1.66 MBytes 13.9 Mbits/sec
[ 5] 6.00-7.00 sec 1.70 MBytes 14.3 Mbits/sec
[ 5] 7.00-8.00 sec 1.26 MBytes 10.6 Mbits/sec
[ 5] 8.00-9.00 sec 1.66 MBytes 13.9 Mbits/sec
[ 5] 9.00-10.00 sec 1.67 MBytes 14.0 Mbits/sec
[ 5] 10.00-10.12 sec 208 KBytes 14.3 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth
[ 5] 0.00-10.12 sec 0.00 Bytes 0.00 bits/sec sender
[ 5] 0.00-10.12 sec 16.1 MBytes 13.3 Mbits/sec receiver

EXT4-fs (sda): couldn’t mount RDWR because of unsupported optional features (400)

I could be happen on EXT3 or EXT2 too. This error mean that there is enabled file system feature that does not supported by kernel.

I’ve got an error when I make EXT4 partition with e2fsprogs (mkfs.ext4) newer then my kernel.

First solution is create ext4 with oldertools:

apt-get remove e2fslibs e2fsprogs

and install older.
Second solution is remove features does not supported by kernel.
To list features run :

tune2fs -l /dev/sdaX

I’ve got:
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
To try figure it out which feature is not supported you can try run

fsck /dev/sdaX
e2fsck -pv /dev/sdaX
mount /dev/sdaX /mountpoint
dmesg | tail

Remove them one by one because after some you have to fix file system and do other things:

tune2fs -O ^flex_bg /dev/sdaX

do something try mount

tune2fs -O ^metadata_csum /dev/sdaX

do something try mount

tune2fs -O ^extra_isize /dev/sdaX

do something try mount

tune2fs -O ^dir_nlink /dev/sdaX

do something try mount
Do something I mean fsck and other things which will be listed after command.
Done :)

An error occurred while updating “title” (connection time out)

An error occurred while updating (connection time out)

An error occurred while updating (connection time out)

When you try to install game on Steam yo have that error and game won’t finish downloading you have to:

  1. Disable AV (all modules like hips, firewall and others)
  2. Disable Windows Firewall
  3. Disable ADGuard, Admuncher and other ad blocking apps
  4. Connect directly to internet, stop all VPNs
  5. Clear download cache (right click on game -> properties -> local files -> clear cache)
  6. Exit steam and copy downloaded files to correct game folder:
    C:\Program Files (x86)\Steam\steamapps\downloading\730
    move to
    C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive
  7. Start steam and click play. Wait for download finish.

ETKA 7.5, 7.3, 7.4 error, hardlock uninstall & reinstall

Requirements

  • Install .NET 2.0 and .NET 4.0
  • Disable driver signing enforcement by allow testsigningpolicy, run CMD as admin and type:
    bcdedit.exe /set nointegritychecks ON
    bcdedit.exe /set TESTSIGNING ON

    Reboot.

  • Disable driver instalation from Windows Update (it will make faster)

First step

To solve below errors copy library LexHdl5.dll to “C:\Windows\System”
(not System32)

Error Returncode 5 – Error H7!

Error when update Returncode 2 – Error AA!

Second step

The new enhanced graphical functions of ETKA couldn’t be used! (Error 3)

Run CMD as admin and go to ETKA directory RosyVisionControl:

cd /d C:\ETKA\VWAU\RosyVisionControl
%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\regasm.exe RoSyVisionCom.dll /unregister
%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\regasm.exe RoSyVisionCom.dll /codebase
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\regasm.exe RoSyVisionCom.dll /unregister
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\regasm.exe RoSyVisionCom.dll /codebase

Hardlock Reinstall

 

Error 7 : Hardlock wurde nicht gefunden.

If you have any problem with devices  Safenet or something you should remove hardlock an install it again.

To reinstall hardlock you have to remove it. It is pretty hard to do that. You can check all services and drivers installed in your system with program called: Hardlock Diagnostic Tool  : diagnostix.zip (to delete service run sc in CMD). Download page: http://www3.safenet-inc.com/support/hardlock/downloads.aspx

Hardlock Uninstall

But there is a command line tool: Sentinel HASP Run-time Command-line Installation  – Sentinel_LDK_Run-time_cmd_line.zip that will allow remove all. Go to download page: http://www3.safenet-inc.com/support/hardlock/index.aspx

Unzip. Set compatibility mode Windows 7 and run as admin for file: haspdinst.exe.
Create shortcut to haspdinst.exe with switches:
haspdinst.exe -fr -kp -fss

It will remove Hardlock services and servers hasp. Reboot pc.

Then you can install hardlock properly.

Proper installation of HardLock
  1. Run 0000750A.reg from multikey.
  2. Run CMD as admin and go to multikey dir (check what is you system need x86 or x64) and install device:
    cd /d D:\MULTIKEY64
    devcon remove root\multikey
    devcon install multikey.inf root\multikey
  3. Allow to install unsigned driver. Wait for device installation in device manager at System deivces:
    Virtual USB multikey
    root\multikeySeriously you should wait to automatic installation. It can take a long  time of you didnt disable windows update drivers installation.
  4. Install hardlock.exe and wait for automatic installation of 2 devices at universal serial bus:
    SafeNet Inc. Hardlock Key
    USB\Hardlock
    SafeNet Inc. USB Key

    USB\VID_0529&PID_0001&Rev_0321
  5. Done.

Remove updates
There is a script that will remove any existing u[pdates tha iwll aloow to run older versions:

SET partition=C
IF  EXIST "%partition%:\ETKA\VWAU\DATA\." (
rd "%partition%:\ETKA\VWAU\DATA\AU\Update\" /S /Q
rd "%partition%:\ETKA\VWAU\DATA\SE\Update\" /S /Q
rd "%partition%:\ETKA\VWAU\DATA\SK\Update\" /S /Q
rd "%partition%:\ETKA\VWAU\DATA\VW\Update\" /S /Q
rd "%partition%:\ETKA\VWAU\DATA\AU\Upload\" /S /Q
rd "%partition%:\ETKA\VWAU\DATA\SE\Upload\" /S /Q
rd "%partition%:\ETKA\VWAU\DATA\SK\Upload\" /S /Q
rd "%partition%:\ETKA\VWAU\DATA\VW\Upload\" /S /Q
md "%partition%:\ETKA\VWAU\DATA\AU\Update\"
md "%partition%:\ETKA\VWAU\DATA\SE\Update\"
md "%partition%:\ETKA\VWAU\DATA\SK\Update\"
md "%partition%:\ETKA\VWAU\DATA\VW\Update\"
md "%partition%:\ETKA\VWAU\DATA\AU\Upload\"
md "%partition%:\ETKA\VWAU\DATA\SE\Upload\"
md "%partition%:\ETKA\VWAU\DATA\SK\Upload\"
md "%partition%:\ETKA\VWAU\DATA\VW\Upload\"
md "%partition%:\ETKA\VWAU\DATA\AU\Update\Temp"
md "%partition%:\ETKA\VWAU\DATA\SE\Update\Temp"
md "%partition%:\ETKA\VWAU\DATA\SK\Update\Temp"
md "%partition%:\ETKA\VWAU\DATA\VW\Update\Temp"
md "%partition%:\ETKA\VWAU\DATA\AU\Upload\Temp"
md "%partition%:\ETKA\VWAU\DATA\SE\Upload\Temp"
md "%partition%:\ETKA\VWAU\DATA\SK\Upload\Temp"
md "%partition%:\ETKA\VWAU\DATA\VW\Upload\Temp"
pause
) else (
echo Cannot find '%partition%:\ETKA\VWAU\DATA\'
pause
)

PJL Variables for Brother Printers

Table with variables names and values that could help predict purpose. The idea for PJL is var name should be english word.

 

There is a lot of options from power save to lower paper curl. Be aware there is a lot of system options. If you will set wrong option you can broke your printer.

Continue reading

PJL ReadBack – read response from printer

This is pretty hard to do that on USB printer connected to windows. You have to have bidirectional driver for your printer and somehow read it (there is no that option in win32 printing). There is no bidirectional windows drivers for most of printers.

It is much easier to ReadBack from printer connected to network. You can do that with simple app called PCL Paraphernalia
http://www.pclparaphernalia.eu/index.html

ReadBack from USB printer on Linux is possible! Printer is installed as a character device (you can read and write to it).

Some tips:

  • After read printer send to them ESCAPE character. If not, next send and work will not work.
    echo -e "\e" > /dev/usb/lp0
  • My printer does not respond nothing for @PJL INQUIRE *_* – no respond from printer for variables with underscore example: @PJL INQUIRE TOTALPAGE_LMT (probably total page limit) and others:
    ONLYFOR_PANEL
    TOTALPAGE_LMT
    COUNTPAGEPF1_LMT
    COUNTPAGEPFM_LMT
    A4PAGES_LMT
    LEGALPAGES_LMT
    JISB5PAGES_LMT
    A5PAGES_LMT
    A6PAGES_LMT
    MONARCPAGES_LMT
    PLAINPAGES_LMT
    THICKPAGES_LMT
    ENVELOPESPAGES_LMT
    POSTCARDPAGES_LMT
    LABELPAGES_LMT
  • You can try to check device is busy but it not work correctly. You should do the command in loop until you read more than zero length reponse (or set timeout in looop to next try)
    while true
            do
               fuser -s /dev/usb/lp0
               if [ $? -ne 0 ]
               then
                  break
               fi
    done
  • Send PJL:
    echo -e "\e%-12345X@PJL\r\n@PJL INFO ID \r\n\e%-12345X" > /dev/usb/lp0
  • Read PJL – I do not know when you should read and when the response is ready. So i try to read in loop or few cat commands, read or dd.
    #1way
    response=$(dd if=/dev/usb/lp0 of=temp.txt 2>&1)
    echo "$response"
    echo -e "\e" > /dev/usb/lp0
     
    #2way
    while IFS= read -r -n1 char
    do
     printf "$char"
    done < /dev/usb/lp0 echo -e "\e" > /dev/usb/lp0
     
    #3way
    cat /dev/usb/lp0
    echo -e "\e" > /dev/usb/lp0
  • Example script to read the printer ID:
    #!/bin/bash
     
    PRINTER=/dev/usb/lp0
    ESCAPE=$(echo -e "\e")
    FF=$(echo -e "\x0C")
    char=""
    IFS=""
    echo "" > temp.txt
     
    	while true
    	do
    		sleep 0.5
    		#WAIT FOR NOT BUSY
    		while true
    		do
    			fuser -s "$PRINTER"
    			if [ $? -ne 0 ]
    			then
    				break
    			fi
    		done
    		#send PJL to printer
    		echo -e "\e%-12345X@PJL\r\n@PJL INFO ID \r\n\e%-12345X" > "$PRINTER" 
    		#TRY TO READ IMMEDIATELY
    		char=$(dd if="$PRINTER" of=temp.txt 2>&1)
    		echo -e "\e" > "$PRINTER"
    		#CHECK THAT dd READ ANY BYTES
    		echo "$char" | grep "bytes copied" > /dev/null
    		if [ $? -ne 0 ]
    		then
    			printf "."
    		else
    			echo "$char" | grep "^0 bytes copied" > /dev/null
    			if [ $? -ne 0 ]
    			then
    				cat temp.txt
    				echo "" > temp.txt
    				break
    			else
    				printf "."
    			fi
    		fi
    		char=""
    	done

    the response:
    @PJL INFO ID
    "Brother HL-1110 series:84UE03:Ver1.08"