Econet (AUN) on RISC OS for Raspberry Pi

discuss general risc os software applications and utilities
Related forum: adventures


Post Reply
User avatar
Lion
Posts: 482
Joined: Sat Mar 14, 2009 6:56 pm
Location: Woodside, California
Contact:

Econet (AUN) on RISC OS for Raspberry Pi

Post by Lion »

I have a 32-bit copy of SetStation which does seem to successfully change the station number displayed in !Configure > Network > Econet, but when you reboot, the station number reverts to zero and "Enable AUN Econet" is turned off.

Is this supposed to work? Or is it not supported on the Pi?
paintings
Posts: 52
Joined: Mon Jul 13, 2020 7:41 pm
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by paintings »

Lion wrote:
Wed Sep 22, 2021 2:26 am
Is this supposed to work? Or is it not supported on the Pi?
To the best of my knowledge, the AUN code has only been fully exercised on the IOMD (Risc PC/A7000) build of RISC OS 5. However it should work on the Pi.

One possibility is that SetStation doesn't trigger a write of the CMOS RAM settings to the Pi's CMOS file (i.e. only the in-memory copy is being updated). Try making another change to CMOS RAM settings after running SetStation: for example, *Unplug a module you're not using (!Paint would be a fairly safe choice) then *RMReinit the module after shutting down and restarting RISC OS.
User avatar
IanJeffray
Posts: 1791
Joined: Sat Jun 06, 2020 3:50 pm
Location: Scotland
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by IanJeffray »

What Econet hardware is available for the Pi with RISC OS support?

I have a feeling that SetStation for RISC OS may bash the I2C directly (IOMD/IOC) rather than using OS routines which may explain why it's not working on a Pi. ICBW here.
paintings
Posts: 52
Joined: Mon Jul 13, 2020 7:41 pm
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by paintings »

IanJeffray wrote:
Wed Sep 22, 2021 10:14 am
What Econet hardware is available for the Pi with RISC OS support?
None that I know of. My answer was based on the assumption that AUN (i.e. Econet over Ethernet) would be used on the Pi. This would - obviously - require a gateway machine if communication with a "real" Econet station was needed.
User avatar
Lion
Posts: 482
Joined: Sat Mar 14, 2009 6:56 pm
Location: Woodside, California
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by Lion »

I fear my first pass at using SetStation may have corrupted something because now the station number is stuck at "0" and can no longer be changed.

Is there an "official" way to change the station number of a Pi? The "This station" display in !Configure is not editable.
paintings
Posts: 52
Joined: Mon Jul 13, 2020 7:41 pm
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by paintings »

I've just tried the 32-bit version of SetStation on my Raspberry Pi 4B running RISC OS 5.28.

As I feared, just running SetStation doesn't update the CMOS file on the SD card, but issuing *Unplug !Paint followed by *RmReinit !Paint did properly update the CMOS file.

After a reboot, my Pi now has a station number of 4. I haven't got an AUN network to try it out, but at least the station number is set :-)
cr12925
Posts: 164
Joined: Sat Mar 09, 2019 9:31 pm
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by cr12925 »

IanJeffray wrote:
Wed Sep 22, 2021 10:14 am
What Econet hardware is available for the Pi with RISC OS support?

I have a feeling that SetStation for RISC OS may bash the I2C directly (IOMD/IOC) rather than using OS routines which may explain why it's not working on a Pi. ICBW here.
There is Econet hardware for a Pi but drivers only exist for PiOS, and the hardware version which is presently in circulation would be unsuitable for various reasons to do with interrupt timing and graphics. The next version may be better - watch this space!

C
2 x Master 128, 1x BBC B, Viglen floppy drives, 2 x Econets, 3 x Econet-AUN bridges, organist, former purveyor of BBS software...
User avatar
Lion
Posts: 482
Joined: Sat Mar 14, 2009 6:56 pm
Location: Woodside, California
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by Lion »

On the assumption that my CMOS was corrupt I deleted the CMOS file and oh boy that was a mistake.

I assumed that RISC OS would just recreate it with default values. But I guess if the file doesn’t exist it never tries to recreate it because now it’s gone and none of my settings stick.

So I guess I’m wiping my RISC OS microSD card and starting from scratch huh.
cr12925
Posts: 164
Joined: Sat Mar 09, 2019 9:31 pm
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by cr12925 »

Lion wrote:
Thu Sep 23, 2021 6:04 am
On the assumption that my CMOS was corrupt I deleted the CMOS file and oh boy that was a mistake.

