[Python] Python HTTP Server One Liner

As fidepus learned the “Python HTTP Server One Liner” from anyk, I needed to duplicate this wisdom myself – because I’ll forget it as well ;)!

These commands will start an HTTP server on the current directory, listening on Port 8080.

Python 2.X:
python -m SimpleHTTPServer

Python 3.X:
python -m http.server

Original Post and Kudos to: http://www.fidepus.de/2014/05/python-server-one-liner/

[Win8.1] ATI Radeon Xpress 1250 on Windows 8.1 / 64 bit

As I wanted to use an older Notebook with ATI Radeon Xpress 1250 Graphics Chip, I needed to get an recent driver.
Sadly, ATI/AMD does not provide drivers for Win 8.1 / 64 Bit for this old chips.
However, with Digitalflem you can create your own “old/new” Driver:

1.) Download the ATI Catalyst 10.2 Windows 7 | Vista (64-bit) legacy driver, start the installation and abort it – so you got the files unzipped
( i.e. from http://downloads.guru3d.com/ATI-Catalyst-10.2-Windows-7-%7C-Vista-%2864-bit%29-download-2478.html )

2.) Download the latest ATI Catalyst Driver for Windows 8.1 (64-bit), start the installation and abort it – so you got the files unzipped
( i.e. from http://support.amd.com/de-de/download/desktop?os=Windows+8.1+-+64 )

3.) Download and install Digitalflem 2.0 from: http://digitalflem.mydiscussion.net/download

4.) Start Digitalflem 2.0 and follow the Guide: http://digitalflem.mydiscussion.net/guide

[RaspiPi] RF24 Radio Link between 2 Raspberry Pis

Hi there,

awesome coder TMRh20 did write some cool librarys for the widely used RF24 radio modules.
These tiny things work with SPI and thanks to TMRh20s work, you can use them quite easily to connect two RPis.
You can find his/her Github on https://github.com/TMRh20, as well as a lot of good documentation on his/her blog http://tmrh20.blogspot.de/ and github.io http://tmrh20.github.io/

To make it short and connect to RPis, this is my reciepe, worked out with TMRh20 – Thanks a lot!

1.) You should connect the RF24 modules to your two RPis like shown here:

https://github.com/TMRh20/RF24Network/tree/Development#connection-info

I did not change anything in the config but did just connect the modules like mentioned in the table:

Pins:

PIN — NRF24L01 -RPI ——— RPi -P1 Connector
1 —- GND —– rpi-gnd —– (25)
2 —- VCC —– rpi-3v3 —– (17)
3 —- CE —— rpi-gpio22 — (15)
4 —- CSN —– rpi-gpio8 — (24)
5 —- SCK —– rpi-sckl —- (23)
6 —- MOSI —- rpi-mosi —- (19)
7 —- MISO —- rpi-miso —- (21)
8 —- IRQ —- – ————- –

2.) Install dependencies:
sudo apt-get install libboost1.50-all

3.) Install RF24toTUN on all RPis
mkdir rf24
cd rf24
wget http://tmrh20.github.io/RF24Installer/RPi/install.sh
chmod +x install.sh
sudo ./install.sh

Do you want to install the RF24 core library, Y/N?Y
Do you want to install the RF24Network library?Y
Do you want to install the RF24Mesh library?Y
Do you want to install the RF24toTUN library?Y
Do you want to compile RF24toTUN with RF24Mesh support?N

cd rf24libs/RF24Network/

vi RF24Network_config.h
change #define MAX_PAYLOAD_SIZE
to #define MAX_PAYLOAD_SIZE 1514

sudo make install -B

cd ..
cd RF24toTUN/

vi rf24totun.cpp
goto line 209: while(!radioTxQueue.empty() ) { // && !radio.available() ) {
and change it to: while(!radioTxQueue.empty() && !radio.available() ) {

sudo make install -B

4.) Use the Tunnel on both RPis (you’re in the RF24toTUN folder :)!):
Node 1, Master:
sudo rf24totun_configAndPing.sh 1 2
answer 0 for Master
got now IP: 192.168.1.1

Node 2, Client:
rf24totun_configAndPing.sh 2 1
answer 1 for Client
got now IP: 192.168.1.2

After that you can ping each other, even with -s100 for 108 bytes payload, or use ssh and such.

Addition:
If you want to use the LAN/WAN Connection of the Master RPi from your Client, you need to do following:
a) Master Site:
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -j MASQUERADE
# To forward and allow traffic, as mentioned here: http://tmrh20.github.io/RF24Ethernet/

b) Client Site:
sudo route add default gw 192.168.1.1 tun_nrf24
# Configure default gateway to the IP of your Master RPi and use the RF24 device to connect to it

[Win7+] Software Accesspoint

Sometimes you just need to give wireless access to one of your little toys (i.e. Tablets, Smartphones, Raspberry Pis with Wifi – you name it) – but you got no wifi accesspoint with you. Starting with Windows 7, this ain’t a problem anymore. You can setup an software ap in just a minute:

Enter following code into your command line interface to start an software accesspoint with the SSID WiBridge and the password mh28-dyi9-txwt:

netsh wlan set hostednetwork mode=allow ssid="WiBridge" key="mh28-dyi9-txwt" keyUsage=persistent
netsh wlan start hostednetwork

You can check upon your ap via:

netsh wlan show hostednetwork

And you can stop it with:

netsh wlan stop hostednetwork