Category Archives: Memo

How to create an accesspoint using a RealTek 8192cu Usb Wifi Dongle In RPI1 B+

8192cu is now supplied in default kernel, but it is not working when running as an access point. So I need to recompile the driver.

1.get the kernel’s headers

You have to get the kernel’s header files, the common way is

sudo apt-get install linux-headers-...

But in RPI, the easiest way is rpi-source.

sudo wget -O /usr/bin/rpi-source && sudo chmod +x /usr/bin/rpi-source && /usr/bin/rpi-source -q --tag-update

The kernel is compiled by gcc-4.8.3+, so if you have the gcc below 4.8.3, you have to install it.
first add

deb jessie main contrib non-free rpi

in /etc/apt/sources.list, and then

sudo apt-get install -t jessie gcc-4.8 g++-4.8

maybe you want to manage multi gcc versions

sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50

also you need curses for make menuconfig

sudo apt-get install libncurses5-dev

Continue reading


譬如我想翻 那么只需要配置



Continue reading


05 02 00 02

  1. 0x00: No authentication
  2. 0x01: GSSAPI[12]
  3. 0x02: Username/Password[13]
  4. 0x03–0x7F: methods assigned by IANA[14]
  5. 0x80–0xFE: methods reserved for private use

05 03 00 01 02

Runtime error when setting innerHTML in IE8

When I use plupload, I was puzzled by an exception.
It’s simple.
I reproduce it with the critical code.

<p id="container"></p>


var a = document.createElement('div');

In IE8,It throws runtime exception.

I found some same situations, just like to modify a element triggered by itself, but this one seems unreasonable.

Finally, I found out why: the html content models, Each element defined in this specification has a content model: a description of the element’s expected contents. An HTML element must have contents that match the requirements described in the element’s content model.

The link of description

And The content models

I thought IE has more powerful fault tolerant, may be sometimes.