RISC for Dogs

 
Figure 1: I hope my dog likes Risc OS as much as I do!

Some time ago I tried RISCOS to see if it could be useful for me.  I liked it, and in fact it was the only operating system I used on my Pi for the first few weeks after I purchased my initial Raspberry Pi.  Subsequently, I got involved with other operating systems on the Pi, and RISC was put on the back burner.  Recently, I decided to see how much had improved in the time that had elapsed (about a year).

I’m happy to report that some of the things I couldn’t do (easily) a year ago, I can now do very easily.  What’s that?  I wanted RISCOS to allow for the use of my GPS dongle, in order to obtain my coordinates, for mapping activities.   In the time since my last look at the system, not only has it become possible to use the GPS, but it’s now possible to use a special implementation for OpenStreetMaps (not really OSM, but very similar – called RISCOSM) to view the world with the little “you” GPS dot on it.

A year ago, there was a module for RISCOS called piSerial.   It worked well on the early Pi versions, but (apparently) not on the Pi2 or Pi3.  Now, there’s a new serial module (RM module in RISC parlance, and device driver or loadable kernel module in other operating system’s parlance) available for the OS.  In RISCOS, there are ROM based modules, and file based modules.  Relocatable modules (RM) take care of most of the functionality of the OS, and are relocatable to any place in a reserved area of RAM. File based modules may be loaded from files (Al’a Linux modprobe or BSD kldload) with the commands RMLoad or RMInsert.  “ROM” modules are always included in the OS, and are at a fixed offset in the image (I think).  This is a historical result of the early RISCOS systems that used ROM (read only memory), and executed the modules “in place” in the ROM, to save the RAM memory.

Modules can be replaced on-the-fly.  So, simply RMLoading a module with the same name replaces the one that’s loaded (I think).  RISCOS is pretty new for me, so I’m still learning a lot about it.

I obtained the SerialUSB module, and an accompanying terminal program that utilizes the module, from:

Another (diagnostic) program for listing USB device details is available from the same link.  There are different flavors of RISCOS, by the way.  The one I’m using is an shared source version distributed by Castle Technology.  An attendant web site, for the shared source version of the OS is at:

Once I had obtained the module and program, I copied it into a “public.experimental” directory on my machine (which is a Pi2).  I then needed to load the module:

REM Note that on RISCOS, the meaning of dots and slashes is reversed. So, the following
REM line changed the directory to the place I'd downloaded the module and the program.
REM Note: the '*' indicates a command:

*dir SDFS::RISCOSpi.$.Public.experimental-apps.working-experimental-dirs

REM *cat list the directory contents
*cat

REM Seeing that SerialUSB was in the directory, I loaded the module:
*RMLoad SerialUSB

REM I ran this command to list loaded modules:
*Modules

REM Seeing that the module was in the "loaded" list, I listed the devices:
*cat devices:

REM In figure 2 (below) the output of *cat devices: is run twice. It is
REM run once before my GPS has been plugged in, and again after it was 
REM plugged in. The "after" output shows the USB serial device.

Figure 2: The GPS output (raw) is displayed in the terminal window. (click to enlarge)

In the screenshot snippet in figure 2, the task window shown in the lower left corner contains the result of two *cat devices: issuances.  Once before the GPS was plugged into the Pi, and again after it was inserted.  The USBSerial device shows up in the after instance.  The task window in the lower right shows the result of a *Modules command (and indicates the SerialUSB module is listed as loaded).

In the upper task window, the terminal program is running, and displaying NMEA sentences (“raw” GPS lingo).  I started it by clicking the icon for the !SerialTerminal program that was included in the zip file. Now, it only remains to plug that output into a program to parse and display it properly.   Or, it could be run into the aforementioned RISCOSM program, to display the coordinates on a map.  The RISCOSM program is a commercial program available at:

I had to do one other thing to get the GPS dongle to work with RISCOS.  The terminal program that is supplied, is supplied as a directory with a pling (!) in front of it:

  • !SerialTerminal

On RISCOS, an “application” is a directory name prefixed with the pling, as mentioned.  In the directory is the binary app or interpreted program, but also a !Run file, which is a text file that can specify certain startup preconditions, and execute them.  In the case of the terminal program, the !Run file contained a line that specified a 115200 baud rate for the connection.  This I had to change to 4800 baud to work with my BU353 puck GPS.  By the way, the BU353 uses the Prolific chipset, and that is critical for use of the module.  I think it can accommodate a couple others, but it pays to check.

Another thing is important to add.  The Raspberry distribution for RISCOS has had a couple (or maybe a few) upgrade cycles.  The one that works with the serial devices on a Pi2 or Pi3 is the RC15 uSD image (as opposed to the RC14 uSD image).  The date on the newer one (that I’m using) is 04/20/2017:

https://www.riscosopen.org/content/downloads/raspberry-pi

Read More

Note:  Likely the screenshot could be considered derivative, so I include the shared source license (for RISCOS):

This source code in this file is licensed to you by Castle Technology Limited (“Castle”) and its licensors on contractual terms and conditions (“license”) which entitle you freely to modifiy and/or distribute this source code subject to you compliance with the terms of the license. This source has been made available to you without any warranty whatsoever. Consequently, your use, modification and distribution is entirely at your own risk, and neither Castle, it licensors, nor any other person who has contributed to this source code shall be liable to you for any loss or damage which you may suffer as a result of your use, modification, or disttribution of this source code. Full details on your rights and obligations are set out in the license. You should have received a copy of the license with this source code file. If you have not received a copy, the text of this license is available online at:

http://www.castle-technology.co.uk/riscosbaselicense.htm or https://www.riscosopen.org/tarballs/Licence_v1_1.pdf

Note: This author and site is not affiliated with the Raspberry Pi in any way. For information about those projects visit  http://www.raspberrypi.org “Raspberry Pi” is a trademark of the Raspberry Pi Foundation.

 

Advertisements