Thursday, October 25, 2018

Script for macOS PPTP VPN

macOS 之下的 VPN GUI 設定已不支援 PPTP, 所以在 macOS 之下要使用 PPTP VPN 需要 DIY.
Sample Script (ex : /etc/ppp/peers/pptpvpn), PPTP Server : Volans Router.

plugin PPTP.ppp
noauth
remoteaddress "IP or Hostname"
user "USERNAME"
password "PASSWORD"
redialcount 1
redialtimer 5
idle 1800
receive-all
novj 0:0
ipcp-accept-local
ipcp-accept-remote
refuse-eap
refuse-pap
refuse-mschap-v2
hide-password
mppe-stateless
looplocal
nodetach
ms-dns 8.8.8.8
usepeerdns
defaultroute
debug

Ref Link :
https://lemnet.fr/blog/tag/vpn
https://www.cts-llc.net/2017/02/21/pptp-on-osx-just-one-last-time.html
https://smallhacks.wordpress.com/2016/12/20/pptp-on-osx-sierra/
https://malucelli.net/2017/05/16/pptp-vpn-on-macos-sierra/
http://neutrofoton.github.io/blog/2017/11/22/pptp-on-macos/
https://filipmolcik.com/pptp-vpn-on-macos-sierra-and-high-sierra/
https://www.linuxquestions.org/questions/linux-networking-3/pptpd-not-working-ms-chap%5Bv2%5D-auth-not-performed-4175445673/
https://ethancbanks.com/2016/09/26/auto-adding-routes-when-mac-pptp-connection-comes-up/

Notes : remark the “defaultroute” and add following line for connect internet & PPTP VPN  in the same time or ref https://ethancbanks.com/2016/09/26/auto-adding-routes-when-mac-pptp-connection-comes-up/.
sudo route -n add -net 192.168.1.0/24 192.168.1.1

Thursday, September 06, 2018

ASUS RT-AC3200, Do NOT route my traffic through the VPN

Firmware Version : 3.0.0.4.382_50624
WAN DNS Setting
  Connect to DNS Server automatically : yes (NOT THE ROOT CAUSE, NO MATTER WHAT VALUE CONFIGURED)
LAN - DHCP Server
  DNS and WINS Server Setting
  DNS Server : 8.8.8.8
Enable SSH Service : yes
Before Routing Table Updated : 
After Routing Table Updated : 
Verify :
WTF !

Sunday, January 18, 2015

ST-Link / V2 Installation in Virtual Box

Ref Link : ST-Link / V2 installation in Virtual Box
Serial No : non-readable ascii characters


Remove Serial No :


Guest O.S. (Debian 7.8) Screen Capture, ST-Link / V2 Work. (After Empty Serial No) :

Tuesday, August 19, 2014

LaunchPad Temp GUI @MSP430 Value Line LaunchPad (MSP-EXP430G2)

LaunchPad Temp GUI (if LaunchPad Temp GUI Can Not Exec, Install 32bits JRE) :
LaunchPad Temp GUI Application Using 32 bits javaw.exe :
System Environment -> 64 bits :
System Device Manager :
Device Side Source Code (Transmit Only, Without "Receive" Process) :

putty.exe log file :

ref link : http://www.badprog.com/electronics-msp430-using-the-temperature-demo-gui


Sunday, October 20, 2013











RTEMS – stm32F407 Discovery Board


  • Environment :
Host O.S. : Windows 7 64bits With stlink v2 Driver + VMWare Workstation 10.0.0 build 1.295980.
Guest O.S. : Ubuntu 13.10 Desktop 64bits.
  • PreInstall :
