Tag Archives: Android

Ryanteck Raspberry Pi Serial Debug Clip review

When building projects on the Raspberry Pi that run ‘headless’ I’ve often found it necessary to connect to the Pi to see what’s going on, work out why it’s not working as I expected or to simply shut it down neatly without yanking out the power cable.

There are a few ways to do this – you could carry around a keyboard and monitor, hook them up to the Pi and see what’s what. The extremely useful and sadly getting rarer and more expensive Motorola Lapdock which I reviewed a while back works very well as a portable monitor / keyboard combination.

Or you could connect to the Pi using SSH if you’re both connected to the same network.

The third option is to connect to the Pi using a USB to Serial port converter. These are usually available as USB to TTL Serial Cable with a USB plug on one end and a series of female jumper wires on the other. Adafruit have a good guide on how to use one of these. Ryanteck have recently released a Raspberry Pi USB debug chip which works in the same way as the USB serial cables, but which is easier to connect to the Pi and includes friendly green and red LEDs to indicate data being sent back and forth. I recently backed this on Kickstarter so was able to get one to play with.

For this option you do need to carry round a computer, but as I discovered it works well with my tiny Toshiba Encore windows 8 tablet – and even with an Android mobile phone!

Raspberry Pi USB Serial debug chip
Lego spaceman has removed the important little jumper on the bottom left of the clip

Assembling the chip is very straightforward with the instructions on the Ryanteck website – although it’s worth mentioning that the version of the PCB supplied varies slightly from the images in the guide. The final version of the PCB includes a little jumper clip – this is quite important – with the jumper in place the Debug Clip will power the Raspberry Pi. It’s vital that the Pi is powered from either the clip or it’s micro USB port – the serial link will not work if the Pi is powered from both.

The RPi debug clip lacks any headers or sockets – it’s designed to sit on the Raspberry Pi GPIO pins underneath a hat or add-on board. In practice I found it a tight fit on the Raspberry Pi pins and a loose fit on a spare extension header I had lying around so I’ve used a 40 pin extra tall header – with this it’s possible to use the Rpi Clip with the Pimoroni Coupé style cases and have room to fit additional hats on top:

Debug clip sat on a 40 pin tall header, sat on a Pimoroni Coupé case
Debug clip sat on a 40 pin tall header, sat on a Pimoroni Coupé case

Despite having just one micro usb port it’s possible to use the debug clip on the Toshiba with a Micro USB Host OTG Cable – as there are a lot of very cheap Windows based tablets now available I imagine they all work in the same way.

To get the RPi clip working with the Toshiba Encore I installed the driver from the Microchip website, and then looked up the COM port the USB Serial port was using with the Computer Management window (right click on the Windows 8 start icon). In my case it was COM3. I opened up the Windows Telnet App PuTTY, chose a serial connection on COM3 at 115200 baud, hit enter and voila! – the Raspberry Pi login prompt appeared.

RPi debug clip
I do normally use this with a little keyboard, but it’s still very little.

It’s also possible to use the same cable with an Android mobile phone. I tested it with my bog standard Nexus 5 (which hasn’t been rooted) and a free app called DroidTerm – to connect hook up the Pi with the OTG to USB cable, make sure the header on the RPi debug clip is removed and use the following settings:

Droidterm screenshot
Basic connection options

When you first connect the screen will be blank – just enter the username you normally log in on your pi with (I think everyone uses ‘Pi’) and it will prompt you for your password. It’s a basic app – there’s no cut and paste, but for checking on things it’s fine.

Droid term /cat/proc/cpuinfo
Here’s some Pi info on a mobile!

The Ryanteck Raspberry Pi debug clip is available here for about 7 quid.

 

How to play the original 8-bit Elite on a Raspberry Pi

Ok, so after my last post about running the Archimedes 32-bit version of Elite on RISC OS on the Raspberry Pi I got a few comments about running the earlier (and more authentic) 8 bit version on modern hardware. So I thought I’d have a bit of a play and try out a few options for running the original version.

