Fix TRENDnet TV-IP310pi Corroded PoE Connector

Following Storm Doris back in February 2017, one of my cameras at the back of my house stopped working. Part of the roof had been blown off (only a plastic cover, thankfully nothing more serious) which exposed the cable and allowed things to get a little damp.

On closer inspection the 3 far pins in the connector had corroded as seen below, click any picture below to see a bigger version:

I’m presuming the corrosion had been going on some time and the storm was the icing on the cake. I tried a mixture of WD40 contact cleaner followed by a strong acid based electrical cleaner and the pins had cleaned up nicely but it still wasn’t working.

I was really trying to avoid was chopping the connector off completely as after all it is over £100 worth of camera, but that happened…

As you can see from above I opted for jelly crimps (scotch locks) as these are waterproof, the alternative was either a  surface mounted punch-down box or RJ45 coupler both which would have corroded over time and eventually left me with a broken camera again.

After making sure everything was working I wrapped the jellys in a fair amount of electric tape followed by a healthy dose of vaseline.

I would have exposed more of the camera cable which would have made things look neater and given me more room to position each jelly connector but ultimately I wanted to cut as little as possible, and the fact it was now working again was a good enough excuse to leave it alone!

Colour Combinations

It came as no suprise that the camera didn’t use standard 568B colours but here is the combination I used:

Key: 568B Standard Cable / TRENDnet Cable

  • Orange WhiteOrange
  • OrangeYellow
  • Green WhiteGreen
  • BlueGrey
  • Blue WhitePurple
  • GreenBlue
  • Brown WhiteBrown
  • BrownWhite

I found the colours by refering to this guide here. I did manage to get the green and green white cables mixed up, however this hasn’t affected the camera in any way that I can tell. If it does ever cause a problem I will swap the cables around at the patch panel to avoid having to tamper any further.

A Sticky Problem with Glue Records and 1&1 Internet

Recently I had a tidy up with my hosting infrastructure which involved moving a slave DNS server from one IP address to another. The easy part was setting up the server and changing the existing DNS A record to point to the new IP address, the fun started when it came to updating the Glue record held with 1&1.

If you weren’t already aware a Glue record is something set by the domain registrar (1&1 in this case) that points directly to the server where the domains DNS records are kept. This makes it possible  to have domain names with nameservers that are a subdomain of itself, for example nerdkey.co.uk could point to ns1.nerdkey.co.uk and ns2.nerdkey.co.uk.

The last time I’d update Glue records with 1&1 was a good few years ago, but it was a simple case of logging into the control panel, searching for the domain and then heading to the record for subdomain, hitting an edit button and then changing the existing A record IP address for a new one but it wasn’t that easy this time round.

After a little trial and error and a lot of head scratching it seems that since they rolled out their new control panel it just isn’t possible anymore to set or update Glue records – you could see the records don’t get me wrong, just not update them. Not to worry though, their technical support team will be able to update the records, right? WRONG! I emailed them several times, making things as clear as possible whilst at the same time thinking that their support advisers would be savvy enough to understand terms used within the industry they work in, didn’t go too well.

In a nutshell, here is the correspondence between us:

  • [Me] – Outlined the domain, that I wanted Glue records updating and the exact subdomains and IP addresses
  • [Them] – Asked me to confirm if these changes has already been made as my website was working fine (not what I asked?)
  • [Me] – Sent a slightly reworded version of the first, again outlining the essential details and that it hadn’t been updated
  • [Them] – Confirmed that website was working fine again, asked me to clear my cache and reply with any error messages (did they even read the email?)
  • [Me] – Sent a similar email along the lings of the first and second stating that they are the domain registrar and this is something they need to do, again included essential details
  • [Me] – Emailed them to see if any updates available
  • [Them] – Replied asking me to confirm that I wanted the NS2 record updated as well (because the last emails didn’t state that?)
  • [Them] – Responded saying the nameservers may possibly need to be reverted back to them for this to work, but they used a special “tool” instead and said to wait up to 48 hours
  • [Them] – Replied this morning (after the domain was transferred and Glue set correctly with a different provider) saying that everything is now set correctly

Enough was enough, it got to a point where I’d given them over a weeks worth of my time and they’d done little more then send me a few standard responses and ask for confirmation which was already given. My last attempt to gain faith in them involved changing the nameservers back to them to see if it would work and allow me to set the records, it partly did – I managed to set the NS1-4 subdomains to the correct A records then updated the domains nameservers to another provider temporarily straight after to avoid any downtime and left it a few hours. I came back a few hours later and tried to set the nameservers back to ns1-4.koserver.co.uk but got an error message saying the nameservers weren’t registered and found out that the update to the temporary nameservers hadn’t taken affect, slowly grinding my entire hosting network to a halt – great!