I assumed that RISC OS would just recreate it with default values. But I guess if the file doesn’t exist it never tries to recreate it because now it’s gone and none of my settings stick.

So I guess I’m wiping my RISC OS microSD card and starting from scratch huh.
Can the vanilla file not be found in the distribution and put back in situ??
2 x Master 128, 1x BBC B, Viglen floppy drives, 2 x Econets, 3 x Econet-AUN bridges, organist, former purveyor of BBS software...
paintings
Posts: 52
Joined: Mon Jul 13, 2020 7:41 pm
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by paintings »

Lion wrote:
Thu Sep 23, 2021 6:04 am
On the assumption that my CMOS was corrupt I deleted the CMOS file and oh boy that was a mistake.

I assumed that RISC OS would just recreate it with default values. But I guess if the file doesn’t exist it never tries to recreate it because now it’s gone and none of my settings stick.
From the command line, enter:
*SaveCMOS !Boot.Loader.CMOS

This is all explained at https://www.riscosopen.org/wiki/documen ... berry%20Pi
User avatar
Lion
Posts: 482
Joined: Sat Mar 14, 2009 6:56 pm
Location: Woodside, California
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by Lion »

Thanks for the link, that’s very helpful.

I recreated my CMOS but I guess I’m having bigger problems because my original issue remains, every time I reboot, “Enable AUN Econet” in !Configure is turned off, and “This station” reverts to 0.0.

For a bonus question: My pre-desktop boot resolution has reverted to VGA, how do I change that? (I realize I could probably just replace the CMOS file with the one from the original Pi distribution but it would be nice to know.)
paintings
Posts: 52
Joined: Mon Jul 13, 2020 7:41 pm
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by paintings »

Lion wrote:
Thu Sep 23, 2021 7:28 am
I recreated my CMOS but I guess I’m having bigger problems because my original issue remains, every time I reboot, “Enable AUN Econet” in !Configure is turned off, and “This station” reverts to 0.0.
It's possible that your copy of SetStation had become corrupted. If you acquired it as a ZIP file (most people do), try unpacking it from the archive afresh.
For a bonus question: My pre-desktop boot resolution has reverted to VGA, how do I change that? (I realize I could probably just replace the CMOS file with the one from the original Pi distribution but it would be nice to know.)
Try *Configure MonitorType EDID
User avatar
Lion
Posts: 482
Joined: Sat Mar 14, 2009 6:56 pm
Location: Woodside, California
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by Lion »

Thanks for the MonitorType tip - worked a treat.

No such luck with SetStation though. I did find my original archive but freshly unzipped the results are the same.

Even without trying to set the station number at all, I can’t get “Enable AUN Econet” to stick on. When I click Save it says I need to reboot for it to take effect, but whether I do or not, it turns itself back off again. Is this because the station number is an invalid 0? Or some deeper problem?

I think I got my copy of SetStation from a random post in the RISC OS Open forums. Is there a canonical place where I should be getting it from?
paintings
Posts: 52
Joined: Mon Jul 13, 2020 7:41 pm
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by paintings »

Lion wrote:
Thu Sep 23, 2021 7:54 am
No such luck with SetStation though. I did find my original archive but freshly unzipped the results are the same.
Try calling *SaveCMOS immediately after running SetStation. Unless SetStation isn't changing the station number at all, which would be very odd...
Even without trying to set the station number at all, I can’t get “Enable AUN Econet” to stick on. When I click Save it says I need to reboot for it to take effect, but whether I do or not, it turns itself back off again. Is this because the station number is an invalid 0? Or some deeper problem?
It does require a valid station number, otherwise it reverts to "off" as you have discovered.
I think I got my copy of SetStation from a random post in the RISC OS Open forums. Is there a canonical place where I should be getting it from?
That's the same place I got my copy from. I think they're still of the view that it shouldn't be made too readily available (I'm not sure why: the original reason for restricting distribution had long expired).
cr12925
Posts: 164
Joined: Sat Mar 09, 2019 9:31 pm
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by cr12925 »

I've never used AUN Econet on a RiscOS machine, but I do know that "Pure" Acorn AUN has fixed IP addresses for each network and station number combination. Is it possible that SetStation is only of any use when there is an actual Econet card (i.e. connects to the same type of wire bus as a BBC micro), and AUN Econet will only enable if you have an IP address set which is in the "approved" range??

I have no idea whether that is right, but it had a ring of plausibility about it by way of an educated guess, so I thought I'd throw it out there.

