Wednesday, 3 July 2019

Connecting your Echo Dot to Kodi



It is possible to stream music from your Amazon echo dot to your kodi box !!!

Kodi HTPC is basically an output device but you can set it to receive bluetooth audio and play it to your sound system, it requires a bit of fiddling but once done that's it, you can also adapt this method to connect any device that outputs music (phone, tablet etc) and play that through your kodi box


You will need a crontab entry (something which executes every minute) and some basic linux commands to achieve this.

by placing the simple file in your crontab file (obviously alter your bluetooth mac source
to reflect what yours is (more on this later)

copy the following into a text file and call it connect.sh (minus the brackets) you'll be editing this later on with your actual details......

(

#!/bin/bash
pactl load-module module-udev-detect /dev/null
# pactl list short sinks
# pactl list short sources
pactl set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo
pactl set-default-source bluez_source.68_8A_87_9B_B7_14.a2dp_source    )

the #'s comment out what would normally be taken as commands as an aide memoire in this case
for the commands you need to discover your actual details 


you need to enable bluetooth on your kodi box if it isn't already enabled 

drop to a terminal prompt and ssh shell into your kodi box
 (you can use putty in Windoze to achieve this)

you will have to find out the root password for your kodi installation to gain access and that depends on what flavour of Kodi you have (libreelec, coreelec or stand alone)

once in type

bluetoothctl

then turn on advertising and discoverable (you can show all commands simply by typing
help in the CLI of bluetoothctl)

it's straightforward you just type discoverable on and advertise on 

this starts your kodi box broadcasting bluetooth invitations, without it you won't be able
to connect to your kodi box from your Alexa app 


then connect to your kodi box FROM your echo dot via the Alexa app on your phone/tablet 
it's important you connect FROM your echo dot and not from kodi, you are setting up an input
to kodi not an output.

Once connected and paired make sure your normal output on your kodi box remains as it was to whatever sink it was connected to originally (speakers or whatever)

your bluetooth echo dot source can be found out by

pactl list short source

and your normal sink can be found out by typing the following

pactl list short sinks

take a note of the output of these commands

bluez_source.68_8A_84_9B_B3_14.a2dp_source

the same applies to the short sink name 

alsa_output.pci-0000_00_1b.0.analog-stereo 


a sink in pulseaudio is an output  (music drains into it)

a source is like a tap above the sink (an input, geddit ?)


copy the sinks and sources into the appropriate  lines and paste it into the file called
connect.sh (don't confuse your sinks and sources)

save the connect.sh in your kodi .config directory or anywhere it's accessible  

then create a crontab file by typing 

crontab -e

cut and paste the following into it 

* * * * * /storage/.config/connect.sh

then save the crontab file

make the file connect.sh executable by typing

chmod +x /storage/.config/connect.sh   <--- connect.sh="" crontab="" entry="" file="" just="" location="" make="" nbsp="" of="" or="" p="" points="" saved="" sure="" the="" to="" wherever="" you="">

Job done !!!


this config should survive reboots (hence the crontab) 

if you ever get trouble or alexa complaining she can't connect or find the speaker it will be because
bluetoothctl has stopped broadcasting and isn't discoverable, because the rest is hardwired in.


once you've paired you can connect to your kodi box simply by saying to your echo dot

"alexa connect speaker"

and it should report back it's done it 

check the time with Alexa "Alexa what time is it" and if all has been done properly she should announce the time from your kodi box 


then enjoy considerably louder and higher quality music from Amazon music 

(you cannot control the volume with the kodi box volume is controlled by the echo dot, either manually or via voice control, although be warned if you turn up the music too high Alexa goes deaf because she can't hear you properly)


make sure your kodi box is turned on and settled before you try and connect to echo dot to your kodi box 


Enjoy !!! 

Wednesday, 17 April 2019

Easy way to get EPG into Tvheadend Server

One of the headaches of TVheadend is providing an easy method of keeping the EPG updated, I maintain a large tvheadend server for a large secondary school giving them the ability to record and play live terrestrial tv into classrooms.

This "how-to" is noddy or noob format it assumes you know nothing about anything. 

I used to use the built in epg but found xmltv.co.uk to provide excellent epg data without subscription and is free to use here in the UK.

First off disable all other methods of EPG grabber modules in tvheadend, and enable External XMLTV grabber, make sure you install xmltv package on your tvheadend server and that .xmltv directory appears in tvheadend directory



ls -al /home/hts/.xmltv 

and that the unix socket works and is available

ls /home/hts/.hts/tvheadend/epggrab/xmltv.sock
/home/hts/.hts/tvheadend/epggrab/xmltv.sock  (good it exists!!!)

there are many how-to's available on installing the xmltv package and are beyond the scope of this "how to", in most cases just installing the xmltv package will be enough

ie/ apt-get install xmltv 

should suffice 


then simply create this bash script shown below (I've called it get-epg.sh) and edit it to get the appropriate xml file you require, the type of xml file is in the hashed comments/description
I selected 6715 which is 3 days and all data, simply change it to what you require by changing the number on the end of the wget statement

ie/ nano get-epg.sh



#!/bin/bash
# Feeds available
# Select which one you require and attach it to
# end of wget command
#6721   All 24 Hour All data
#6145   All 24 Hour Entertainment
#6128   All 24 Hour Movies All data
#6187   All 24 Hour Sports All data
#6729   All 48 Hour All data
#6715   All 72 Hour All data
#6793   Limited 5 Days Limited data
#1897   Limited 7 Days  Limited data
clear
echo Removing old xmltv file
rm -rf /home/hts/xmltv.xml
echo Get new xmltv file
wget --output-document /home/hts/xmltv.xml http://www.xmltv.co.uk/feed/1897
echo Touch new file with date downloaded
touch /home/hts/xmltv.xml
echo Copy new file to locations
cp /home/hts/xmltv.xml /home/hts/.xmltv/xmltv.xml
echo Update Completed

you may have to chown (change ownership) the new script to the hts user in my case

chown hts:video get-epg.sh

then su to the hts user (become the hts user) by entering

su hts

then create a new cron job

crontab -e

then copy/paste the line below, it will execute it at 6am every day and in my case get 3 days worth of
epg at a time

0 6 * * *  hts /home/hts/get-epg.sh

followed by Ctrl o (that's o for orange if using nano) to write out the new crontab 


it's pretty self explanatory, remove old file get the new xml file and rename it on save as xmltv.xml and put it in the /home/hts directory, touch it to change the date downloaded (more of a belts and braces touch to make sure the date is updated so you can easily check if the file is current) 

Then copy it to the .xmltv directory, you could of course just copy it to the xmltv directory directly or create a symlink either would work, but it's such a small file 30MB tops that it takes less than a second to copy it. 

it's a very simple bash script and no doubt it can be improved upon, but I like simple you can easily follow it.

voila a simple and automated way to get UK EPG data into your tvheadend server, restart your tvheadend server and you should see your EPG data populate and have 3 days worth.

There is no point in getting the epg data more than once every 24 hours because it's not updated any sooner than once every 24 hours in each day.

xmltv.co.uk sometimes change the feed names so you need to check those first and amend the script accordingly, I've also noticed sometimes the website goes offline with no explanation


so make sure you can actually browse the website before debugging the script

Latest xmltv feeds


Tuesday, 5 March 2019

This appeared on the Bruges Group website and was quickly removed for unknown reasons so I have hosted it here, I make no claims as to it's truthfulness or accuracy.

John Petley

There is no doubt about the veracity of this account since documents have been seen.
On Monday July 9th 2018, several leading French, German and Dutch senior managers were called by EU officials to an urgent meeting.
The meeting was said to be private and those present were informed that Prime Minister May and Chancellor Merkel had reached an Agreement over Brexit. Knowledge of this was attained from the actual transcript of the meeting between May and Merkel.
1) The Agreement was couched in a way to 'appease' the Brexit voters.
2) The Agreement would enable May to get rid of those people in her party who were against progress and unity in the EU.
3) Both Merkel and May agreed that the likely course of events would be that UK would re-join the EU in full at some time after the next general election.
4) May agreed to keep as many EU laws and institutions as she could despite the current groundswell of 'anti-EU hysteria' in Britain (May's own words, apparently.)
5) Merkel and May agreed that the only realistic future for the UK was within the EU.
The original Agreement draft was completed in May 2018 in Berlin and then sent to the UK Government Cabinet Office marked 'Secret'.
NB This Agreement draft was authored in the German Chancellor's private office.
The Cabinet returned the Agreement draft with suggestions, and there was some to-ing and fro-ing during June 5th 2018.
Private calls between the Prime Minister and Chancellor were made.
The Agreement's final draft came out late in June 2018. The German Chancellor told Prime Minister May that this was a deal she would support, though there would need to be some more small concessions by the UK to keep the EU happy.
The Chancellor and Prime Minister met in Germany. Merkel had this meeting recorded as a 'private meeting' though the Prime Minister was probably unaware of that.
The Chancellor had the transcript of that meeting circulated secretly to EU and key German embassies.
Conclusions
Documents make it quite clear that Prime Minister May was negotiating with Germany, not the EU.
The transcript also makes it clear that the Prime Minister intended to keep all this secret from minsters, especially the Brexit group.
She wants to keep as many EU institutions in UK as intact as possible in order to facilitate an easy return to the EU after 2020.
Chancellor Merkel briefed May on tactics to force Cabinet approval.
The Prime Minister and senior civil servants were working with Germany to stop Brexit or water it down to prevent free trade and the ending of freedom of movement, but to keep cash flowing to the EU.
David Davis was kept in the dark while key EU premiers in France, Holland and Ireland were briefed in full.
Key EU heads were actually briefed in full the day before the Cabinet meeting at Chequers. 

Friday, 11 November 2016

The end of the World is nigh...AGAIN



Now let me make it clear I'm no fan of Donald Trump, I think he is probably one of the most repulsive individuals currently in the public domain, I do however understand how he has risen to become the president elect of the United States.

I stayed up on the night of the US election and watched it until 4am after which I knew he'd be elected. What astounded me by the BBC was their initial "Hillary has it in the bag" attitude and even when it was becoming obvious she didnt' "have it in the bag" they still carried on pushing the "oh well Hillary will surge any minute now". 

A blind and deaf man at that point could plainly see Mr Trump "had it in the bag". This is the problem with liberal media they simply cannot understand how anyone else could possible have a different world view, and if they do its because they are stupid, under-educated, ill-informed, racist, or worse.

Take the demonstrations around America against Trump, these liberal disgruntled voters most of which I notice are millenials....are simply not accepting democracy, they are railing against the very thing they purport to hold dear, you cannot say you believe in democracy and then in the same breath protest against it, you are NOT being democratic, like it or not (and I don't) Donald Trump is going to be the next President of the United States, I do however accept it as democracy in action.

There are huge similarities between what has happened in Brexit here in the UK and the US elections, London for instance has been in a massive liberal bubble for years, they have conditioned everyone who lives there (almost) that the EU was the best thing since sliced Hovis. The same can be said of Westminster and those gaggle of overpaid politicians who blindly thought they'd walk away with a referendum victory to remain in the EU, so much so they didn't even have a plan if it should fall the other way, their staggering smugness is beyond written words to be honest. 

They paid the price for being completely out of touch with the "common" people who saw from day to day, week to week, year to year, billions being wasted on the dying EU project with very little advantage to themselves, just more laws, more control more political union and more of Europe rammed down their throats. 

They say the older voters won the referendum, they very probably did because they can remember what the UK was like prior to the EU micromanaging our lives, and do you know what prior to the EU we were doing ok and life was good. 

They also say the older voters have stolen the youth of todays future, well I don't see it that way, I see it as saving them from another 40 years of entrapment and slavery, which can only get worse if the truth be known what with the EU's plans for centralised taxation and an EU army and god knows what else. 

Yes I voted for Brexit and to be honest it cannot happen soon enough for me if only to shut up the liberal leftards who are crying into their fair trade breakfasts whilst waiting to finish charging their hideously expensive virtue signaling electric car.

Trump is normality resurfacing after being pushed down by political correctness for decades, Trump is the status quo, love him or loathe him, he represents change to our political systems just as Brexit does, Theresa May doesn't like Brexit one bit, but she is one of the few people who understands that the old way of doing things has gone. 

The likes of Tim Farron and Nick Clegg and their ilk are a dying breed you can see that simply by counting the MP's they have in the liberal party (eight at last count). It wouldn't surprise me if the liberals are all but wiped out next election along with a decimated Labour party. Yes Corbyn is popular within the party but considering the Labour voters who voted to leave the EU it wouldn't surprise me if Labour tanked in the next election, especially with Corbyn's special blend of lunacy.

Nicola Sturgeon is a different kettle of fish, her ONLY interest is to gain freedom from the United Kingdom no matter what the cost to the people of Scotland..... so much so her "independence" from the UK will be quickly (if she had it her way) replaced by bowing down to an even bigger union of the European kind. 

Which puzzles me, why would you walk away from a union where nearly 4/5th of your business is with..... to get into bed with a Union where only 1/5th is ? Has she done the maths ? 

She says she wants to protect Scotlands interests, she'd be doing that by STAYING in the United Kingdom not trying to leave it. I suspect she has some kind of mental illness.

They (the SNP) also seem to think they will keep Sterling if they leave....nope won't happen, they will lose their central bank the bank of England, and the treasury,  They will have to pay back their debt currently running at 16 billion, they will lose all of the access to our security forces such as MI5 and GCHQ, all British Army barracks will move out of Scotland, they will lose Faslane nuclear submarine base, the list is big....

There will also be a hard border with passport and immigration checks between Scotland and the rest of the UK

All of this will have to be paid for and rebuilt by Scotland standing on their own, where all funding will be cut by the UK government and the EU....They also want to rejoin the EU....where one of the first things the EU will insist upon is the Euro currency....Tax in Scotland will rise like a rocket.

She really hasn't thought this through at all....They (The SNP) can't even manage their own economy as it is now, I would love to see them try with all of that on top of them as well.

No this is all about her wanting to leave the UK at ANY cost that's all, and the only hand she has is the independance trump card (excuse the pun ...oh the irony)...Scotland would be economically destroyed if they left the UK and joined the EU they would sink into depths of poverty not seen in decades, by that time the SNP will be voted out, but the people of Scotland will have been betrayed by Scottish national lunatics.

We are living in exciting and worrying times, I'm hoping it's purely a massive reset sweeping out all of the liberal ideology that has systematically destroyed our way of life for decades. It's not going backwards as some liberals love to say, its returning to the only sane way of living, where people can have differences and different ways of thinking yet still get on without being labelled as racist or misogynistic or thick or uneducated, if they have a different world view, we all have a different world view, tolerating those different world views is much more important than trying to silence them or destroy them.  





Wednesday, 29 June 2016

BREXIT and the end of the world





I've never been a fan of the EU...I've followed it's rise over the years and I haven't been impressed at its total disconnect between the people it represents and the bureaucrats who run it...The council for instance is unaccountable to the public, they are appointed by a nod....

It has all the trappings and appearance of democracy but unfortunately falls completely short of it because of that disconnect between the council and the public...

They can push through laws with no comeback from the public they control...they have effectively removed the ability of the people to remove them and that removal of self determination is a dangerous line to cross ....because it's been done in the past any dictatorship has that key element the inability to remove them. It always ends badly.

The last tool democracy has is the will of the people to ignore it is dangerous....

The ill will towards the EU has been steadily rising for years, their dream of total integration and fiscal union is total madness it will never work in a collection of European states which have such disparate economies....which is why the likes of Greece is now in debt to the EU to tune of 300 billion Euros with another 86 billion agreed....They will take generations to just break even with the mounting debt levels they have.

I'm not going to go into a deep financial rant it's pointless there is plenty out there to find out how bad this is I suggest you research to truly horrify yourself.

The ECB is buying the EU debt at an alarming rate it's simply not sustainable it's like the EU is a person with an inability to see how bad it's finances really are ....so it applies for another credit card to pay off the last one which has hit it's limit...

Deutchesbank is also in serious trouble the EU is a slow motion car crash and people do not see it.

Remain voters seem to think leave voters have ruined their lives....what they don't realise yet is that we've mitigated a disaster waiting to happen that will be an enormous crash protecting the UK by voting to leave the EU...

There has been so much political posturing over this referendum...initially allowed by Cameron to stave off the tory voters switching to UKIP... where Cameron thought it would also heal his own parties deep divisions over the EU..

Alas that didn't happen and like most of our ivory tower politicians who are totally disconnected from the public... he and his advisors had no idea how strong the anti EU feeling was running...which is why he thought it would be safe to call a referendum....but he was playing Russian roulette with a single barrelled shotgun.....

The majority of the remain voters I've spoken to seem to have rose tinted glasses on, they've believed the hype and the lies piled on thick like plaster on a wall. Whilst the EU gives the impression of a democratic organisation they are not, instead of thinking we've lost something, they should start thinking we've actually got rid of a nasty creeping infection...The information is out there you just have to go looking for it....The deeper you dig the more horrifying it becomes, and I fear the majority of remain voters simply cherry picked the good points and didn't register the bad ....or worse still didn't know about them.

 Time will tell what will happen.

But Sterling is rising, shares are increasing and the doom and gloom predicted is simply not happening.

Either way democracy has spoken and our country should pull together with each other to make a success
of the UK in its new direction after 40 years of capitulation to the EU.... Change isn't always bad....We have opened up our markets to the rest of the world, things can only get better and they will.








Monday, 2 May 2016

Broadcasting Terrestrial TV across your LAN

First off you need a bit of background into how this all works, TV transmitters have transponders which multiplex their digital channels onto the transponder, they are then transmitted to you and I over the air.

So one frequency can contain many different channels, in the old days of analogue this meant that one frequency meant one channel, but digital TV has opened up the radio spectrum to many more channels by splitting channels into different streams and transmitting them on one frequency.

This makes it ideal for computers to deal with because its just a digital stream and it can be split from the signal and displayed on appropriate hardware.

The hard bit is converting a digital tv signal into a signal that can be broadcast over wires or wifi.


There are two ways to do this, you can use Multicast traffic or Unicast traffic, they each have their plus points and minus points....


Multicast
Multicast traffic is one continuous stream of data broadcast on the multicast IP's all of the time.

IP Multicast Address Ranges and Uses
224.0.0.0 - 224.0.0.255
Reserved for special “well-known” multicast addresses.
224.0.1.0 - 238.255.255.255
Globally-scoped (Internet-wide) multicast addresses.
239.0.0.0 - 239.255.255.255
Administratively-scoped (local) multicast addresses.

The advantages of multicast broadcasting is reduction in bandwidth usage, as its only ever
one stream of data and the clients "join" the stream.

One of the disadvantages of Multicast are that if your router or switch doesn't support IGMP sniffing you will flood your lan with multicast traffic, older HP switches are prone to this behaviour, newer HP switches can be configured to behave themselves instead of bringing your network to a grinding halt.

So to sum up broadcasting and entire transponder of say the BBC channels wouldn't eat up much bandwidth at all. 

Unicast
This is a one to one connection to the TV server/streaming server and each unique connection adds to the bandwidth consumed.

now a standard definition broadcast will consume in its raw broadcast format around 3 - 4 megabits/sec and a HD broadcast up to 8 or more megabits/sec.

Now without doing the mathematics you will have realised that you'll soon flood a 100Mbit lan link with stream data. Which is true but there are things you can do to reduce this to make it very workable in a LAN.

There are many different ways you can broadcast your TV on your lan but I've found these two the simplest and most reliable.

How to do it 



first off there is Mumudvb which is available under Linux for quite a few different distributions, including the Raspberry Pi

http://www.mumudvb.net/


this extremely small piece of software will allow you to multicast your TV channels using a very simple configuration file and using very cheap USB adapters, bear in mind you will need a separate tuner for each frequency/transponder you want to broadcast, ours here in Wales where I live is Preseli and it has 6 transponders.

698000000 khz
738000000 khz
770000000 khz
730000000 khz
786000000 khz

as of 2nd May 2016


This simple configuration file below I used to broadcast the 786Mhz digital tv transponder across my network, some 31 channels in all, on a single usb NOVA-T stick

#For DVB-T if the bandwith is 8MHz you don't have to set other parameters
card=0
freq=786
port_http=9091 <---anything already="" font="" isn="" like="" t="" taken="" that="" you="">
timeout_no_diff=1000
dvr_thread
rewrite_pat=1
rtp_header=1
check_status=1
pol=h
srate=27500
autoconfiguration=full
autoconf_radios=1
autoconf_pid_update=0
autoconf_ip4_header=239.10
multicast_ttl=2
multicast_auto_join=1
unicast=1
ip_http=192.168.1.175
sap=1  <-- broadcast="" can="" font="" pick="" so="" streams="" that="" them="" up="" vlc="" your="">

sap_default_group=MCAST


the items in bold are the things you'll need to change, obviously the frequency of the transmitter and the tuner card(s) you have, if you've only got one it will be 0 (zero) two and it will be 1 (one) etc... and the IP address of the computer which has the tuner card fitted. 

I wouldn't advise you setup six tuners on a home network unless your router understands multicasting (BT homehubs seem to)  otherwise you'll effectively kill your network for any other use......as all transponder frequencies pushed to individual multicast addresses would be well in excess of 80Mbit/sec, which is fine if you have 1Gbit connection but not 100Mbit....

a saner setup for home use would be TVheadend, which has a very simple web based front end which is setup very easily and with the newer versions above 4.1 you can even stream your tv in your browser .

https://tvheadend.org/projects/tvheadend

and there are clients out there for Android and iPhone/IOS, with TVheadend and one tuner you can tune to one transponder at a time, but that transponder will make all the channels on that transponder available, so say if one person in your house was watching BBC1, you could have another client watching BBC2 or any other BBC channel at the same time, but if one of the users decided they wanted to watch ITV it would kick off the other client tuned to BBC, so if you need all channels available at all times, you'd need more than one tuner, if you are never going to have more than three people using the tv streamer then you'd only need three tuners, as the likelihood is three transponders would serve the majority of the channels at any one time, you could possibly get away with two tuners, but you may get fights occurring with clients who want channels on other transponders. 


If you are intent on broadcasting the entire content of your local TV transmitter across your lan (as I am in the school I work in) then TVHeadend is the sanest approach, as it also allows DVR recordings which Mumudvb doesn't.

You'll need at least 6 tuners preferably PCI not USB such as the excellent TBS 6205 and a gigabit lan on the backbone of your lan, fortunately we have that where I work, remember with unicast you add to the bandwidth requirements with every client you serve.... so if 30 people each watched a channel it would be 30 x 3 megabits = 90 Megabits/sec if you upped that to 60 clients it would be 180 Mbits/sec, similarly if 30 people wanted to watch BBC1 simultaneously it would still be 3 - 4 megabits each, under multicast it would only EVER be 3 -4 Megabits regardless of how many clients you had, so for scalability multicast is the way to go.

You can serve multi channels with just one tuner lets just say for arguments sake the BBC transponder and that will allow as many clients per channel as your pc and lan can stand, watching or listening to any BBC broadcast.

You will need a very beefy computer to run TVheadend where that many people are going to stream from, I've specified an i7 top of the range 6 core beast with 3 TB of disk space and 16GB ram, because I'm going to transcode the video and audio streams into a lower quality and hence lower bandwidth, which takes CPU power.

I've managed to produce a perfectly respectable picture and sound consuming 400 - 500 kbit/sec on the VP8 video codec, which is fine for Windows 7 on Google Chrome .....So that is 1 Mbit/sec per two clients ......

Small tricks like only encoding one sound stream instead of stereo cuts it down a fair amount and I've found that setting the maximum bandwidth for sound at around 32kbit's in mono was fine, if you really needed stereo then 64kbit/sec was the bare minimum, without noticing poor sound.

I've calculated that at maximum bandwidth on our lan a PC of that calibre could in theory stream to 300 + clients at the same time, realistically the client count will be much lower in the low 50s I should imagine, but you do need the extra grunt if a lot of people hit the server at the same time.

I've yet to implement this but my tests so far have shown that it works very well. So once I've successfully implemented this I will come back and post my configs and setup and some real world figures to back up my theory......


Watch this space !!!


Update

I've since implemented this configuration and successfully streamed to over 75 clients and the CPU barely got above 25% across all cores, and was streaming to all of those clients at 1Mbit so the Gigabit backbone peaked at around 65 - 70Mbits and with a theoretical limit of 125Mbits on a Gigabit switch.... I suspect it would support at least 100 clients comfortably........


If anyone requires help on implementing this solution please leave a comment and I'll get back to you with the configuration and streaming profiles 


















Friday, 3 July 2015


For those of us in computing Zero-config or Bonjour or Avahi is the bane of our lives, especially when trying to shoe horn it into an enterprise network because it will not travel across vlans,  Bonjour packets will not pass a Layer 3 boundary. What's needed to make Bonjour work across subnets is a proxy and here is a free open source working alternative......

There are many off the shelf products out there which do the job but you usually have to pay a fortune for the privilege.....

Well I've just implemented an Avahi reflector using nothing more than a cheap laptop running Debian 8 (Jessie) and a network cable and made it work over 20 vlans

All you need is a network port on a switch (ours are Cisco 3750's) which can give you a 8021q trunk connection, a pc, it doesn't have to be high powered ours is running on an Atom cpu on 2GB of ram, it doesn't actually need that much it currently sits in 351MB of memory running at full tilt, it barely tickles the cpu's .....

So install your headless debian server (there are many how to's out there)

load vlan and modprobe it into the kernel

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
8021q

setup your vlans on eth0 

vconfig add eth0 50  # or whatever it's called

repeat and rinse until you've added them all

go edit your /etc/network/interfaces

and put in each vlan with a fixed IP address in the form of

 iface eth0.50 inet static
  address 10.11.50.9
  netmask 255.255.255.0
  gateway 10.11.50.1
auto eth0.60
iface eth0.60 inet static
  address 10.11.60.9
  netmask 255.255.255.0
auto eth0.120
iface eth0.120 inet static
  address 10.11.120.9
  netmask 255.255.255.0

My 50 vlan has a gateway so that it can get updates and be ssh'd into remotely
but it's not necessary it will work without a gateway

so include all of the vlans you want to rebroadcast the bonjour packets on, make sure that you aren't using an IP address already assigned on the vlan in question, best way to avoid this is to put an exclusion in your DHCP server in each vlan and use the same last number on each vlan 

In my case I've assigned 10.11.XXX.9 to all of my fingers in the vlans so to speak

then edit avahi-daemon.conf in /etc/avahi and turn on 

[reflector]
enable-reflector=yes
reflect-ipv=no

you may have a problem with avahi stopping because of a unicast local problem but you can work around that by editing crontab for root and simply putting this line in 

* * * * * rm -rf /var/run/avahi-daemon/disabled-for-unicast-local
0 * * * * service avahi-daemon restart

the first line stops the avahi-daemon shutting down because of a .unicast local problem and restarts it every hour, and keeps deleting the file if it reappears.....

go back into the terminal and check with ifconfig that all your vlans are sending and receiving data

eth0.233  Link encap:Ethernet  HWaddr c8:9c:xx:xx:xx:xx  
          inet addr:10.11.233.9  Bcast:10.11.233.255  Mask:255.255.255.0
          inet6 addr: fe80::ca9c:dcff:fe84:cb9f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1338 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17959 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:567767 (554.4 KiB)  TX bytes:4442622 (4.2 MiB)

eth0.240  Link encap:Ethernet  HWaddr c8:xx:xx:xx:xx:xx  
          inet addr:10.11.240.9  Bcast:10.11.240.255  Mask:255.255.255.0
          inet6 addr: fe80::ca9c:dcff:fe84:cb9f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16884 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2635 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:5503572 (5.2 MiB)  TX bytes:1168738 (1.1 MiB)

and bobs yer uncle....

fire up your ipad and you'll see everything on every vlan, it also allows you to see all of your Apple TV's over every vlan and wifi and even allows you to connect your Apple TV's to ethernet cables rather than relying on wifi connections. You'll also see all of your VNC and SFTP and anything else broadcast on mdns 

I've also managed to get airprint working on non airprint printers, using linux CUPS ...if you're interested in implementing it drop me an email, it will work with ANY printer.


admin@draco.co.uk


Enjoy !!!! 







Sunday, 18 January 2015

Charlie Hebdo Shootings in Paris

I like many others around the world were shocked and horrified  by the brutal killings in Paris at the Charlie Hebdo offices.

But a few things bother me and simply do not stand up to scrutiny.

Namely when you look at the raw uncensored footage of when the "terrorists" kill the police officer Ahmed Merabet.

First off he'd been shot by an AK47 7.62mm round which is why he is lying on the floor which in itself is devastating enough and would put a hole as an exit wound the size of your fist or bigger, yet even though he had been rolling around on the floor after being shot there is no blood on the pavement, none not one bit.

Then there is the moment when the "terrorist" walks/jogs up to him to finish him off with a head shot..... and this is where I have to suspend belief for the following reasons.

All pointed bullets that do not deform end their tissue path travelling base first, since this puts their centre of mass forward; this is their stable attitude. The rotation imparted to the bullet by the rifled gun barrel is sufficient to force the bullet to travel point-forward in air (in properly designed weapons), but not in tissue where such factors as bullet shape and the location of centre of mass far outweigh rotation effects.  the AK-47 and the AK-74 represent what is seen in most shots. Sometimes the bullet yaws to 180°, or the base-forward position, in one cycle. These variations, along with the curvature in bullet path at or near the end of tissue path, are of far less importance than the distance the bullet travels point-forward before significant yaw begins, a tumbling bullet would explode your head.


So a head shot at that range would blow his head apart like a water melon because the AK47 round is notorious for being unstable once it hits a target and it yaws within one twist within the first few inches of impact, especially when hitting bone and a tumbling bullet produces devastating injuries, of which we can see none in the raw video.

At the moment the "terrorist" fires at the policeman's head it doesn't move at all, his head would be whipped forwards with the impact of this particularly heavy round which leaves the muzzle at 2,350 ft/s 

You would expect to see major trauma from being shot at that range especially in such an area which is rich in blood such as the head.

Furthermore there is a video out there which has slowed down the frames and zoomed in, you can clearly see that the bullet strikes the pavement about a foot above his head to the right.

Now all the media outlets are reporting him as being finished off with a head shot .....that simply isn't true, it can't be,  nothing that happens in the raw footage points to him having been shot in the head. What you do see is the "terrorist" missing his head.......

I spotted this immediately I know what a high velocity round can do and that "terrorist" missed.

So that means the policeman pretended to be shot to possibly stop being shot at any more ? who knows, maybe he did die of his other wounds but the fact there was no blood, no massive trauma at the scene....or maybe he wasn't shot at all .....who knows......it simply doesn't add up


But the plot thickens
On the same day Helric Fredou, 45, the deputy director of the regional judicial police in Limoges turned his gun on himself, hours after Cherif and Said Kouachi killed 12 people in an attack which included the death of two policemen, the media reports he was depressed ?

Couple this with the recent announcements of cyber war games with the US and UK and the requests to drop encryption entirely to the big companies and put forward the snoopers charter again to effectively allow the UK government to listen in on ANY communications.

I have no doubt at all that our politicians will use this "event" for want of a better word and twist it
to get what they want regarding the effective removal of our privacy under the guise of anti terror laws, keep the people frightened and they'll agree to anything.....

That to me rings huge alarm bells, there are conspiracy theories out there that the Charlie Hebdo shootings were a false flag event, to smear muslims and whip up support for the west to go back into Iraq and all the other places ISIS are and wage another ground war......Do you know what ? nothing surprises me these days, remember the WMD's ? nothing found, but oooops we're in a ground war lasting years and David Kelly the weapons expert commits suicide in highly suspicious circumstances......

The more you read about the backgrounds and the events leading up to the shootings and the fact that one of the terrorists left their ID in the get away car (REALLY ?)  it does smell a bit too convenient.

Whilst I have no doubt people died as a result of what happened in Paris I don't think we are being given the full story.......

I'm cynical about what we are spoon fed by the media most of the time, there is always a hidden agenda these days 

Somebody is making a lot of money out of these wars, follow the money ......

There is more to this story and that is the actual bit of footage of the policeman getting shot.... it simply does not add up any photographer worth his or her salt would spot these scale and aspect ratio errors, but on the shaky video you don't notice it as much unless you slow the video down.


look at this frame taken from the "video" note how high the terrorist is in relation to the billboard he is just about to pass




There he is again as you can see the billboard towers above him by a good 3 or 4 feet ??? and he is close to the billboard so his relative height is easy to judge


Now here is a picture from Google Earth of the very same place, notice how high the billboard is ? that would make the terrorist about 2 feet tall, there are other inconsistencies as well background items appearing
through the terrorist as he passes them and how they seem to hover on the ground....something isn't right here ......


In the picture below here is a woman here walking past several feet behind the same billboard.....look how tall she is in relation ???




What is going on ?

Wednesday, 17 December 2014

Taliban School Massacre

I'm utterly disgusted with the Taliban to think that they planned and carried out this massacre of schoolchildren mainly as retribution for the Pakistani government clamping down and severely weakening the Taliban's grip in and around Peshawar.

It takes a special kind of religious nut job to think what they are doing is right, children have no place in the stupid and idiotic tit for tat of warring factions, and they certainly should not be subjected to this horrific slaughter.

I honestly doubt the sanity of these groups such as ISIS and the Taliban, they have some twisted world view which is being portrayed by some as "well aren't all Muslims like this ?" Well no not all Muslims are like it in fact the vast majority are law abiding people who want nothing more than a peaceful existence.


Personally I think all religion be that Christian or Islam or anything inbetween should be outlawed it's caused so much misery over the centuries, religious people are so blinded and blinkered by their faith and have this air of superiority about themselves, some are just downright arrogant, they believe 100% they are right and will not entertain differences of opinion. I learnt a long time ago that arguing with religious people is totally pointless, they are lost to their religion, and grip onto it like it's promising them ever lasting life or something.......

But that's faith for you isn't it, it demands blind obedience because god help you (pun intended) if you start to think logically and rationally about your existence and how things came to be, because once you've woken up from sticking your idiotic head in the sand religious existence and smelt the coffee so to speak, there is no going back.... it simple doesn't wash any more.


I speak from experience having been a Christian a long time ago but then reality dawning on me that there is no God or Gods, and that we are just a species of ape spinning around on a rock in a vast universe. Once you've grasped that and rejected your religion the sense of freedom you feel is utterly mind blowing.

I'm betting if the Taliban were Atheists they wouldn't be the Taliban.....but normal people, religion screws with your head........


Sunday, 30 November 2014

Teenagers Pah

Teenagers where do you start ? Well I guess we all had to be one at one point, but things have changed a lot since I was one.

For a start teenagers these days seem to be a lot more image conscious, how they look is important to them.... In my day you just threw on a pair of jeans some trainers wet your hair down and that was as good as it got, so today's image conscious teenager is purely a product of media pressure of how to look.

I also think teenagers today are a lot more self centred, I'm probably not very qualified to comment on all of this because at 16 I was in the Army and under a very different type of social order which was very disciplined and ordered, but to be honest I couldn't be a teenager these days, life seems over complicated for them, mostly their own doing I might add, what with social media, phones, computers that instant fix they get where each and every one of their friends can contact them at a moments notice in real time.

I think that puts a fair amount of unneeded pressure on them again all their own doing....

I'll give you an example I could turn off FOMOteens internet right now and within seconds he'd be in here saying "Internet is off"....that would be the limit of his conversation about the subject or the other favourite one is "my download is really slow".... but that's mainly because I throttle his connection or he'd quite happily take it all 24/7 and not give a thought to anybody else using the internet......

I'd have no sympathy of course because his life revolves around the internet, he's spent all weekend since Friday afternoon online solid (it's Sunday afternoon now)  actually that's not entirely true he did come downstairs with his phone surgically attached to him once and sat with us but his face was crooked over pawing at his phone like a demented baboon in case he missed some mind blowing event online......and of course there are the refuelling stops for food and drink, but like a ninja he spends very little time on the mission, get in get food get out.....

Sometimes he turns his phone to us and says look at this ..... and we are subjected to some mind numbing banality which apparently passes for humour.

I sometimes despair at today's youth, their lives and minds instead of being expanded by technology have been narrowed to the point of bite sized drivel spoon fed to them by the likes of youtube, facebook, twitter or some other social media platform.... I do not think it's healthy one little bit.

To be fair to FOMOteen he's doing very well at school so I shouldn't complain but bloody hell get out in the real world and do something REAL !!!!

As for the other teenagers I come into contact with where I work well lets just say in the most part respect isn't part of their world, a prime example of that is opening a door before they do and they assume you're opening it for them and they come barging through......ONE of my pet hates about teenagers, they are completely in their own world anything on the periphery is of no importance to them, until it gets in their face.....

I've learnt though.....I ignore them and just carry on walking as if they aren't there, basic physics takes over at the point in that I am the larger mass therefore my kinetic energy is transferred to them, and do you know what over the weeks I've been employing this non verbal method of teaching them manners I see the same faces going for the door, then them seeing me and knowing I'm an immovable and much higher mass object and they give way......

but sadly it's not through manners it's purely through not wanting to bounce off me again in front of their yolo swag friends.......

I've got to be honest I tolerate teenagers but I have a very low boiling point with them, I much prefer when they've grown up a bit and become more aware of the world around them instead of the self absorbed years parents have to endure......

Things that will make steam blow from my ears with teenagers......

A) Disrespecting an Adult (guaranteed thermonuclear uncontrolled detonation)
B) Assuming they deserve respect for simply existing having done nothing to deserve it
C) Trying to negotiate (pointless in my eyes, rules are rules)
D) Tantrums (2 year olds do tantrums, do a tantrum with me in your teen years it'll be your last)


Other than that teenagers are really cool dudes man.......cough