I know I hadn’t waited the standard propagation times, but given the past experience and useless support and the fact that everything was slowly grinding to a halt, it was time to transfer. After research I’d narrowed things down to two providers – I wanted to give Name.com a try, but as their system for transferring in .UK’s wasn’t automated I abandoned that plan and went for NameCheap. Within an hour the domain was with them and Glue records were set through the control panel and things are slowly coming back online.

In all my years of website hosting I have never had such a catastrophic outage, aside from looking into a second domain to host nameservers all my domains with 1&1 will be transferred elsewhere.

So in summary, if you know what you’re doing don’t go with 1&1. You’ll be treated like an idiot and just wasting your time throwing emails back and forth with them. They don’t really read your emails and the fact they removed such a critical feature without telling anyone speaks volumes in my opinion, I mean they still have an old support article on how to set Glue records, obviously doesn’t work though. It is a shame, but that’s life.

 

Upgrade Windows Phone 8.0 to 8.1 Before Main Release Using Developer Preview

Recently I lost my smartphone and after lots of searching decided to give up and buy a new phone. As I only really use my phone for checking emails, a little remote desktop access and the odd bit of mobile banking I didn’t need anything overkill and I fancied a change from Android so I went for a Windows based Nokia Lumia 520.

The Lumia 520 can be picked up for £69.00 on O2 pay as you go (as of 01/07/2014, see here) but I paid a little extra and got mine the same day. I was initially blown away by the Windows Phone operating system as it was better than expected and I couldn’t find any flaws. I’d setup my email, installed the mobile banking app and so on which lead me to my final task which was to install the Remote Desktop app. You’d think this would be a straight forward task installing a Microsoft product on something Microsoft powered but no, when heading to the Microsoft Store on the phone the Remote Desktop app wasn’t showing so I searched the Microsoft Store online and it came up saying that it wasn’t compatible with the Windows Phone 8.0 operating system that was currently on the phone.

I had three options, to cry in the corner, wait for the update to be released or to try upgrade the phone manually. After a little research the update was said to be released within the “…first two weeks of July…” but there was no exact date and I just couldn’t wait.

After more research it turns out that you can use a free app called Preview for Developers which allows you to basically get the update there and then instead of having to wait.

Upgrading Windows Phone 8.0 to 8.1

Below you’ll find a guide on how to upgrade the Windows Phone operating system. Please note that any changes you do here are irreversible and this will no doubt void your warranty.

  • First things first we need to create a free account with Microsoft’s App Studio using the link found here as this will give you access to the developer previews service and give you the magical updates – I used my main Microsoft account that’s linked to the phone to keep things simple
  • Once you’ve created the account go to Microsoft Store on the phone, search Preview for Developers and install the app
  • Once the app has installed launch it and you will be asked to accept the terms and conditions and login using the account details created previously
  • Next you’ll see information about what the app does and so on, all we need to do here is tick the box next to Enable Preview for Developers and press done
  • Now that’s enabled head to Settings > phone update and press check now and then follow the on screen instructions – You may need to repeat this process several times as it took me two updates to prepare the phone before the update to Windows 8.1 was offered
  • After a little while you will now be running Windows 8.1! – You can check this by viewing Settings > about > more information under the OS version heading

Notes

  • Make sure your phone is fully charged before attempting any updates as things could seriously go wrong otherwise!
  • As with anything in development stages things may be a little buggy so be aware that you may stumble across the odd glitch every now and again
  • Although not tested I assume the same steps will work for phones other than the Nokia Lumia 520, if you can confirm this I’d be grateful

Connect Directly to SunLuxy Camera Streams

For a while now I’ve used a cheap SunLuxy H.264 DVR as the heart of the CoopCam project and initially couldn’t get a direct link to the camera stream so had to screen captured the bog standard web interface using VLC and break the feed down into separate streams but recently after a fair bit of trial and error I discovered a much easier solution!

I had researched on and off for months, went through masses of trial and error with various software and ultimately found no solution but after being inspired again I headed to the DVR’s web interface to start from scratch. I stumbled across source code in a file called /js/view2.js that constructs an RTMP:// address to show live camera feeds through the web interfaces flash player – See snippet of code below:

dvr_viewer.ConnectRTMP(index, "rtmp://" + location.host, "ch" + index + "_" + (dvr_type=="main"?"0":"1") + ".264");

After removing the jargon the link came out as rtmp://dvraddress:port/ch#_#.264 with the first number being the channel you want to connect to (starting at 0) and the second being the stream (substream being 1 and main being 0)

I headed to VLC player, selected Open Network Stream and entered the following:

rtmp://192.168.0.100:81/ch0_0.264