sudo apt-get update;sudo apt-get upgrade -y
sudo apt-get install -y autoconf automake autotools-dev build-essential git \
dpkg-dev g++ g++-4.6 libalgorithm-diff-perl libalgorithm-diff-xs-perl \
libalgorithm-merge-perl libdpkg-perl libgmp-dev libgmp3-dev libgmpxx4ldbl \
libltdl-dev libmpc-dev libmpfr-dev libstdc++6-4.6-dev libtimedate-perl \
libtool texinfo flex bison gawk expat libexpat-dev libncurses5-dev \
libusb-1.0.0-dev libsgutils2-dev
mkdir for source & build
br prefix : for arm-rtems4.11 BSP
bre prefix : for arm-rtemseabi4.11 BSP
$ mkdir ~/rtems
$ mkdir ~/rtems/source
$ mkdir ~/rtems/build
$ mkdir ~/rtems/build/b-autoconf
$ mkdir ~/rtems/build/b-automake
$ mkdir ~/rtems/build/br-binutil
$ mkdir ~/rtems/build/bre-binutil
$ mkdir ~/rtems/build/br-gcc
$ mkdir ~/rtems/build/bre-gcc
$ mkdir ~/rtems/build/br-gdb
$ mkdir ~/rtems/build/bre-gdb
$ sudo mkdir /opt/rtems-4.11
$ sudo chown -R $USER /opt/rtems-4.11
$ export PATH=/opt/rtems-4.11/bin:$PATH
  •  Install autoconf & automake :
$ mkdir b-autoconf
 $ cd b-autoconf/
 $ ../autoconf-2.69/configure --prefix=/usr
 $ make
 $ sudo make install
 $ cd ..
 $ rm -fr b-autoconf/
 $ mkdir b-automake
 $ cd b-automake/
 $ ../automake-1.12.2/configure --prefix=/usr
 $ make
 $ sudo make install
 $ cd ..
 $ rm -fr b-automake/
  • Build – Crosstool :
For BSP arm-rtems4.11
~/rtems/source/rtems$ export TARGET="arm-rtems4.11"
For BSP arm-rtemseabi4.11
~/rtems/source/rtems$ export TARGET="arm-rtemseabi4.11"

  • Build – O.S.  & test sample :
~/rtems/source$ git clone git://git.rtems.org/rtems.git rtems
configure & build :
~/rtems/source/rtems$ ./bootstrap
~/rtems/source/rtems$ cd ~/rtems/build/br-stm32
~/rtems/build/br-stm32$ ../../source/rtems/configure --target=${TARGET} --enable-rtemsbsp=stm32f4 --enable-tests=samples --prefix=/opt/rtems-4.11
~/rtems/build/br-stm32$make
~/rtems/build/br-stm32$make install

  • Build – st-util :
~/rtems/source$ git clone git://github.com/texane/stlink.git stlink
~/rtems/source$ cd stlink
~/rtems/source/stlink$ sudo cp 49-stlinkv*.rules /etc/udev/rules.d/.
~/rtems/source/stlink$ sudo udevadm control --reload-rules
~/rtems/source/stlink$ ./autogen.sh
~/rtems/build/b-stlink$ ./configure --prefix=/opt/rtems-4.11
~/rtems/build/b-stlink$ make
~/rtems/build/b-stlink$ make install

  • Flush sample file (ex : hello[ps]) to stm32F407 Discovery Board :
...$ arm-rtemseabi4.11-objcopy -O binary hello.exe hello.bin
...$ st-flash write hello.bin 0x08000000
Screen Capture :

[ps]
Open407V-D With Extension Board Uart 3 pin def :
Tx : PC10
Rx : PC11
RTEMS Hello.exe :
Using UART 3, Pin Define :
Tx : PD8
Rx : PD9

RTEMS Source Builder For Debian / Ubuntu :
https://ftp.rtems.org/pub/rtems/people/chrisj/source-builder/source-builder.html#_ubuntu

mount nullfs (null file system) @FreeNAS for jail

在 FreeNAS / jail 中要 mount Host 的 folder 須在 Host 上執行 mount (nullfs), mount point 即是 jail folder 相對應的 node.