Wednesday, May 31, 2017

Manx Telecom Sim active but No internet

As an IT professional I was rather upset at how long it took me to find this information and then how long it took to get it working. Luckily I could use someone else's internet to work it out.

All the information is here on the Manx Telecom site.

https://www.manxtelecom.com/support/mobile/mobile-settings/android-internet-settings

That being said, on my phone, it didn't seem to like having more than four APN's configured at one time, two internet APN's and two MMS APN's, and an APN isn't the easiest thing to delete.

To Delete an APN go into the configuration of the APN that is to be deleted, then use the top right options menu and 'Delete APN'. I got rid of them all of the configured APN's as I never use MMS anyway.


Then click the plus in a circle symbol and enter the APN information on the Manx Telcom page but make sure you go to the top right menu and click Save before you exit out.


Since I was on pay as you go so I had to enter

Name: Manx
APN: web.prontogo.net
Username: webgo
Password: webgo












Friday, August 5, 2016

ADSL FTTC switching out the Operator Router random webpages not loading

After swapping out my PlusNet router that was chained into a BT VDSL modem, I started to experience loading failures in random webpages. Although the internet kinda worked, HTTPS was behaving exceedingly poorly and would just hang there.
 
These symptoms frequently point to an MTU issue, as information at the end of each packet is getting chopped off. It normally isn't so noticeable on unencrypted data, since there is a higher chance of the last portion of a packet being blank and most data formats themselves are quite tolerant to partial corruption, whereas SSL has to be strict in order to provide the necessary guarantees.

As is common, my MTU for the PPPoE interface defaulted to 1492, exactly 8 bytes less then the 1500 set on the ethernet interface -which is the largest frame size for conventional equipment.

I then started experimenting with different MTU values. I tried loads of random ping tests with different packet sizes, anything I googled that was MTU and ping I tried with no effect.

I got the Plusnet router back up and running, however its web interface is next to useless as it didn't provide any information.

So I went on trying setting smaller and smaller MTU values on the PPPoE interface, however nothing worked.

Then, just out of desperation I started investigating "Baby Jumbo Frames RFC4638". Unfortunately i couldn't find any options for enabling it on the router, however a post on the Ubiquiti forums showed a configuration with a higher than 1500 MTU.

So I set the Ethernet interface with an MTU of 1508, which it accepted with no complaint, then set pppoe0 to MTU 1500 and this is when everything started working.






Ubiquiti forum post on similar issue relating to MTU - http://community.ubnt.com/t5/EdgeMAX/BUG-PPPoE-client-pppoe-dialing-before-MTU-set-on-eth0/td-p/917204

Thursday, February 11, 2016

Stopping Freebooting, Turn Facebook into The Pirate Bay

I've previously heard about the Facebook Freebooting issue, where content from small creators is been used freely on Facebook and essentially making money for Facebook and possible for the user that uploaded it. Destin's video as always explains things way better.



Basically Facebook Video needs to make a Content ID system

Recently the h3h3productions Soflo rant came to my attention https://youtu.be/8qwxYaZhUGA?t=8m57s

He said something interesting comparing Facebook with The Pirate Bay and it got me wondering about turning Facebook into the pirate bay

Hypothesis

The YouTube Content ID system got built because of piracy.

By uploading a large amount of TV shows and films to Facebook it would force large media groups to start legal proceedings against Facebook, in turn that would force technology advancements with Facebook video system.

Issues

Couple of foreseeable problems, search-ability and video fracturing with indexing.

It will be very easy for Facebook to simple use search terms in their own search system to hamper finding videos so an external system may have to be used to locate the videos,  though this puts the external site at risk of becoming the illegal party (Pirate bay only provides links not content and they are the bad people). This could be thought of as a secondary issue as it can be used as an indicator that Facebook are starting to take the issue seriously.

Video fracturing (is a phrase i just made up) but i'm referring to chopping large videos into smaller 5-10 min videos to hide the fact that 45min to 1hr 30 video is obviously going to be a film or tv show. The advantage of the smaller fractures guarantees that the content id system that Facebook implements works for smaller creators that generally only put out 5 to 10mins of content at a time.

