I exchange my call sign with someone in Slovakia.
If the conditions are just right--and that depends on weather and sun spot activity and stuff--
You can really get your RF out across the world.
2 meter band is generally considered to be much closer range.
(Are we looking at the post-apocalyptic internet here?)
I think so, yeah.
(So, after civilization falls apart...)
I'll be talking to Dave over... making sure everything's OK.
It seemed to die--briefly.
I'm scared to touch anything because it will suddenly die
(So this is quite flaky stuff, right?)
It mainly-- it's normally very reliable
the problem is that we have these cables which I made myself and, ah...
Yeah, don't look at this one.
(Why have we got two ThinkPads sitting on the desk in front of us?)
...going to sleep... Well,
I thought it might be interesting to talk a little bit about packet radio and maybe touch on amateur radio in general as well.
Packet radio is...
It's essentially sending data over the radio waves and
the frequency spectrum I'm using at the moment is the amateur radio bands.
So this is 2-meter band, what I'm using now, and that's about 144-145 MHz
2-meter band is probably the band with the most packet radio
Because there's something called "APRS" which is the Automatic Packet Reporting System
That's all based upon one protocol called "AX.25"
and this is kind of a...
Sort of... It's AX.25, but...
modified to accommodate some of the things required to make it work on amateur radio, instead of over some kind of cable.
Okay. So we've got two of the cheapest ham radios. These are Baofeng UV-5Rs
We've got two laptops, and we've got two-- what are essentially modems,
they're called, "terminal node controllers," and they essentially take data through a serial input and
turn it into some some sort of strange sound, a bit like dial-up
Essentially, we're encapsulating what we would normally put on Ethernet, but
We're encapsulating into what's called "KISS framing," and on top of that: AX.25
I think I should probably draw this out, because going it's a bit complicated...
Let's draw a radio--and then we have our modems, or terminal node controllers, and
these are talking to the radio. This is actually an audio cable,
So this is just audio going straight into the radio. And then we have two computers,
...this is my laptop...
And this is a serial cable. I will draw the frame, the TCP/IP...
At the very bottom we have KISS which stands for "keep it simple stupid," and
the way this type of framing works is that if you send a zero,
that means there's a data frame coming in. So it's very simple.
After that we have
AX.25, and this essentially talks at hardware addresses
So what you might typically consider to be MAC addresses, but in the case of radio--it's actually my callsign, which is-- M6PIU
And... (And if you need to get in touch with Aaron...)
Get on the radio (...urgently!)
Yeah, and then so this AX.25 actually becomes the lowest layer, in the setup that I've got here, over the TCP/IP stack.
So this is, let's say M6PIU,
to my friend, G1ZEK.
This guy actually gave me this TNC here, so
This is very low-level framing of messages.
It's just saying, "pass this data over to this, and this is the the length of the data."
This entire thing is going to be the the TCP/IP stack, with this framing underneath it.
On top of that, we have the internet layer.
So, this internet layer works on the basis of IP addresses, so
Ham radio operators are fortunate enough to be allocated:
44.0.0.0/8
That's a huge range of IP addresses, and
You can, as a ham radio operator, be allocated a small portion of that.
This is the kind of level that the Internet Protocol layer runs at
Actual IP addresses rather than Ethernet addresses or call signs as in the case of AX.25.
If you look in arp.c in the Linux kernel,
you'll see specific references to AX.25, for the way that it formats callsigns, as if they were
Ethernet addresses, MAC addresses.
On top of the internet layer, we have the transport layer. This is TCP... so this is TCP over IP...
Let's just call it TCP
It could also be UDP
And on top of this, we have the application.
Maybe we can talk about what's actually being transmitted right now:
Every five seconds, we're sending a ping. It's at the same level of TCP/UDP
so, we could also write "ping" here, and you'd also have--for example, "ARP"--here. This is the address resolution protocol.
It's converting Internet addresses into Ethernet or call signs.
When I want to send a ping to this machine, essentially what's happening is,
my computer first uses ARP to resolve the call sign for the IP address. So it says,
"who is 44.131.56.17 tell [...]"
and then the address that it's coming from. So in this case,
44.131.56.16
So-- 17, if it's available,
will respond to this packet and say that,
44.131.56.17 is at M6PIU-[some SSID]
So in the case, I think one of these is 0 and the other one is 1.
(Is that different devices?) Yes, because the call sign is being used as the Ethernet address in a typical sense,
You can't have the same address in two places, especially if you use more than two machines, because
they would both respond, or, they would both end up receiving a packet destined to a certain IP address
Once you know the call sign of the Ethernet address,
the packets can be actually sent via AX.25, because that's the the only level above AX.25
It doesn't understand anything past that, it's just call signs and packet length.
This information is going to be cached for a while.
I forget how long exactly, maybe five or ten minutes?
Or until it fails to contact the remote host again.
(I've got a vision of the airwaves being full, with lots of this happening from lots of devices,
but on the same channel, is that how it works?)
Lots of devices can use the same frequency with AX.25,
because the packets are being sent with a sender and a recipient in each packet.
(You get clashes, though?)
You do-- actually one of the biggest problems with running modern-day Linux on
Ham radio is that it's expecting the network hardware to respond very quickly
So when it does this step, it says, "who has this address, tell whoever," it ha s already requested the same information again
before it's even gone out of the the modem.
So, you have to set this to a more reasonable time, like 5 seconds or something, instead of 100.
If you're continuously requesting the same information,
the recipient has no time to respond, because this is only half duplex,
only one person on the radio wave, or the frequency, can speak at a time.
This one is actually pinging right now.
I've set the interval to five seconds and it takes about
2.6 seconds for a ping to reach its destination and be replied to.
What we have here is machine 0 pinging machine 1, so this is from--no ARP information cached at all yet--
So, the first packet that we received is coming from M6PIU,
with some SSID, going to QST, and QST is kind of USQ-code-speak for,
"All operators that are listening,"
so we're saying, to everyone that's listening,
"Tell me who has this address, 41.131.56.17." This gets sent a couple of times, and eventually,
machine 1 responds to machine 0, so it's coming again from me...
...to me...
...and it's saying that machine 1 address is
44.131.56.17, and it's at this, sort of Ethernet address, or, hardware address
This hardware address is actually my callsign, encoded in some strange way with some bit shifting,
just to make the character set fit into what would typically be a hardware address.
This happens a few times, because not all packets are sent successfully.
Sometimes, it's quite impatient and will send the same packet again, especially in the beginning,
but once machine 0 has learned that the hardware address, my callsign,
is associated with the IP address of Machine 1, it can start sending ping requests.
These purple packets are ICMP, which is the pinging protocol.
Here we have two ping requests, and then two responses.
These are going at a higher layer now in the TCP/IP stack. They're using IP addresses as opposed to hardware addresses.
What we ended up with is a ping response time of about two and a half seconds,
which is not bad -- considering we're running at, probably around, 1.2 kilobits per second.
(This is a closed demo, with two machines and two radios, does anyone else have that?)
I quite frequently talk to my friend G1ZEK over AX.25
Not via TCP, but at a lower level.
If you don't connect up the stuff, or if you don't activate the TCP layers above this,
you can connect to these just by a serial terminal, such as GNU Screen,
and you can exchange messages, just as text.
It's much more reliable than trying to get TCP/IP working off of all of this. (So, because you've got these layers working on TCP/IP...)
(what does that give us that you wouldn't get another way?)
(Would you be able to, say, send a website or...?) We can definitely send a website.
I can show you that, it will take quite a while to load.
It will be a very small website. Let's set up a small web server, and
try to load that page. One of the problems is that--
So really, operating two radios in such close proximity is a terrible idea. You can actually damage them. I've got these set to 1 watt,
and I tried to put as much space between them as I can.
The problem is that with these very cheap
USB-to-serial adapters, they can crash if there's too much RF around, so
a lot of the time I have to keep on restarting this, because
It breaks basically.
Let's try and load a page.
(so the flashing there is connection... the packets being sent...)
Yeah, so on this side
It says X method for transmit and receive. You can see that when transmit is red here,
receiver's red over on this side, so they should be alternating.
Ping actually takes up a significant amount of bandwidth, when...
here at this speed, so I'll kill ping. It seems to be working. So your web browser open. I propose a little page earlier
it's only one sentence, but...
(What we lookin' at for a sentence? A minute? Several minutes?)
It depends on how reliable it is, because it could take hours at this rate.
But a single sentence, I don't know maybe if you have everything tuned quite precisely maybe
20 seconds or something. (Shall I ask a silly question: pictures?) I have done it.
It took maybe 10 minutes, but a picture of me has transmi... Well, probably it's out of space now, you know a
A very weak signal of my face.
This machine on the Left received a packet saying, "here is this address, tell that one..." but, it doesn't seem to have responded...
These connectors are also very flaky...
Give them a squeeze...
Come on, you can do it!
From the activity light here, it looks like pings are being sent, and there are responses coming through,
But currently, it says that destination host is unreachable.
What you can do, instead of using these things, is actually use the sound card and
that's sort of become a lot more popular now, I quite like these because
(Well you can see a lot more information there...)
Yeah, I think they're much more cool than using a sound card. It has timed out, what a surprise.
(...why [unintelligible] data...)
It's showing the packets being exchanged, so they're definitely talking to each other right now.
There's a lot of packets which are becoming out of order or being re-transmitted.
Yeah, I think it has timed-out again.
Let's try using Curl. Curl is just simple command-line utility to request web pages and files from web servers.
The Python web server here picked up that I requested a page.
(Okay, that's a first start, right?)
Yeah, it hasn't-- AH! The page  has loaded! But only in Curl--I don't want to show you...
...but I will, it's just down here. So this is the HTML that I typed in, which is this "hello computer" file from M6PIU.
So we're going to try and load it in the web browser now. (It's all your CSS, right?)
Oh yeah, for this website, and on my personal one, it's loaded with CSS.
[ laughter ]
Should have timed it, shouldn't we? Just to be sure, opening a new tab
(a lot of re-sent...)
Yes, I just saw her on this little Python web server that
The page was requested. Also, I got it working this morning, it was fine. So these are our... A-HA! It's done!
There you go. "Hello, computerphile," I spelled it right, I think...
I think, in the early days, it probably contributed somewhat to research
towards TCP/IP and other network protocols, especially on slow connections, unreliable connections, like this.
And I like to think of it as the grandfather of 
GPRS and Wi-Fi and everything that works now.
You would have to s-boxes here to 4-bit s boxes for example plugging into one 8-bit permutation box
So the outputs of these get jumbled about a mixed up here the way an SP network works is it?
looks a lot more rounded you have some of questions and things actually these numbers were chosen 3/16 5/16 or 1/16 7/16
