Category Archives: Networking

TP-Link TL-MR3020 Portable OpenVPN Router Part 2

After almost a year on the shelf I finally got around to getting the final parts I needed to finish off the portable router/charger project.

 

First to arrive was the case from eBay which includes a basic case, charging circuit, small solar panel as well as a rather bright LED panel.  These can be had for roughly AUD$6 delivered making them a bargain case for this sort of project or any other that requires on the go 5V power really.

Next was to decide on which battery’s to use, knowing I only really had space to fit two cells after some research I went for a pair of LG-HG2 3000mAH  mostly after reading this in depth review and test.

As the case does not come with battery holders I turned to Thingiverse and found a design that was roughly the correct size and using Tinkercad adjusted it to fit the cells and (roughly) the case and printed it on my Anet A8.

 

  I then wired the cells, solar panel and LED panel to the charge board and did several charge/discharge cycles charging phones, etc to make sure all was well.

After I was satisfied that all was working well it was time to move the router into it’s new home which proved to be quite a bit more of a tight fit than my first measurements had suggested.

A switch was cut into one end to power the router while still maintaining the ability to use the device as a charger and light.

Some “butchery” had to be done in order to get the network jack to just fit in the height of the case.

An overall view showing the tight fit (and my awful soldering skills)

 

And some (mostly) final shots.

As you can see everything doesn’t quite fit in the case as well as I’d hoped. I indeed to do a second version however I will design and 3D print a case so that everything fits together neatly.

 

TP-Link TL-MR3020 Portable OpenVPN Router Part 1

I’ve had a TP-Link TL-MR3020 mini router sitting around in my draw for sometime waiting for an idea for a project for it.

Motherboard

Finally decided that I would configure it as a portable OpenVPN hot spot based on this article from Logan Marchione to allow secure internet access, bypass geo-blocking and also to get around browsing restrictions on both the uni network and other public networks.

I had issues with the standard firmware download from the OpenWRT website as there was not enough room left on the flash to install kmod-fs-ext4 for ExtRoot.

I came across another firmware that had been repackaged with all the required USB packaged installed and can be downloaded here.

After that the rest of the instructions worked fine, I use Usenetserver as my VPN provider as I also use Usenet and configured two different profiles one with several Australian servers just for bypassing restrictions and for security. The second profile is several US servers for getting around geo-blocking.

A copy of the OpenVPN config file I created can be downloaded here.

After configuring and testing the VPN a DNS leak was being shown allowing traffic to still be monitored by my ISP, etc. So I edited the dns servers here to the FreeDNS servers.

n

And changed the DNS resolve file to a custom one here:

With the lines:

nameserver 37.235.1.174

nameserver 37.235.1.177

With both of these changes the DNS leak was fixed and now showed the correct information when checked on IP Leak.

I’ve only really tested with a single client so far but throughput appears to be between 500-600kb/s the limit appears to be CPU power in the unit but is more than enough for browsing and the odd download.

After that was solved it was onto the hardware.

I removed the USB port and soldered the USB stick internally to tidy the whole package up.

The next step is this project is to move the router and USB stick into a USB charger/power bank such as this DIY kit below with an additional switch to allow toggling of the router functions.

Allowing for true portability as well as the convenience of charging phones and other USB devices on the go.

Solar USB charger
Solar USB charger stock picture

Followed on in Part 2 as the router gets installed into it’s new portable case.

Quick look VoCore

Had a package arrive the other month with my VoCore which was a project I baked on Indiegogo a while back.

The VoCore is a tiny computer running OpenWRT with a 360mhz processor and 32MB of RAM and 16MB of flash with built in Wi-Fi, two 100mbs network cards, USB and 28 GPIO ports.

Perfect for projects that have limited room or that require WiFi.

I knew the board was small but really didn’t think it would be as small as it is, here it is next to a USB stick:

DSC_0854

The size (and my soldering skills) made soldering connectors onto the board quite a challenge.

