cjj's blog

configure software access point on Linux

When you have a wire-connected computer with a unused wireless interface, an option is to use the device as an access point to improve the coverage of your WIFI network. This can be done by setting up hostapd, which takes care of wireless interface configuration, authentication and security. However, in order for the wireless traffic to actually go through the wired connection and onto the internet and vice versa, the two interfaces needed to be bridged somehow. There are several scenario for configuring the bridge connection.

Presence alert in OpenHAB by DHCP server in ASUS router

The home automation system OpenHAB has the ability to coordinate difference networked devices to perform automatic control under different conditions. One of the important conditions is the presence of different residents in the house. Using "Network Health" module of OpenHAB allows the presence test through the detection of devices carried by the residents. One simply create item such as

telnet and http server on NodeMCU v2

The NodeMCU v2 firmware for esp8266 only allows one TCP server. Usually, one will use this to serve a status page for the wireless unit. But, sometimes, maybe during development, it is desirable to also have a telnet access to the unit over WIFI to do some tweaking. Here, we achieve this by leaving a backdoor on the http port. By connecting to port 80 with telnet and enter "telnet" as the first input line, the connection is switch to a telnet service allows direct interaction with the Lua interpreter. The actual code is listed below:

TP-Link TL-WR720N DMZ Proto 41

It seemed that the proto 41 for ipv6 traffic is not forwarded to the DMZ by TP-Link 150Mbps Wireless N Router TL-WR720N. This put out the hope of setting up 6to4 in my apartment. There is a slight chance that the filtering was done by the ISP. However, I had no suitable option to test this.
As it seems, the same is true for TL-WR702N.

Brief steps to dual boot Debian Sid on SONY VAIO Pro 11

(The following assumes that a USB network adapter is available to get internet connection. If not, you will need to use the regular iso instead of netinst in step 2 and download the kernel package mentioned in step 7 in Windows before installing it in Linux.)

1. Make room for Linux: In Windows 8, use disk management to make room for Linux installation. (See, e.g., this.)

Visual Studio 命令提示字元 (2010)

Visual Studio 2010 Express提供了一個簡單的C++編譯環境:『Visual Studio 命令提示字元 (2010)』。

cl hello.cpp


Google Earth (v6) 的中文字形 (debian sid amd64)

*** 本則資訊已過時 *** Linux版的Google Earth從發行以來,中文的顯示一直都不能隨裝即用。一個主要的原因在於它用的圖形介面程式庫是它所附帶,32位元的QT動態程式庫。因為不是使用者系統中所的QT動態程式庫,使用者不能用qtconfig來更正中文字形。這一點,在一般32位元的Linux系統上,可以用系統中已安裝的動態程式庫(libQT*.so檔們)來取代,詳細步驟可以參考[1]。在64位元的系統上,由於系統中的32位元相容程式庫常有不全(如debian sid的libQtWebKit.so),單純的刪去附帶的版本會造成程式無法啟動。這時,可以試著用[1]中打包好的檔案來跑看看。但如果還是動不了,要自行補全所有的程式庫可能要費好一些功夫。 一個比較簡單的方法是利用QT程式庫的通用命令列參數: -stylesheet來指定Google Earth的style(見[2])。這個方法用在Window下,網路上已經多次被提到(例如[3])。只是,雖然Google Earth是用QT寫成的,Google似乎用到了一些標準外的方法,以至於在指定stylesheet時一些popup的繪製立即會出現問題。而對style的指定,也常看不到想要的效果。

Indent style for my C++ coding

I prefer to indent my code with TABs. Some people do not like that because a TAB can represent different amount of spaces in different editors or viewers. However, I like TABs for their semantic meaning of levels of grouping. How a code editor or viewer displays this grouping information should be left to the liking of its user. And, using two spaces (or four) is just wasting an extra character when we can just set the TAB size to 2 (or 4). I also favor compactness and readability. It's desirable to make the code visually shorter as long as it remains readable.


Subscribe to RSS - cjj's blog