Tuesday, May 07, 2024
Friday, June 12, 2015
Raspberry PI turns EE Osprey Mifi into automatic back up connection for Home or Office Broadband
I have a 39Mbps Down 10Mbps up FTTC broadband connection. These days that is nothing to shout about unless it stops working. If your business has experienced a prolonged outage you have probably muddled through with 3G dongles/phone tethering/home or cafe working. If you are a big enough organisation to have an IT person or tills that only work if the internet does then you have a redundant backup link and a plan. Surely you do don't you ?
I aspired to do better and have a seamless fail-over solution at home. Spouses and children show far less restraint and far more anger when asking is it fixed yet every two minutes than the usual client.
This is how I achieved it for zero increase in my monthly cost:-
EE provides my FTTC broadband
The broadband package comes with a free 10 Gig per month upgrade to my 4g pay monthly phone plan.
EE allows me to share the 4G data allowance with all devices on my plan.
EE gave my a MIFI unit last week for free so no ongoing monthly charge as it shares my data plan.
Upstairs in back bedroom the Mifi unit gets a fairly reliable 12Mbps down 5Mbps up over 4G
If only it had an ethernet port it would be perfect as a backup route for my home network. The challenge was to use a Rasperry pi to bridge the USB interface to its Ethernet port and use a Homeplug to get it to accept packets from the downstairs FTTC router when phone line was unplugged.
I now have this working:- The necessary networking ingredients incantations and magic are as follows:-
my lan network is 192.168.9.0/24
my FTTC router is 192.168.9.1/24 an Ubiquiti Edge Router POE but other makes are available. (cough cisco).
* the magic routing. The osprey will NAT anyway so no point having a dedicated WAN port to talk to it. Your firewall requirement mileage may vary.
* the assumption here is the pppoe dies when fttc link goes down. I may experiment with ping based SLA route injection/retraction for faster fail-over but the 30 seconds this currently takes is an acceptable outage for a home network.
On Back up Link
Bonus to this config is you can make use of the wifi part of the Mifi to provide an extra wifi point for your home network. This is useful as it is on the other side of my house from my Ubiquiti access point but I did have to connect the two by 200mbps Homeplugs.
I aspired to do better and have a seamless fail-over solution at home. Spouses and children show far less restraint and far more anger when asking is it fixed yet every two minutes than the usual client.
This is how I achieved it for zero increase in my monthly cost:-
EE provides my FTTC broadband
The broadband package comes with a free 10 Gig per month upgrade to my 4g pay monthly phone plan.
EE allows me to share the 4G data allowance with all devices on my plan.
EE gave my a MIFI unit last week for free so no ongoing monthly charge as it shares my data plan.
Upstairs in back bedroom the Mifi unit gets a fairly reliable 12Mbps down 5Mbps up over 4G
If only it had an ethernet port it would be perfect as a backup route for my home network. The challenge was to use a Rasperry pi to bridge the USB interface to its Ethernet port and use a Homeplug to get it to accept packets from the downstairs FTTC router when phone line was unplugged.
I now have this working:- The necessary networking ingredients incantations and magic are as follows:-
my lan network is 192.168.9.0/24
my FTTC router is 192.168.9.1/24 an Ubiquiti Edge Router POE but other makes are available. (cough cisco).
EE Osprey Mifi
configured to No DHCP and 192.168.9.2/24 via its web guiEdgerouter additional commands
set firewall receive-redirects disable
*because otherwise router will send an ICMP redirect if it routes a packet out of the same interface and attached PC will then use backup link even if main link comes back up.
set interfaces ethernet eth0 pppoe 0 default-route force
*because I found in testing that the default route wouldn't always come back into the kernel routing table when the FTTC link re-established
set protocols static interface-route 0.0.0.0/0 next-hop-interface pppoe0 distance 10
set protocols static route 0.0.0.0/0 next-hop 192.168.9.2 distance 20
* the magic routing. The osprey will NAT anyway so no point having a dedicated WAN port to talk to it. Your firewall requirement mileage may vary.
* the assumption here is the pppoe dies when fttc link goes down. I may experiment with ping based SLA route injection/retraction for faster fail-over but the 30 seconds this currently takes is an acceptable outage for a home network.
Raspberry PI
Hmm this was a lot trickier than I thought. You will need:-
a /etc/network/interfaces file containing
auto lo
iface lo inet loopback
iface eth0 inet manual
auto br0
iface br0 inet static
bridge_ports eth0
address 192.168.9.3
broadcast 192.168.9.255
netmask 255.255.255.0
gateway 192.168.9.1
allow-hotplug usb0
auto usb0
iface usb0 inet manual
up ifconfig $IFACE 0.0.0.0 up
up brctl addif br0 $IFACE
down ifconfig $IFACE down
post-down brctl delif br0 $IFACE
The bridge interface IP address 192.168.9.3 gives me a method to communicate with the PI for other projects but the IP address isn't need to make the fail-over work.
The mifi when connected via usb to the PI isn't detected as a network interface but as a mass storage device and we need to fix that.
sudo apt-get install ppp usb-modeswitch wvdial
and we need bridging to actually work so
sudo apt-get install bridge-utils
now when you plug the mifi unit in (and switch it on) it will auto detect and become part of the network bridge.
And that's it...
pi@raspberrypi ~ $ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0424:2517 Standard Microsystems Corp. Hub
Bus 001 Device 008: ID 1bbb:0195 T & A Mobile Phones
Bus 001 Device 005: ID 22b8:0938 Motorola PCS
Bus 001 Device 006: ID 22b8:093a Motorola PCS
pi@raspberrypi ~ $ ping 192.168.9.2
PING 192.168.9.2 (192.168.9.2) 56(84) bytes of data.
64 bytes from 192.168.9.2: icmp_req=1 ttl=64 time=1.60 ms
64 bytes from 192.168.9.2: icmp_req=2 ttl=64 time=0.342 ms
--- 192.168.9.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 0.342/0.974/1.607/0.633 ms
pi@raspberrypi ~ $ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.46c46400d0da no eth0
usb0
This is a ping from the PI to outside world initially via FTTC then watch latency increase as I disable the FTTC link and it switches to the 4G
64 bytes from 8.8.8.8: icmp_req=120 ttl=52 time=13.5 ms
64 bytes from 8.8.8.8: icmp_req=121 ttl=52 time=14.9 ms
64 bytes from 8.8.8.8: icmp_req=122 ttl=52 time=13.2 ms
64 bytes from 8.8.8.8: icmp_req=123 ttl=52 time=13.8 ms
64 bytes from 8.8.8.8: icmp_req=124 ttl=52 time=13.2 ms
64 bytes from 8.8.8.8: icmp_req=125 ttl=52 time=183 ms
64 bytes from 8.8.8.8: icmp_req=126 ttl=52 time=62.4 ms
64 bytes from 8.8.8.8: icmp_req=127 ttl=52 time=103 ms
64 bytes from 8.8.8.8: icmp_req=128 ttl=52 time=94.0 ms
64 bytes from 8.8.8.8: icmp_req=129 ttl=52 time=93.8 ms
64 bytes from 8.8.8.8: icmp_req=130 ttl=52 time=92.7 ms
64 bytes from 8.8.8.8: icmp_req=131 ttl=52 time=72.8 ms
Thanks go to
https://www.thefanclub.co.za/how-to/how-setup-usb-3g-modem-raspberry-pi-using-usbmodeswitch-and-wvdial
On Main FTTC link
On Main FTTC link
On Back up Link
Bonus to this config is you can make use of the wifi part of the Mifi to provide an extra wifi point for your home network. This is useful as it is on the other side of my house from my Ubiquiti access point but I did have to connect the two by 200mbps Homeplugs.
Ok the next challenge is to get the Mifi to send my mobile phone a text every time the system fail-over or recovery happens...how hard could that be?
Thursday, March 27, 2014
Dell2005-WFP 20" Monitor Repaired and temp controlled soldering iron added to kit
I had fixed a 24" version of this monitor a few years ago for some one else. This time it was my own and the screen had a horrible blurry red interference pattern across it. Dis-assembly required very determined pulling on the front bezel. The power board, once liberated, showed 10 capacitors in the area that that feeds the logic board. It would have been a £7.00 repair but the trip to Maplin to pick up the replacement capacitors gave the opportunity to also purchase a temp controlled soldering iron. This made de-soldering much easier at 380 deg C and the lead free solder flowed far better on the new components than I ever used to achieve with my ancient old Antex iron.
Monday, October 21, 2013
Dishwasher repair ...Again
This time water stopped heating. I assumed that it was the temp sensor. Wrong!. Then the inline heater element (2KW 32mm). Wrong!
In fact it was the control board. Hundreds of pounds for a replacement...or just soldering a nice thick copper wire over the track to the relay pins. Job done dishes washing :)
In fact it was the control board. Hundreds of pounds for a replacement...or just soldering a nice thick copper wire over the track to the relay pins. Job done dishes washing :)
Saturday, July 20, 2013
Finally I have the microportable system I always wanted. I have my thinkoutside foldable keyboard successfully paired via bluetooth with my goophone i9. In fact I am typing this blog entry using this combination. Real cursor keys when editing on an android!
Next up is to try to remote desktop to my office machine. Some SSH ing to routers is also called for.
Next up is to try to remote desktop to my office machine. Some SSH ing to routers is also called for.
Tuesday, June 04, 2013
Goophone i9
Picked one of these up and it is a lovely phone if you can't afford the Samsung Note II. The only problem is that it doesn't work well with 3G on an O2 network in the UK. In fact to even make and receive calls reliably I have had to put sim into the second sim card slot. Thus relegating the phone to 2G with gprs / edge data speed which is SLOW!
Hoping for a firmware update that will fix 3G radio to work on UK bands
Hmmm seems I have been caught out by the spec. the 3G bit of the goophone works on 2100/850 and of course O2 is 2100/900 . Told to try Vodaphone.
Hoping for a firmware update that will fix 3G radio to work on UK bands
Hmmm seems I have been caught out by the spec. the 3G bit of the goophone works on 2100/850 and of course O2 is 2100/900 . Told to try Vodaphone.
Sunday, June 17, 2012
Raspberry PI connected to netgear router means packet loss
After multiple power supplies and different network cables I find that if I type
sudo mii-tool -F 10baseT-FD eth0
then the 20-30% packet loss on Ethernet interface goes away.
And suddenly it all works sweeeeet !
Blogged this from the otherwise truly dreadful midori browser
sudo mii-tool -F 10baseT-FD eth0
then the 20-30% packet loss on Ethernet interface goes away.
And suddenly it all works sweeeeet !
Blogged this from the otherwise truly dreadful midori browser
Sunday, October 02, 2011
Zanussi ztd6255 dishwasher resurrected
Zanussi dishwasher failing to finish cycle. Symtoms being a tripped RCD breaker and then constant cycle of 3 beeps audio error code when retried. Replaced the obviously bust motor capacitor but found cycle still wouldn't finish. Anti leak switch was engaged due to water in drip tray. Eventually traced source to spray arm feed pipe 2/3 way up rear right hand side of machine. Half the screw thread on plastic fitting had broken so threw away neoprene ring seal to gain another two milimeters of thread though machine and used some plumber mait with a couple of wraps of plumber's tape. All good after a 70 deg wash. Still took most of the evening to do due to length of time test washes take. Trying to watch Spooks and constant checking for a flooded kitchen is really stressfull. That and it is an integrated dishwasher so getting it in and out is a pain.
Tip: Maplin open on a Sunday until 6.00pm amazing if you want the necessary 3uF cap for £3.80 instead of spending £13 on the 'genuine part'
Tip: Maplin open on a Sunday until 6.00pm amazing if you want the necessary 3uF cap for £3.80 instead of spending £13 on the 'genuine part'
Wednesday, September 28, 2011
Quick Tech update:- The viewsonic viewpad 7 is another android addition to the household. It is everything I wanted the old Nokia 770 to be. It takes a sim card has a GPS and is to all intents and purposes just a much larger version of the Orange Sanfrancisco phone I carry around with me.
So it works as a back up phone if should I run out of battery on the sanfran. It makes wi-fi browsing and email in coffee shops a much better experience and the kids can see what they are doing when playing angry birds. A win. So far only glitch is I can't get the stowaway keyboard to pair with it.
So it works as a back up phone if should I run out of battery on the sanfran. It makes wi-fi browsing and email in coffee shops a much better experience and the kids can see what they are doing when playing angry birds. A win. So far only glitch is I can't get the stowaway keyboard to pair with it.
Monday, February 14, 2011
Phone and Automobiles
The screen on the Samsung pixon broke and I pleaded for a replacement phone that ran the Android operating system. The powers that be listened carefully to my reasoned arguments and gave me a Blackberry instead. AAAAAAAARGH!
Despite the truly addictive e-mail capabilities I heroically decided to go cold turkey and forked out my own hard earned for an Orange San Francisco instead.
Had it for over a month now and it is truly a great phone. De branded and running android 2.2 of course with a company O2 sim.
I have even used an old Nokia tablet mounting kit and some drastic reworking with a hacksaw and plastic repair kit to build a car mount for it. I'll publish a picture sometime. It might look a bit of a bodge but it is super solid and the phone clicks into place in a reassuring manner.
Despite the truly addictive e-mail capabilities I heroically decided to go cold turkey and forked out my own hard earned for an Orange San Francisco instead.
Had it for over a month now and it is truly a great phone. De branded and running android 2.2 of course with a company O2 sim.
I have even used an old Nokia tablet mounting kit and some drastic reworking with a hacksaw and plastic repair kit to build a car mount for it. I'll publish a picture sometime. It might look a bit of a bodge but it is super solid and the phone clicks into place in a reassuring manner.
Plastic Repair kit
I have been fixing an increasing number of items with the repair kit I bought for my Samsung laptop. The off side Mondeo wing mirror developed an alarming list to one side this is included the outside cowling. I suspect someone leant on it hard when falling over in the snow in December. Repair involved removing glass and drilling out of three retaining blobs of plastic so outside cowling could be removed from internal mounting post. This showed problem that two of three vertical retaining screws had stripped threads/ broken mountings. So removed whole metal mounting post from bottom bracket and got two washers. Then sprayed original screws with silicone as a release agent. Used the screws to mount the washers onto correct surface with hand tightening. Then rebuilt the outside of the damaged plastic mounting pillar upto the washers. Once plastic had cured over night I removed screws and washers and remounted wing mirror. Had to melt the 3 mounting blobs back to re attach cowling. Overall a medium difficult job.
Monday, June 28, 2010
Zannussi Built in Dishwasher leaking
On departing front door of building noticed drip from celling. Uh oh! Leak from kitchen above communal hallway. Uh Oh ! That is my Kitchen!
So far have learnt that kitchen installers use novel methods of wedging my dishwasher in. Including two saw cuts into metal work and some reshaping with a hammer to avoid an intruding bit of pipework at rear. Oh and they didn't know how to use the rear leveller so had just rested it on a plank and for some reason left a couple of tiles stuck to back of machine as well. Anyway leak is in the drain hose and fitting replacement look like it will be a bit of a pig. Joy.
So far have learnt that kitchen installers use novel methods of wedging my dishwasher in. Including two saw cuts into metal work and some reshaping with a hammer to avoid an intruding bit of pipework at rear. Oh and they didn't know how to use the rear leveller so had just rested it on a plank and for some reason left a couple of tiles stuck to back of machine as well. Anyway leak is in the drain hose and fitting replacement look like it will be a bit of a pig. Joy.
Mondeo MK3 power locks
Near Side front door not locking and quote from garage to fix was best part of £200 inc the Vat. So another trawl round e-bay showed up some likely candidates. One week later and the job is done total spend £27.00 Advice to anyone replacing item :-
The tray that lines the interior door grab handle needs to be removed to reveal yet more screws if you want the trim to come off. Also only the lower half of mechanism needs to be replaced. Once you realise you can unclip the two parts you can then rotate it thus unhooking no longer required metal tie rod. Getting it back onto the dangling tie rod in door is medium difficult but whole job took me less than 2 hours.
The tray that lines the interior door grab handle needs to be removed to reveal yet more screws if you want the trim to come off. Also only the lower half of mechanism needs to be replaced. Once you realise you can unclip the two parts you can then rotate it thus unhooking no longer required metal tie rod. Getting it back onto the dangling tie rod in door is medium difficult but whole job took me less than 2 hours.
Tumble Drier Creda TCR2 bought then fixed!
So the tumble drier died just as we left on 2 week trip to Taiwan during Easter break. Upon return we immediately did nothing about it as getting builders out and having functional bathroom was the priority. Anyway finally heaved the ancient drier down to the local waste recycling depot and picked up second hand Creda condenser drier bought from Friday-ad. This model drier has a metal door so I couldn't see the drum going round when I tested it. But I heard noises and when door opened it felt warm so that was an advance on old drier. Of course when I got it home and installed I realised it didn't work at all. Reluctant to give in I establish belt had snapped. On second attempt got right belt for under a tenner delivered from E-bayer. Fitting a new belt to a drier is a nightmare. Calls for almost complete dismantle of drier including removal of motor. If I had know just how ruddy difficult it was I would never have started but just when I thought there was no way I could stretch the belt over the tensioning pulley, I finally managed it. It all works. Hurrah! Wife look less than happy about time it took to get it working but it does and total spend was less then £60. Also I am pretty sure I now understand the majority of the bits inside this beast so I can keep this one going for a long time.
Wednesday, December 30, 2009
Samsung N510 woes
Aaaaaargh! The case mounting for the samsung screen hinges are pathetic. My screen has always been a bit stiff to open. Now only one month after purchase all the brass inserts into the plastic base of the netbook have pulled out of their feeble plastic pillars. 1st sign was hearing small rattly bits of plastic inside case and noting that top and bottom half case part company slightly at power button. Second sign was noting that hinge covers don't line up with base. This is a design flaw, the top diameter of the mounting pillars should have been at least twice the size to cope with the expected strain. Even if Samsung do replace it under warranty I am pretty sure the next one will fail in exactly the same way. Unfortunately this is currently the perfect spec netbook for me so a refund doesn't get me anywhere. Starting with this knowledge and a new Samsung 510 netbook I think I would disassemble and add a ton of this stuff to the pillars
Thursday, November 26, 2009
SAMSUNG N510 Netbook
Had this for two days and so far it is looking good. Prodigious battery life 7+ hours. Sane fan placement to not cook battery. Decent screen size and keyboard marred only by the dodgy placement of the right hand shift key. I don't think I am going to regret this. If it can play full HD as promised by the ION chipset then it is going to be new weapon of choice.
Friday, October 23, 2009
PVR madness
Replaced that ASDA Onn PVR with a new SAGEM Freeeview PVR with HDMI to match the 42"HD panel I got. Bad move ....hating it!
Now in embarrassing position of pleading with friend who bought the ASDA box to let me have it back. He being a good chap has agreed. So my most troublesome clients (wife and kids) will now be happy.. right up to the point where I replace "THS" (The Huge Screen) with the old 20" Dell monitor.
Now in embarrassing position of pleading with friend who bought the ASDA box to let me have it back. He being a good chap has agreed. So my most troublesome clients (wife and kids) will now be happy.. right up to the point where I replace "THS" (The Huge Screen) with the old 20" Dell monitor.
Wednesday, May 20, 2009
Friday, November 21, 2008
IP switcher
As a manager of a national IP network I find myself constantly changing static IP addresses on my windows XP laptop. Commercial profile managers and switching utilities are available. You can instead just write a simple batch file to configure your network interface.
Here are two that I just created.
rpghome.bat
netsh interface ip set address name="Local Area Connection" source=static addr=192.168.9.8 mask=255.255.255.0
netsh interface ip set address name="Local Area Connection" gateway=192.168.9.1 gwmetric=1
netsh interface ip set dns name="Local Area Connection" source=static addr=217.22.80.10 register=PRIMARY
netsh interface ip add dns name="Local Area Connection" addr=217.22.95.10 index=2
netsh interface ip set wins name="Local Area Connection" source=static addr=none
rpgdhcp.bat
netsh interface ip set address name="Local Area Connection" source=dhcp
netsh interface ip set dns name="Local Area Connection" source=dhcp register=PRIMARY
netsh interface ip set wins name="Local Area Connection" source=dhcp
Here are two that I just created.
rpghome.bat
netsh interface ip set address name="Local Area Connection" source=static addr=192.168.9.8 mask=255.255.255.0
netsh interface ip set address name="Local Area Connection" gateway=192.168.9.1 gwmetric=1
netsh interface ip set dns name="Local Area Connection" source=static addr=217.22.80.10 register=PRIMARY
netsh interface ip add dns name="Local Area Connection" addr=217.22.95.10 index=2
netsh interface ip set wins name="Local Area Connection" source=static addr=none
rpgdhcp.bat
netsh interface ip set address name="Local Area Connection" source=dhcp
netsh interface ip set dns name="Local Area Connection" source=dhcp register=PRIMARY
netsh interface ip set wins name="Local Area Connection" source=dhcp
Monday, August 04, 2008
Streetcar is great but is going to take some getting used to. I joined a week ago and have used it twice. First time to take the kids for the Tuberculosis Jab at a clinic in Hangleton. God knows why the NHS decided we had to go there but it seemed like a good first test of street car service. So for £11 I got 4 people there and back and did the weekly shopping. Trying to reverse the car out of its allocated parking spot was the first challenge things were very tight becuase someone had parked a long people carrier in the bay just behind. So grappling with an unfamiliar car I was at one point thinking of giving up. After that it was plain sailing though in future I think I'll book the the manual VW POLO instead of the Golf. The second use was today. I was at work in Kempton and need to get to Newhaven and back. Nearest Streetcar was already booked so I had a 10 minute walk to Devonshire place. Anyway car was great did the job and attempted to return car. Unfortunately some inconsiderate bugger had parked his plumbing bathroom fitters van in the reserved spot even though it is marked as no loading.
So big thumbs down to
for doing that. I tried ringing them but just got a fax machine.
Took a little time to convince streetcar to let me just leave car at office, but they did and full credit to them for that.
So big thumbs down to
Croxgrove
83 St James's Street, Brighton, BN2 1TP 01273676971for doing that. I tried ringing them but just got a fax machine.
Took a little time to convince streetcar to let me just leave car at office, but they did and full credit to them for that.
Subscribe to:
Posts (Atom)