Search-ability

First iteration to avoid searching for the movie TV show full names videos should be titled with the IMDB codes.

The IMDB code is the way said website identifies movies look in the URL when browsing a movie


For example "The Avengers" has the code "tt0848228" see image above and Buffy has the code "tt0118276" see image below.

Then with TV shows append the season and episode number to the end using an S and E. Season 4 episode 3 of Buffy would look like this "tt0118276 S04E03"

Next since we are splitting the videos into multiple parts we can use a P to denote which section of the video it is for example "tt0118276 S04E03 P01"

If the system is forced into an external listing site then the video titles become irrelevant as each video unique URL will be listed by this information.  It would be best not to centralised this site (look at Napster) and possible torrent this information (though if you need to torrent the links then you might as well torrent the film) i like the idea of keeping the links inside of Facebook maybe have Pages for each film with the links.

Fracturing

Since we don't want millions of exactly 5min long video parts on the Facebook servers and we want unrelated peoples videos to have seamless fractures videos we need a way to add so predictable randomness. Again we can use the IMDB code take all the numbers digits from the code turn them into a time then add them on to the 5 minutes.

Avengers is tt0848228 so add 0+8+4+8+2 = 22 seconds  & 2+8=10mins , divide each part into 15mins 22 seconds

Buffy is tt0118276 so add 0+1+1+8+2=12 seconds  & 7+6 = 13mins , divide each part into 18 mins 12 seconds

Final Thoughts

This for me is just like my plans to take over the world it is just a thought exercise.

Useful links

http://stackoverflow.com/questions/5651654/ffmpeg-how-to-split-video-efficiently/13289426#13289426

Tuesday, September 9, 2014

Server Room Cooling Costs

In 2009 when Boho One first opened I never found any good information on the cost of cooling online, 5 years later I now have a good idea.

In its simplest form Boho One’s Server Room consists of 17 cabinets and four Air conditioning units. Each Cabinet is sub metered and the Air condition has meter on in the main electrical distribution room. Equipment is on and cooled 247.

Meter readings as of the 26th of August 2014 are;
  • Server room Total : 367946 KWH 
  • Air conditioning Total : 653266 KWH 
By dividing these two values we calculate the Aircon factor as 1.78

Which means for 1 Kilo Watt Hour of computing it take our building 1.78 Kilo Watt Hours to cool it. Therefore in this simple example for every 1 KWH on someones meter they are actually charged for 2.78 KWH.

Lets add complexity

We take monthly meter readings for charging our customers and therefore have a bit of data to work with. Now to make the information a bit more interesting I'll add in the mean temperature of Middlesbrough for the period.

Meter period
Average Temp
Aircon Factor
September
14º
1.63
October
11º
1.73
November
1.07
December
0.93
January
0.91
February
1.10
March
1.07
April
1.32
May
11º
1.65
June
14º
2.36
July
16º
2.14
August
16º
2.35

As you can see come the hot months it is extremely expensive and this last year actually averages out to be 1.5 which is quite a nice figure to tell people.

We have to charge on a month by month basis as we cycle through tenant in a similar month to month cycle. Unfortunately this is not convenient for tenants who use a similar amount of electricity each month, they have their electric charge more then double in summer .


Just looking at the graph you can see that outside temperature is not the only factors

Other factors

  • During average loads two of the four air conditioning units can manage the temperature. We have no way of tracking  he number of units are active in a period or those in fault.
  • The server room windows face east and can catch the morning sun. Although sunlight is rare in the North of England it could randomly add a degree or two to the server room mean temperature.
Raw data spreadsheet Numbers Format or Excel Format
Weather data from Accu Weather http://www.accuweather.com

Thursday, March 24, 2011

HSBC Online banking fail - Fixed 04/12/11

Yesterday i had to pay a amex bill through the system and it looks like they have fixed the problem


