Thursday, 29 January 2015

Raspberry Pi Diary - Refuses To Boot

Getting Nowhere

I've wasted a lot of time over the last 24 hours trying to get my 32Gb SD card formatted correctly. Today I tried loading the raspbian image file (from http://raspberrypi.org/) to the card using the 'dd' command in a terminal window.

It all looks OK yet the Raspberry Pi fails to see the card when you power it on.


A Hint at What Was Wrong

I found a few web pages that stated some SD cards just didn't work, and set about reviewing the http://www.raspberry-pi.co.uk/2012/06/07/compatible-sd-cards/ list to see if mine was supported.

But my card is a cheapo unbranded card from ebay and I wasn't able to see a brand name. Though not really conclusive, I began to suspect that this was the problem.

I gave the card to a work colleague who promised to try it out on his Raspberry Pi tonight.


Lets Try Another

In the mean time I borrowed a Kingston 8Gb card from my son (who's also keen on getting this working), carefully backing up his contents before starting work. We did exactly the same as before:-

  1. Format the SD card using SDFormatter (just a quick format this time).
  2. Copy the contents of the NOOBS folder onto the root of the card.
  3. Clean out the dot files that the Mac OS insists on adding (using CleanDisk).
Then we removed the card from it's adapter, slid it into the Pi's microSD slot and powered it up..... It started booting (whoop!!)


The NOOBS Install Menu
It takes about 20 minutes while it alters the partitions and then installs your selected OS.


Install the OS
I'm amazed how slick the process is after that. It runs fine on my TV, and the sound even works via HDMI. Next step is to get my bluetooth dongle working. :-)

Wednesday, 28 January 2015

Raspberry Pi Diary - There's power but screen is dead

We are Noobs

I ordered a Raspberry Pi B+ from Maplin last week and it arrived the other day. All the other parts had already arrived, and we'd downloaded NOOBS (which we definately are!!) and copied the files onto the micro SD card ready.


Rashberry Pi B+ in it's Pibow Coupé case

Tonight we put everything together, plugged it into our TV, borrowed the USB keyboard from the kid's computer and plugged the Pi into 5v power supply.

We got lights, but the screen remained blank!

Tried it on the monitor in the other room, still nothing.


Why Won't it Work?

The thing we noticed was the green ACT light wasn't flashing, which indicates that the Pi isn't booting. The two main causes of this are:-
  • Power supply has insufficient current.
  • The card isn't readable.

First I switched to my iPad charger unit as a power supply,.. but still nothing! (both LEDs still on solid)

After a little bit of googling it seems that the card isn't readable. If you format the SD card using SDFormatter using a Mac (which I did) then make sure you use the Full Overwrite method. Damn, that's gonna take some time.


Full Format The SD Card
The screen grab shows attempt number two, the first time (after about an hour) I brushed against the card in the reader slot and it crashed the software. Had to fix the format in Disk Utility and start again.

In the mean time I've re-downloaded the NOOBS software for when the card is ready. I'd like to rule out bad files too while I'm at it.

Overall - a disappointing start!

Monday, 19 January 2015

Oracle Apex - Adding Tabular Form Help

Introduction

If you use Oracle APEX I'm sure you like the pop-up help text that you can assign each of your region items. It's part an items configuration, just ensure the UI template "Option with Help" is selected, scroll down to Help Text box and type it in. (Simple)

That's all great, but when I recently found I needed to use a Tabular Form (which is a like an editable report) I went to the column definitions, scrolled to the bottom of the config page, but found it didn't have anywhere to enter help.

Tabular Form Column Help

In the past it's not been a big deal, nobody really asked for it, and you could always add extra stuff to the Page Help,.. but it's not ideal. For this tabular form I needed to be able to explain what the columns were used for because the heading title doesn't do a good job of describing it.

I remembered the method I came up with for Region Help, and figured I'd have a go at adapting this for the column titles. I particular liked this idea because it kept things simple. It uses dummy items to hold the help text which means the help also gets added to the page help without any extra work.

Here's my tabular form:-

My APEX Tabular Form

So lets get right into it using our example above which was on page number 30...

1. Create four Display Only items and ensure you have the 'Optional with Help' UI template selected:
  • P30_MEASURE_HELP with label "Measure Column",
  • P30_WEIGHTING_HELP with label "Weighting Column",
  • P30_CAP_HELP with label "Cap Column",
  • P30_UPLIFT_HELP with label "Uplift Column".
    (NB. the label defines how it will look in the page help)
 
2. For each set the help text (as you would for a normal region item).

3. Run the page and you will see these extra item labels showing on your screen, don't panic, this is only temporary. If you have Firebug installed, right click the label and select Inspect Element.

(Which ever browser you use find a way to see to the link html.)

4. Copy the html to your clipboard and paste it into a text editor. It will look similar to this..

<a class="optional-w-help" tabindex="999" href="javascript:popupFieldHelp('2859011741903715','641282443145')">Uplift Column</a>

5. There are two numbers here that are passed to the popupFieldHelp() function, the first one is the help unique id. The second number is your session id which we need to replace so it always shows the current session number. Delete the second number and enter '&APP_SESSION', then remove the word 'Column' from the link text.

The line should now read...

<a class="optional-w-help" tabindex="999" href="javascript:popupFieldHelp('2859011741903715','&APP_SESSION.')">Uplift</a>

6. Now edit the page, right click the report and select 'Edit Report Attributes'.

The completed changes to the report headings

7. Paste your html into the correct heading, and then repeat for the other three items.

8. Finally re-edit your help items and set them to 'Hidden'.

That's it, you're done. Now when you hover your mouse over the titles the '?' appear. All that remains is to click them all to make sure it works.

Sunday, 4 January 2015

Playstation 3 Super Slim 12Gb FULL

A Christmas Gift

My oldest son decided he needed to have a PlayStation 3 so that he could play online with his friends. He'd originally wanted it as a birthday present (with a TV) for his bedroom, but we figured it was too much - that and the fact we'd never see him again!! Instead we decided to make it a joint Christmas gift for all and locate it in a communal area where it could be plugged into the computer display.


We picked up a Sony PS3 Slim Console with 12GB Hard Drive from Argos for a reasonable price. I did wonder at the time why it only had 12Gb when they're usually 500Gb, but what did I know? - I didn't give it a second thought, just wrapped it up and stuck it under the tree.

Fatally flawed PS3 Slim 12Gb


And on the big day the kids were happy racing cars, jumping from platform to platform and generally shooting anything that moved. We'd selected a variety of games to suit their age range of 6 to 14, and despite the Playstation Network being attacked on Christmas day, they were still able to play without problems. (Boy am I glad we hadn't bought an Xbox One!)