They do make a dock for it which breaks out the USB and Ethernet connectors but pretty  much doubles the price of the unit.

Initial configuration is done over serial with the provided USB-TTL converter but first power and serial lines have to be soldered on.

DSC_0863

As you can see my soldering skills aren’t the best on these small pitch connectors I will have to redo them before I use the unit in a permanent installation.

DSC_0861

After firing the unit up and connection via serial I reconfigured the wireless to operate in client mode and connect to my home Wi-Fi and was then able to connect via SSH:

vocore-login

My intention is to use this board with a USB Relay board to operate my garage door as well as other projects out the front of the house, this saves having to get a cable from the house into the garage which would be a nightmare.

Future projects may also include Wi-Fi connected appliances such as washing machine, dryer, kettle and the likes due to the small size, GPIO pins and cheap price.

Raspberry Pi Doorbell and Camera Part 2

After a session of lifting tin and climbing through the roof to run cables the camera has now made it’s way to it’s new home 🙂

After the cable was run I wired up the POE and Ethernet and found there was too much of a voltage drop over the line to keep the Raspberry Pi running while taking a picture so I changed out the 5v PSU for a 7.5v PSU to bring the line voltage up.

After I did this the Pi booted no worries and shot off a picture.

psu

My eBay case arrived and while not the most subtle case for the job it has more than enough room to house everything.

The Pi was mounted to the plastic board inside with a pair of zip ties and the camera with a good chunk of blue tack. I think I’ll eventually mount the camera better but with the camera board being so small it is a bit of a pain to mount.

case outside

case inside

camera

And after mounting the case out the front we have success:

front door

I made a few further changes to the software side as well as shown here:

run script

As you can see here upon the door bell being pressed the Pi:

1. Sends a pushover notification via the API

2. Captures two pictures. One low res and one hi res

3. Attaches and emails the low resolution picture

4. Inserts the date and time to a mysql database

5. Copies the hi resolution picture to my NAS

 

Here you can see the mysql table which simply contains the date and time the door bell was pressed, eventually I will do up a PHP interface to be able to view the data from mysql more easily.

mysql

 

And now onto the next project 🙂

Webserver, Mysql and Temp Sensors

A bit of work finally got done on the back end systems for home automation including setup of a new Debian VM for a web server and Mysql server to allow data collection from various sensors around the house as well as hosting the library data for Kodi (XBMC).

I now have two virtual machines running on the NAS. The Windows 7 machine runs Home control assistant which gives access to Insteon control as well as the USB relay boards from both PC and Phone.

The Debian machine is configured with Apache2 for web, Mysql database as well as running python scripts to poll the various sensors and insert the data into Mysql.

virtualbox

I currently am using two different sensors. The water proof DS18S20 temperature sensor and the DHT22 temperature/humidity sensor.

Further DHT22 sensors will be added to both the bathroom and en-suite to allow humidity based extraction fan toggling.

Sensor overview:

table

Temperature graph:

Temp

Humidity Graph:

Humidity

Currently all sensors are polled every 5 minutes and saved into Mysql. Graphing is done with jpgraph in PHP which I need to spend sometime on to get looking right/nice.

Another database keeps track of each time the door bell is pressed and I plan on making a PHP front end for it that will link to the pictures, etc.

I’ve also ordered a cheap weather station with wind speed, direction, rain collection, temp and humidity that allows USB data collection which I will add in as well which will hopefully give a good location weather overview and will allow me to control sprinklers, etc based on rain, etc.

Door bell system has been put into it’s new case and is ready to be mounted just need to run the CAT5 to it’s new home which should hopefully get done over the weekend.

Raspberry Pi Doorbell and Camera Part 1

After missing several people knocking at the door it was decided a doorbell was in order but I didn’t just want some annoying ringing bell to drive me nuts so after seeing Ahmad Khattab’s project on Hackaday here planning began on my own Raspberry Pi based door bell.

