Getting a Pi online with RISC OS and a WiFi XP machine
There is just time remaining, this year, for one last hack.
Sitting in front of me is a netbook running XP. It is what I am writing this on. It has a WiFi connection to an ADSL router, which can offer up to 2mbit.
Sitting on the shelf beside me is a RaspberryPi running RISC OS. It has no connectivity at all.
Wouldn't it be nice if I could join the two together?
Actually... it is possible.
Preparing the hardware
For this experiment, I simply found a short network cable and connected it between the Pi and the eeePC. I think it is a cross-over cable. All it says is "certified for gigabit ethernet 24awgx4p type cm" followed by a standards number. I suspect this is talking about the cable, not how it is wired up. I was not overly concerned, as I know that the port on the eeePC can switch polarity if necessary.
If you connect your machines via a hub or some other sort of router, be aware that using Internet Connection Sharing will force the PC's ethernet port to have IP address 192.168.0.1 - so you may need to tweak other settings on your network to compensate.
Preparing the XP box
This is written with Windows XP in mind. It should be broadly similar for Vista and maybe Windows 7 as well. If you have Windows 8...God Help You.
See that little WiFi icon on the system tray? Double-click it. The usual diagnostics will appear showing your interface is connected to such and such, your connection rate is blah and a little graphic of blah packets have been sent and blah packets have been received.
There are three buttons along the bottom, plus the Close button. Click on the Properties button.
If you cannot find the above (or if you have no obvious WiFi indication on the system tray), go to Start, then Control Panel, then Network Connections (XP) or Network and Internet (after XP). If you see something that looks like the names of networking devices, try double-clicking on the one that corresponds to the WiFi device. You ought to end up with a window that looks vaguely like the one above.
Failing this, look in the "Help Center" for "internet connection sharing".
Carrying on... In the complicated-looking window that appears, click on the Advanced tab. [this may be a simpler "Sharing" tab in Vista/7]
Now click on the option "Allow other network users blah blah" and select the name of the connection that corresponds to the Ethernet port (later versions of Windows might be smart enough to figure this one out for themselves...). I tried with and without the option to change the status, it didn't seem to make any difference.
Click on OK. You may or may not be asked for a copy of the Windows installation CD, it may or may not then ignore that and read stuff from inside Windows, and you may or may not need to reboot. When I tried this a long time ago for playing with my OSD, it kept asking for a CD that I could not give it (netbook, no optical drive) then 'finding' the files within Windows, then insisting on rebooting. A lot.
This time? It did it on the fly while I was downloading something. Not so much as a hiccup.
Note - you might need to reboot your hub if you connect the intranet like that, for the ethernet port on this XP box will become
192.168.0.1. You cannot change this.
Preparing RISC OS
I'm running my own ROM build on the Pi, so for some reason the network configuration tool positively insists that there is no network interface.
Going to the command line and entering
ifconfig -a will show that the interface ej0 exists.
This isn't a problem, it is perhaps easier to edit the config file manually than to go through the ridiculous pile of windows necessary to set things up in the UI.
Open the directory
$.!Boot.Choices.Internet and you will see three files - Routes, Startup, and User.
Copy the file Startup as Startup_O.
Now open the file Startup in a text editor, and delete everything within.
Now enter the following:
What is worth looking at in more detail are the two IP addresses shown in colour. The blue address is the IP address of the Pi. You can change this if you like, to be 192.168.0.something.
Set Inet$HostName RaspberryPi
Set Inet$EtherTypeA <Inet$EtherType>
IfConfig -e ej0 192.168.0.2 netmask default
IfConfig -e lo0 127.0.0.1
Set Inet$EtherType <Inet$EtherTypeA>
Set Inet$Resolvers 192.168.1.1 192.168.0.1
Route -e add default 192.168.0.1
Set Inet$IsGateway ""
Set Inet$RouteDOptions ""
The address in red is the address of the internet router. This is used for DNS queries by preference, the host PC probably does the same unless you have configured to use OpenDNS or somesuch.
Your configuration file should look like this:
Save the configuration file, shut down, reboot (RISC OS, not the PC!).
- Geek note #1: This is a minimal set of commands necessary to get this working on the Pi. It throws away all compatibility with earlier versions of RISC OS (because you will not ever be running RISC OS 3.60 on a Pi!) and in addition it hardwires in a few assumptions. This file was designed for clarity and brevity.
- Geek note #2: Do not use the UI configuration tool afterwards. It will probably screw everything up.
- Geek note #3: You should have AUN and ShareFS disabled for this to work correctly. As far as I remember, this is the out-of-the-box state nowadays, as people are more likely to want to look at Google than spam the internet with stray AUN packets.
- Geek note #4: This should apply to other RISC OS devices such as the Beagle and Panda boards. If the ethernet interface has a different identifier from ej0, you can use the ifconfig -a command to find out what it is called.
First step - try to ping the Windows box:
Then try to ping the internet router:
Now ping the OpenDNS server, it is easy to remember, 126.96.36.199:
Finally, ping something by name, here I am pinging en.wikipedia.org:
If it fails with no route to host, check that your gateway (the Route -e add default) line is correctly pointing to the Windows XP box, not the internet router.
If the IP address tests work but the named test fails, you have not put the correct address of the internet router into the Set Inet$Resolvers line. Either insert the correct address, or cheat and use 188.8.131.52 (though I warn against using OpenDNS as it appears to break DNS rules by returning spam responses for non-existent domains, instead of the expected/required "NXDOMAIN" error).
All good so far? Okay then - time to load NetSurf!
All done, yay, etc
Fire up NetSurf, go look at stuff...
Speaking of hacking...
I saw a while back, a reminiscence of those little cards you used to get in boxes of tea (Brooke Bond (PG Tips) used to do many). Cards that presented many topics (Google for "Brooke Bond cards" to get an idea) and also sometimes instructed you on such useful things as how to fight off a tiger using a broom handle. This, most likely, had its origin in the days of the Raj when it might be possible that a big angry cat decide you are an annoyance...and you, armed only with a mop. What amused me was that this description was described as "the ultimate life hack".
Life hacking, in its basic form, is using standard stuff to make complicated/boring tasks simpler in non-obvious ways. The essence of playful hacking applied to life. Saving your sorry ass from a tiger with a bit of wood is not so much a hack as a "dammit, where's me cannon?" moment. Assuming, of course, you survive. It is also not something you are likely to encounter much in this day and age.
Life hacking, in its more wishful form, is exactly that. You see this? It's my katana. It's so bloody awesome it can slice through solid objects, like cars, in slow motion.
That would be a life hack. Sadly, I have not yet found the cheat code, despite trying the Konami code on every elevator and vending machine with the appropriate buttons...
Please note that while I check this page every so often, I am not able to control what users write; therefore I disclaim all liability for unpleasant and/or infringing and/or defamatory material. Undesired content will be removed as soon as it is noticed. By leaving a comment, you agree not to post material that is illegal or in bad taste, and you should be aware that the time and your IP address are both recorded, should it be necessary to find out who you are. Oh, and don't bother trying to inline HTML. I'm not that stupid! ☺ ADDING COMMENTS DOES NOT WORK IF READING TRANSLATED VERSIONS.
You can now follow comment additions with the comment RSS feed. This is distinct from the b.log RSS feed, so you can subscribe to one or both as you wish.
|Rick, 30th December 2013, 20:27|
The Konami code is:
up up down down left right left right b a
Mmmm... I wonder what would happen if you tried it now? <hint!> ☺
|joe, 3rd January 2014, 00:54|
How long would one's PC be on line, to get that many packets sent and received?
Packets received amounts to US's latest national debt figures.
(Felicity? Marte? Find out!)
List all b.log entries
Return to the site index
PS: Don't try to be clever.
It's a simple substring match.
Last read at 04:05 on 2021/03/07.
© 2013 Rick Murray
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted.
RIPA notice: No consent is given for interception of page transmission.