Broken down you can see my DVR is on the local network as 192.168.0.100 at port 81  and that I wanted to view channel 1’s main stream, low and behold after a few seconds the camera started to play!

Notes

  • To convert the stream to something more useful you could use rtmpdump and ffmpeg on Linux systems – I’ll write another guide about that shortly
  • If you do something wrong and overload the DVR then you’ll hear a beep as the box reboots
  • If this works for you please comment your DVR make and model

Review of Oak Tree Dental Practice in Stourbridge

I became a patient at Oak Tree Dental Practice after my current dental practice at the time was going through some major changes and didn’t seem to be offering a good enough service. As part of a management change I was given a checkup and told I would need 6 fillings (3 existing and 3 new that needed redoing) but I couldn’t get an appointment for months, meanwhile I was still paying a monthly Denplan fee and worrying that I would eventually have no teeth and no one seemed to be taking it seriously.

I took the plunge and went to see Mr Jonathan Edward Swinscoe for a “free” checkup. I ended up paying £35 for the apparently free checkup, but he comforted me and said he could get all the fillings done in one go. I transferred my Denplan contract to him which cost £15 and the plan was to wait until the next month when the transfer was complete so the work would be done at no extra cost.

The time came for my appointment and I have to be honest I was dreading it. I had a while to think back about what Jonathan said and it just felt too good to be true, but it was too late to back out now. It didn’t help that the receptionists were too busy gosipping and dancing away to the radio, they seemed frustrated that the whole waiting room wasn’t joining in with them.

The time came where Jonathan called me in, he sat me down on a damp dentist chair that had just been cleaned and then injected, no questions about what medication I was on, no explanation of what is going to happen or anything like that, literally pain killer was injected and I was sent back out to the waiting room. He didn’t seem in a talkative mood thinking back now.

After he saw another client I was taken back into the room to the yet again damp dentist chair. The nurse was out of the room but Jonathan started drilling out my teeth by himself. He had the drill in one hand and suction tube in the other and choked me several times as he wasn’t removing the water quick enough but luckily the nurse came back and took over.

It is worth mentioning at this point that he didn’t have any gloves on and he didn’t give me any protective eyeware meaning my £200 glasses were almost destroyed.

I thought things couldn’t get any worse but at this point but then he started being incredably rough, to the point where I had to keep stopping him because of the pain and was physically shaking. Each time he stopped he would start again straight away and it soon became obvious that he was rushing drilling out the teeth out to get them all done in time, I was really worried that he would drill to far and hit a nerve but luckily that didn’t happen!

After the drilling had finished he stopped and made a sexist comment infront of his female nurse and myself, he said “Not only women have bad days you know!” so now it felt like he was having a bad day and taking it out on me? Great!

He then started putting the fillings in place, again he was rough, applying a fair amount of pressure jolting my neck around for each filling. He put his palm flat on my head which wasn’t very comfortable but at this point I just wanted to get out of there. He just didn’t seem to care, but then again he was having a bad day, so that’s okay then?

After all the fillings were done he literally scooted off to his computer and ignored me, he didn’t explain any care instructions, what had been done or anything, I literally got blanked which was rude. The nurse then asked me to move off the chair so she could wipe it down and then whisked me (still shaking) to a small table in the corridor and offered to sign me up for Denplan. I explained with a numb mouth that I had already transferred to him and then went out the reception where I was told I would need to pay and again had to explain.

I finally got to the safety of my car still shaking and it is safe to say I will never ever be setting foot back in that practice ever again and I will never ever recommend it to anyone.

To add insult to injury I have been left with really sensitive teeth and can no longer drink really hot or really cold drinks. I have also had to have the fillings adjusted by another dentist as they were poorly fitted causing “the battery effect”.

To be clear, this review is about Review of Oak Tree Dental Practice 78 Bridgnorth Road, Wollaston , Stourbridge, DY8 3PA and is not to be confused with practices of a similar name.

Disable Virtualmin Two-factor Authentication

Virtualmin is constantly being developed and gaining ever useful features, and for a while now has featured two-factor authentication which is great, although what happens if you get locked out of your system? As long as you have SSH or console access then you can follow the steps below to easily get back in.

Disabling two-factor authentication for a single user

  • Get root SSH or console access
  • Edit the file /etc/webmin/miniserv.users, comment out the current line for the user then create a fresh copy above it
  • Remove any mention of “totp” and the long string of characters near the end and save, for example your file should now look like the following:
...
root:x::::::::0:0:::
#root:x::::::::0:0:totp:ZZZZZZZZZZZZZZZZ:
...
  • Restart Webmin and log back in normally