C.
2 x Master 128, 1x BBC B, Viglen floppy drives, 2 x Econets, 3 x Econet-AUN bridges, organist, former purveyor of BBS software...
cr12925
Posts: 164
Joined: Sat Mar 09, 2019 9:31 pm
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by cr12925 »

cr12925 wrote:
Thu Sep 23, 2021 6:03 am
IanJeffray wrote:
Wed Sep 22, 2021 10:14 am
What Econet hardware is available for the Pi with RISC OS support?

I have a feeling that SetStation for RISC OS may bash the I2C directly (IOMD/IOC) rather than using OS routines which may explain why it's not working on a Pi. ICBW here.
There is Econet hardware for a Pi (Edit: viewtopic.php?f=3&t=22868&start=330) but drivers only exist for PiOS, and the hardware version which is presently in circulation would be unsuitable for various reasons to do with interrupt timing and graphics. The next version may be better - watch this space!

The package does, however, have a built in Level 3-ish FS which can be run on its own over IP only with the '-l' option to the bridge utility. Compilation on 64 bit architecture (e.g. a regular Linux PC) presently requires a -DECONET_64BIT adding to the makefile, but on a Pi it works OK.

C
2 x Master 128, 1x BBC B, Viglen floppy drives, 2 x Econets, 3 x Econet-AUN bridges, organist, former purveyor of BBS software...
User avatar
Lion
Posts: 482
Joined: Sat Mar 14, 2009 6:56 pm
Location: Woodside, California
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by Lion »

Just as a sanity check I burned a fresh out of the box RISC OS Pi SD card and booted it. Some differences: The default station number displayed is “255”, not 0. But when you turn on AUN and reboot, it switches back to “0” and AUN turns off. So that’s weird.

I replaced the CMOS with the out-of-the-box version and it went back to 255. So this time I tried SetStation, and *then* turning on AUN, but it still didn’t work. It says 0 again.

I’m now doubting my memory of SetStation ever working, it seems unlikely at this point.
User avatar
Lion
Posts: 482
Joined: Sat Mar 14, 2009 6:56 pm
Location: Woodside, California
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by Lion »

Partial success.

The secret seems to be the AUNMap file, which I was completely ignoring.

My Pi has the IP address 172.16.4.2, so by adding the line:

Code: Select all

AddMap 172.16.4.0 0
It now shows the station number to be “0.2”. If it received the IP 172.16.4.3 it would become station 0.3, and so on.

…except “Enable AUN Econet” is still OFF after every reboot.
cr12925
Posts: 164
Joined: Sat Mar 09, 2019 9:31 pm
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by cr12925 »

Lion wrote:
Thu Sep 23, 2021 8:55 am
Partial success.

The secret seems to be the AUNMap file, which I was completely ignoring.

My Pi has the IP address 172.16.4.2, so by adding the line:

Code: Select all

AddMap 172.16.4.0 0
It now shows the station number to be “0.2”. If it received the IP 172.16.4.3 it would become station 0.3, and so on.

…except “Enable AUN Econet” is still OFF after every reboot.
Ah, but there is some weirdness which I do not profess to understand about network numbers on AUN. What happens if you try to map it to be network 1 instead? If no help there, try network 129.

C.
2 x Master 128, 1x BBC B, Viglen floppy drives, 2 x Econets, 3 x Econet-AUN bridges, organist, former purveyor of BBS software...
User avatar
Lion
Posts: 482
Joined: Sat Mar 14, 2009 6:56 pm
Location: Woodside, California
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by Lion »

Well, I think it’s actually working, even though “Enable AUN” is off after a reboot, the “Net” icon does appear in the icon bar.

I can’t tell if it’s actually sending out any packets though, “*I AM” on the command line just results in “Network station <whatever> not found”, and there’s no output from econet-bridge in debug mode.

I think that’s about as far as I can go.
Last edited by Lion on Fri Sep 24, 2021 2:18 am, edited 1 time in total.
User avatar
sweh
Posts: 2563
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by sweh »

Lion wrote:
Fri Sep 24, 2021 2:04 am
Well, I think it’s actually working, even though “Enable AUN” is off after a reboot, the “Net” icon does appear in the menu bar.

I can’t tell if it’s actually sending out any packets though, “*I AM” on the command line just results in “Network station <whatever> not found”, and there’s no output from econet-bridge in debug mode.

I think that’s about as far as I can go.
On the Pi you can install tcpdump ("sudo apt-get install tcpdump") and then you can do "sudo tcpdump host ip.address" where the ip address is the IP of your RiscOS machine. That will, at least, show traffic flowing from the client to the Pi, and hopefully on the port you configured the server to listen on.