After entering all the details this message appeared


The system has changed

Then on the next screen it gives you the name you require for future

Woot it even gives me the beneficiary name


This is the original post

This is a prime example of putting perceived security over usability.

Tonight Michael I have to pay some corporation tax and i want to use the HSBC bill payment system

So I enter the account details, sort code, reference and amount from my tax bill and i am presented with this message. (Right here is where the problem could be solved if only they had stopped and ponder)

Screen shot 2011-03-24 at 23.39.40
Okay so I go through the beneficiary list and find two HMRC Corporation Tax Accounts (much like PAYE).
HSBC fail

Unfortunately the bill I have in front of me has no indication of which Accounts office i'm supposed to pay to.

Why don't i just check the sort code and account number with the one in the beneficiary list?

Unfortunately you can not! there is no way to find this information. No matter how far you go through the payment proccess the infomation never appears.

ARE You sure?
Payment complete
Not even on the statement!

statement

Why is this?

I see the 'security' hammer trying to knock this reason home.

"You could open an account with us and pass all our security checks then gain access to a list of account numbers and sort codes."

"Do you realise this could lead to fraud?"

Anyway as i'm in my office, and i've been doing PAYE for the last year, I know Cumbernauld is the companies accounts office.

By the way when Cumbernauld is shortened on the statement "HMRC CORP TAX CUMB" or "HMRC PAYE/NIC CUMB" it always confuses me. If you know my surname then you might understand.

Also comparing the details on my bill with a quick HMRC search can also find the info needed http://www.hmrc.gov.uk/payinghmrc/selfassessment.htm#5

Why get so worked up over something so little?

Back when I was a student , Back when i was first a student , I used the beneficiary list to pay for a British Gas bill. After been sent many angry letters I had to spend several phone calls trying to sort it out. The funds had gone into a British gas account that no one at the customer help desk had access to.

Also i couldn't find a way to vent at a HSBC person. Even if i did it would never make it to a developer as we hit the complaint box issue.



How could this be solved?

Remember i mentioned the problem could have been prevented two steps in. This could have been done in a couple of ways :-
  1. If they had just let me create duplicate record in my beneficiary list. They have to store the history anyway. Whats wrong with a little look up that automatically adds it to the bulk transfer.
  2. They could have displayed the account name (and which of the sublists it is in) in the error message. Two queries and they have already checked to see if the info added is in the beneficiary list now they just need to look up the name.


Friday, March 12, 2010

The Power of Shell

A friend of mine has acquired the nick name of Ludo (From the Labyrinth) so i decided to find the extent of ludo's lines in the film (to post on his Facebook page).

I found the script for Labyrinth here and is in perfect format for what i was planing.

SARAH: WHERE DO THESE DOORS LEAD?
KNOCKER1: WHAT?
KNOCKER2: SEARCH ME. WE'RE JUST THE KNOCKERS.
SARAH: OH.
LUDO: RRR.
SARAH: HOW DO I GET THROUGH?
KNOCKER1: HUH?
KNOCKER2: KNOCK, AND THE DOOR WILL OPEN.
SARAH: OH.
LUDO: HUH?
SARAH: LUDO.

First i need it downloading i could simply have SaveAsfrom the browser but i find working in a shell quicker.

[MyComputerName]:Crap [MyUserName]$ wget http://corky.net/scripts/labyrinth.html--2010-03-12 08:33:10-- http://corky.net/scripts/labyrinth.html
Resolving corky.net (corky.net)... 212.150.53.130
Connecting to corky.net (corky.net)|212.150.53.130|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 60960 (60K) [text/html]
Saving to: `labyrinth.html'

100%[======================================>] 60,960 63.8K/s in 0.9s

2010-03-12 08:33:12 (63.8 KB/s) - `labyrinth.html' saved [60960/60960]

[MyComputerName]:Crap [MyUserName]$

'wget' takes a URL an then downloads the file to the current directory. I'm left with the plain text script in the file labyrinth.html.