Disabling two-factor authentication entirely

  • Get root SSH or console access
  • Edit the file /etc/webmin/miniserv.conf and find the line “twofactor_provider=totp” and replace with “twofactor_provider=” and save
  • Edit the /etc/webmin/miniserv.users as mentioned above
  • Restart Webmin and log back in normally

Notes

  • I’ve had success with this on Webmin 1.760 running on CentOS 7.0

How to List the Contents of a Web Directory

Any good web host will secure the contents of website directories which don’t have an index page by not allowing the  files or folders to be listed, instead you’ll get a 403 error page saying access is forbidden. Whilst this is good in practice, sometimes you might actually need to list the contents – and its simple to enable on an Apache web server – add one line to your .htaccess file and you’re done!

How it’s done

Options +Indexes

Notes

  • If you have access you can edit your web server configuration and make it global

Setup your own live pet webcam for free using Yawcam

I’ve been experimenting for a while with different ways to stream live to the Internet from webcams, IP cameras and capture cards for the Coop Cam project, here is a basic guide on how to setup a simple live stream using a basic webcam.

What is required?

You will need a couple of things, including:

  • A computer with a webcam
  • An Internet connection with decent upload speed
  • Router access to port forward

Software

To create the stream we will use a free piece of opensource software called Yawcam, you can download it directly from here or learn more about the software here.

Installation is pretty simple, download and launch the installer then follow the on screen instructions.

Configuration

After the installation has finished open your newly installed software, you will see a screen like below:

1

The first thing we need to do is set the stream type, to do this go to Settings > Edit Settings…

2

Under Output select Stream and change the Stream type to MJPEG and hit OK

3

Next we need to select your webcam, head to Settings > Device > Change to and select your webcam from the list

4

Finally, back on the main screen hit enable on the Stream option – we are ready to go!

5

Previewing your stream

Here is the exciting part, previewing your live stream! On the same computer open up your browser and head to http://127.0.0.1:8081/video.mjpg

If everything is configured correctly you should see your webcam displayed live.

Here is my example of Spirit our pet quail:



What next?

The next thing you need to do is configure port forwarding in your router to allow people to connect in and view  your stream. I can’t really go into specific detail as there are many different types of router with different configuration options but basically what you want to do is forward port 8081 to your computer so anyone that connects to your-public-ip:8081/video.mjpg can see your stream.

You will also want to make sure that your computer has a static IP address or DHCP reservation to make sure the local IP address doesn’t change.

If you need help with that part let me know and I’ll give you a hand.

Will my Internet connection be able to cope?

This depends entirely on your upload speed, by default Yawcam only allows 10 concurrent connections.

For added security and to take the strain off your Internet connection I can relay your stream via Coop Cam’s powerful relay servers. They are able to take the single stream from your camera and amplify it allowing hundreds of users to connect at once.

The upside to this is that you will only have one connection being uploaded to the relay server, the server then handles everything else and even hides your public IP address – If you would like to know more please get in touch.

Notes

  • If you want Yawcam to start streaming automatically when you login to your computer then head to Settings > Edit Settings… > Startup and tick Start Stream output
  • You can check that port forwarding has been setup correctly by using the NerdTools Port Scanner, if it isn’t working double check your firewall settings
  • If your Internet connection has a dynamic IP address you’ll want to look into a Dynamic DNS service

Add a NAS drive to your Livedrive account for free

I used to be a customer of popular cloud backup service Livedrive. The upload and download speeds were nothing to shout about and one annoyance was having to pay extra to add a NAS drive to your account, but there is a workaround!

How so?

All you need to do is add a symbolic link to your NAS drive from your computer. Think of a symbolic link as a fancy shortcut, the only difference being it masks the destination instead of taking you straight there – you’ll see what I mean when you read on.

Imagine you have a Windows computer with your NAS drive with the root of the drive already mapped to Z:, you have a folder on your NAS called MyFiles and would be able to browse to Z:\MyFiles to see whatever is stored there. Next imagine we have a folder called C:\Backup which is already uploading to your Livedrive account, using  the following command we will make C:\Backup\MyFiles lead to your NAS and in turn be included with your Livedrive backup.

mklink /d "C:\Backup\MyFiles" "Z:\MyFiles"

For me, this worked absolutely fine and I had a couple of TB uploaded without ever being caught out. I’ve since jumped ship to Amazon Drive, whilst it is more expensive per year I’ve got it running from multiple computers and the upload and download speed always tops out my connection, so I can’t complain!

Notes

  • Use the above guide at your own risk – I won’t be held liable if anything happens to your Livedrive account, files or anything else because of this!
  • This doesn’t work with Dropbox or Google Drive  – sorry
  • You only need to run the command once, after that the link will be remembered
  • To remove the link just delete it as you would any other  file or folder