Out of Space

The problem occurred the following day. They'd created three accounts and run a variety of games using them, but it had already gotten to the stage were no new games could be loaded because the disk space was down to a few hundred megabytes. I was surprised just how little time that had taken!!


So my first thought was, "how do I clear some space down?"



My web searches proved to be fruitless, it didn't look like you can do any sort of housekeeping on the disk. So I widened the search to see how others had solved the problem. It became apparent that the only way to solve the problem was to fit a laptop HDD and turn it back into a full-size Playstation. It turns out that there's a disk slot in the side of the console behind a clip-on panel. Using it doesn't invalidate the warranty, or need any tools, but does require the purchase of a special Sony drive caddy!



A Cheap & Dirty Solution


Eventually I found Quentin's Youtube video which explains how to fit a HDD using an old credit card instead of Sony's caddy. (To be quite honest why isn't the caddy included in the box if the console is almost unusable without a disk?)


i

The instructions in the video are simple enough to follow, so I raided an old 300Gb USB disk drive for it's HDD and unplugged the Playstation ready to start.

Always a Catch!

The biggest problem I had was trying to figure out how to remove the disk hatch from the console. It runs the full length of the right of the case, but there are no screws or obvious catches. I couldn't figure out how to open it (the manual didn't say either) so I resorted to carefully unclipping the catches with the plastic credit card that I'd ear-marked for the job.

I can now report that all you need to do it push the cover towards the back of the case by either pressing the side firmly, or inserting your thumbnail into the front corner and pushing back gently.

The disk can then be slotted down into the drive space, although it took me a few attempts to locate it into the sockets. The credit card was then cut into to two and used just like the video suggested. Perfect!

Finishing Off

The final step involves starting up the console, it then detects and formats the disk, and then copies the user data from it's internal 12Gb flash drive. It takes about ten to fifteen minutes and then you're good to go.

Thanks a lot to Quentin for this tip,.. it sure was a life saver.