Probably the easiest way to get a taste is to run the NES version on an emulator – Elite co-creator Ian Bell describes this as “the best way to re-experience the feel of 8 bit Elite“.

There are NES emulators available for almost any platform – here it is running on my Android 4 MK802 lapdock using iNES. You can download the ROM freely (and legally) from Ian Bell’s website.

Elite running on the iNES emulator on an Android 4 MINI PC
Cobra mk III

If you find the display corrupts you need to make sure it’s set to PAL and not NTSC or ‘auto’ . iNES has a nice function where you can remap keys to the various buttons, which is handy when using an external USB keyboard with the MK802.

It works well- although Elite’s many keys are replicated through combination key presses which takes a bit of getting used to. You can fly, shoot, get shot at, and crash at docking.

As I mentioned in my previous post – it’s rather fun to play Elite on the Raspberry Pi computer – the original BBC B’s spiritual successor, which also shares a creator with Elite.

The Raspberry Pi also has (various) NES emulators available for it – although I’ve yet to find one that can run Elite smoothly and without any issues (consider this a work in progress). However you can emulate the machine where it all started back in 1984:

How to emulate the BBC Micro  (model B) on a Raspberry Pi (model B)

Bridge of the Cobra Mk III image from the Elite user manual
Bridge of the Cobra Mk III – uncanny how the console of a 31st century starship looks a bit like a 1981 microcomputer…

It is possible to run the original BBC B version of Elite using the !BeebIt emulator – this is an emulator that runs in RISC OS.

Compared to the linux and android based emulators available this runs much more quickly since RISC OS is a very lightweight operating system.

To relive the original Elite – I’ve prepared a step by step guide – make sure you do all this on a Raspberry Pi running RISC OS – particularly unpacking the zip files.

First create an SD card running RISC OS or just download the NOOBs installer.

RISC OS uses a 3 button mouse – you’ll need one to access menus using the middle button – applications have a ! at the beginning of their name, and shift-click opens the application folder. There’s more RISC OS info available here.

Note that it also helps to have a standard, full size keyboard.

Then download !BeebIT – of the two versions available I’ve been using Michael Foot’s.

Extract the archive on your Raspberry Pi by dragging and dropping the download file, and then double clicking and dragging the !Beebit application file to a new folder. (Note that RISC OS is very drag and drop orientated).

Next you’ll need some BBC ROMs – the ROMs download on Michael Foot’s page contain both the OS2 and DFS ROMs you’ll need:

Download

Open up this archive as before – this will contain a !Beebit application icon – just drag and drop this over the !Beebit application you extracted earlier. (Application files on RISC OS are folders containing the program and needed files – by dragging and dropping the ROM file you are just adding the files you need)

Double click !BeebIT to run – it should appear on your icon bar. If you get any errors for missing ROMS, check the steps above or try downloading them individually. f12 will exit the emulator back to the RISC OS desktop.

Download BBC Micro Elite extract and set the type to DFSImage (the icon should change to a floppy disc) – to do this click the middle (menu) button on the file > File ELITEBBC/SDD > Set type and change “Data” to “DFSImage”.

Double click on the image file to run.

Once in !BeebIT type *!BOOT (on my keyboard the @ was *)

then enjoy!

The classic loading screen
The classic loading screen

Have a go at playing with the settings – you can choose a high quality display mode, or set CPU speed to Full Speed. If you’re feeling a bit more adventurous !BeebIt also emulates the Master 128 which ran a full colour version of Elite which is similar to the NES version – you’ll need to download the correct ROMs but all the info is included in the !BeebIt help file (middle click on the !Beebit application App.> ‘!Beebit’ >Help)

Commander Jameson
Commander Jameson

The easiest way to save your progress is to hit f12 to return to the desktop and then the middle button on the !Beebit emulator icon to then choose Save >Save as snapshot. Dragging the snapshot file back to the !Beebit icon will reload your game in the same state you left it. Note for some reason double-clicking on the snapshot icon to load it won’t work.

If you’re interested in Elite you can read a bit more about the 32-bit version of the game in my previous post – or check out the Elite Dangerous Kickstarter which is collecting pledges for a 21st Century version.