You can find Ahmad’s original Github repository here and Google doc with build instructions here.

Parts List:

Raspberry Pi Model B

Raspberry Pi Camera

Cheap wireless doorbell

Weather proof Case

 

I downloaded the complete SD image from here and used Win32 Disk Imager to put the image on an 8GB SD-Card after boot I went in and modified the code slightly by commenting out lines related to the LCD as I won’t be using it and have added support for Pushover a service that allows for push notifications to be sent to iOS, Android and also desktop browsers.

I also modified camera.py to take two pictures one at 800×600 which is emailed and a second at full resolution which is later copied to my NAS for storage.

launch.sh is used to start it monitoring the GPIO pin, I added this as a cron job on reboot.

Can download the modified files here.

The files that need to be customized for use are:

send_email_fast.py – Set your email address and SMTP server

send_email_attachment.py – Set your email address and SMTP server

pushover.py – Set your Pushover User and App Key’s

run.py – Un-comment and set path if you wish to copy the picture to a network share

There is also Google hangouts, twitter and Zapier support but I have not used them here.

 

With the software sorted it was onto the hardware:

DSC_1198

I stripped the circuit board from the receiver unit and un-soldered the speaker and battery connectors and replaced them with new leads. Someone was even nice enough to silk screen the board with all the appropriate labels.

DSC_1199

I then connected the battery leads to 3.3v (Pin 1) and Ground (Pin 9) and the speaker leads to GPIO7 (Pin 26) and Ground (Pin 25) for my build I omitted the 10K resister and am yet to have any issues.

gpio

DSC_1200

DSC_1222

A quick test and seconds later both a pushover notification and E-Mail arrived:

notification

Open up the email and we find the picture attached:

email

I’m still awaiting my case from China after it arrives the next step will be to mount all the hardware in the case, run a network cable to the location and wire up PoE for the unit.

I also intend to add support for the camera to be triggered by the motion sensor out the front for when I’m away or asleep for security.

 

Read on in Part 2

uRADMonitor

I recently read about the uRADMonitor project and contacted Radu who runs the project to get on board and get a unit up and running here in Australia.

You can read about that building of the board here which in it’s self is amazing to see.

Bit over three weeks in the mail and here it is 🙂

All the way from Romania

All nicely packaged.

Package contents. uRADMonitor, USB cable, CAT5 cable, USB power

The unit is to be mounted outside under my veranda which means getting both network and power out to the unit. I opted to do a somewhat DIY POE method to save running multiple cables.

This involves splitting out the two unused pairs in the CAT5 cable (Brown & Blue) at both the switch end and the unit end to allow power to be “injected” at the switch and extracted again at the unit end.

In my setup I have only connected the data wires to the patch panel and the power wires are connected to a length of wiring running off to the power supply as shown below:

Cable is split at the rear of the patch panel with the unused pairs being connect to a 5V PSU.

Then at the unit end the data wires are terminated and the power wires split away for a power jack to be soldered onto.

uRADMonitor POE end

POE Voltage at uRAD unit

Next came mounting…

All mounted up.

Connected up the power and is now transmitting away 🙂

Cupboard Rack Build

When the house was getting built I made sure to get power and a phone jack run into the top of the linen cupboard in anticipation of networking, storage and home automation requirements .

It quickly became quite a mess with cables hanging everywhere so it was decided it was time to clean it up and get it into a rack.

From top to bottom:

24 port patch panel

Linksys 24 port smart switch

3RU case containing Netgear ADSl modem, Router Station Pro and PSU’s

1RU blanking plate with 3x 20w per channel class D amps.

(To Drive Bathroom, kitchen and deck speakers)

 

Still a bit more to do on cable tidying and I’m going to get some blanking plates to cover the bottom up and then possibly build a second rack next to it to house the NAS and drives.

Before the rack/tidy up

All cleared out

Racking the amps into a 1U face plate

First parts racked up

Everything racked up

Everything racked up and powered up