If you don't see that then you know the client isn't sending traffic out.
Rgds
Stephen
User avatar
Lion
Posts: 482
Joined: Sat Mar 14, 2009 6:56 pm
Location: Woodside, California
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by Lion »

Oh that’s a good tip, and hey yes, it is sending out packets!

But not on the right port, and I’m not surprised by this, because econet-bridge says it should be configured with a unique port for each station. I don’t really understand how that can work - how do you tell RISC OS what port to use?
User avatar
sweh
Posts: 2563
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by sweh »

My Pi400 is only wireless, which RiscOS doesn't support. But I believe (viewtopic.php?t=21784 ) that AUN should be on port 32768. So configure your PiFS server to that port...
Rgds
Stephen
User avatar
Lion
Posts: 482
Joined: Sat Mar 14, 2009 6:56 pm
Location: Woodside, California
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by Lion »

Doesn't that imply you can only have a single real AUN client bridged? Since econet-bridge doesn't allow multiple stations to use the same port.
User avatar
sweh
Posts: 2563
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by sweh »

Lion wrote:
Fri Sep 24, 2021 2:49 am
Doesn't that imply you can only have a single real AUN client bridged? Since econet-bridge doesn't allow multiple stations to use the same port.
AUN clients to AUN clients won't talk via the bridge; they'll go direct.

Econet clients talking to AUN clients should be OK 'cos it's the bridge that initates the connection and you configure the bridge with the IP address of the AUN client. e.g

Code: Select all

# We are station 254 and running a file server
F 0 254 32768 /econet
# BeebEm
A 0 141 10.0.0.141 32768
But an AUN client talking to an Econet client? Hmm. Dunno about that. With BeebEm it's easy enough 'cos econet.cfg allows a port.

So my bridge is configured

Code: Select all

# Old Fileserver
W 0 253 32769
And my BeebEm client econet.cfg is configured

Code: Select all

0 253 10.0.0.178 32769
But I don't know how to do this on RiscOS
Rgds
Stephen
User avatar
Lion
Posts: 482
Joined: Sat Mar 14, 2009 6:56 pm
Location: Woodside, California
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by Lion »

I wasn't sure whether I should set the "A" entry for the Pi running RISC OS to port 32768, or the "F" entry for the fileserver, but neither makes any difference, econet-bridge does not respond to RISC OS.
cr12925
Posts: 164
Joined: Sat Mar 09, 2019 9:31 pm
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by cr12925 »

Hi

Hadn’t thought of that issue. The answer is that to talk to RuscOS you shoukd use port 32768 everywhere (on both A and F lines). W are more tricky because you’ll have more than one of them - indeed, at present there isn’t a way to do it to enable RiscOS to talk to lots of wired stations without some clever iptables type config on the bridge.

However, this has been discussed before and isn’t impossible - just haven’t quite done it yet.

What you need to achieve on the bridge in iptables (at the moment with extra lan IP addresses configured on the Pi)
is a two way mapping of

IP Address N (only) port 32768 <~> pi’s “base” IP address port X

… where N is an ip address dedicated to a wired station, and X is the port number for that station in econet.cfg.

The idea is RiscOS thinks all stations use port 32768 and are on different ip addresses, whereas the bridge software wants them on the same ip address but different ports. What’s important is that the outbound traffic from the bridge is subject to the same mapping in reverse so that RiscOs sees traffic from the correct IP address corresponding to the wired station (or emulated server)in question.

This is all because AUN has no econet addressing data in its packets.

At some stage I will add the equivalent of AUNMap to the bridge, but it requires a bit more engineering that might at first be considered necessary.

Best

Chris
2 x Master 128, 1x BBC B, Viglen floppy drives, 2 x Econets, 3 x Econet-AUN bridges, organist, former purveyor of BBS software...
User avatar
sweh
Posts: 2563
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Econet (AUN) on RISC OS for Raspberry Pi

Post by sweh »

Lion wrote:
Fri Sep 24, 2021 4:56 am
I wasn't sure whether I should set the "A" entry for the Pi running RISC OS to port 32768, or the "F" entry for the fileserver, but neither makes any difference, econet-bridge does not respond to RISC OS.
The "A" entry tells the bridge how to find the AUN client. The "F" entry tells the bridge to listen locally and act as a file server. So both would be 32768. Your bridge would have something like

Code: Select all

F 0 254 32768 /filetree
A 0 123 192.168.1.123 32768
Where "123" and "192.168.1.123" are the IP address and station ID of your RiscOS machine.
Rgds
Stephen
Post Reply

Return to “32-bit acorn software: other”