Then extracting Ludo's lines was also easy with 'grep'

[MyComputerName]:Crap [MyUserName]$ grep ^LUDO* labyrinth.html > ludolines.txt
[MyComputerName]:Crap [MyUserName]$

'grep' take the regular expression for matching and then a file name and then displays all the lines containing the regular expression.

The regular expression reads '^' any line starting with 'LUDO' and can have anything after it '*'

Unfortunately due to the verbose nature of the character Ludo there are a lot of repeating lines

LUDO: SARAH?
LUDO: SARAH?
LUDO: SARAH BACK.
LUDO: GRR!
LUDO: GRR!
LUDO: GRR!
LUDO: HUH?


I decided to remove duplicates


[MyComputerName]:Crap [MyUserName]$ sort ludolines.txt | uniq > ludovocab.txt
[MyComputerName]:Crap [MyUserName]$


The 'uniq' command removes adjacent lines, to make sure i got all the duplicate lines out i used 'sort' to place all similar lines together. The '|' char pipe's command outputs and inputs together.

In fact we can chain all the commands together and never need to save the information locally


[MyComputerName]:Crap [MyUserName]$ wget -qO- " http://corky.net/scripts/labyrinth.html | grep ^LUDO* | sort | uniq
LUDO: AAARGHH!
LUDO: AAH!
LUDO: AH!
LUDO: AH.
LUDO: AH. AH!
LUDO: AH. WHUAH!
LUDO: AH...UH!
LUDO: DOWN.
LUDO: EEOOWW!
LUDO: FRIEND?
LUDO: GOOD-BYE, SARAH.
LUDO: GRR!
LUDO: GRRR!
LUDO: HHRRH.
LUDO: HMM.
LUDO: HMM?
LUDO: HOGGLE AND LUDO FRIENDS.
LUDO: HUH.
LUDO: HUH. HUH.
LUDO: HUH?
LUDO: HUH? SURROUNDED?
LUDO: HUH? WHAT?
LUDO: HUNGRY.
LUDO: Hhrrr...
LUDO: LUDO GET BROTHER.
LUDO: LUDO SCARED.
LUDO: LUDO.
LUDO: LUDO...
LUDO: MMM...
LUDO: NNH!
LUDO: NNNNH!
LUDO: NO.
LUDO: OH!
LUDO: OH.
LUDO: OH. OH...
LUDO: OHH...
LUDO: OHHH.
LUDO: OOH.
LUDO: ROCKS FRIENDS.
LUDO: RRAGHH!
LUDO: RRR.
LUDO: SARAH BACK.
LUDO: SARAH FRIEND. YEAH!
LUDO: SARAH.
LUDO: SARAH?
LUDO: SMELL BAD!
LUDO: SMELL.
LUDO: SURE.
LUDO: THE SMELL!
LUDO: UHRR.
LUDO: UUUH.
LUDO: WHOO!
LUDO: YARGGH!
LUDO: YARRGH!
LUDO: YARRGH! YARRGH!
LUDO: YARRGH.
LUDO: YEAH.
LUDO: YEEIAAHH!
LUDO: YES!
LUDO: YRRURH!
[MyComputerName]:Crap [MyUserName]$


If you have anyways to make the code more efficient feel free to comment

Thanks to :

http://corky.net/scripts/labyrinth.html
http://www.commandlinefu.com/commands/view/1913/redirect-wget-output-to-the-terminal-instead-of-a-file

Tuesday, March 10, 2009

Interpreted Language Hack

This is done in PHP but it would work in any language that isn't compiled

I had a string containing PHP code which i wanted executing(evaluating).

A few years ago i did a project where i needed to do this and there was a PHP function to do this but I combed www.php.net for about an hour with no success.

Simply i take the string put it in a file then include said file like a library.

<?php
$value = "" ;
file_put_contents ( 'temp.php' , $value );
include('temp.php');
?>

You shouldn't use this on a online server as it opens up the possibility of code injection but i use PHP in offline system and shell scripts.