Sunday, 4 December 2011

Ubuntu Linux on a Packard Bell OneTwo - Update

The Packard Bell OneTwo touch screen computer has not been used for quite a while, so I decided to start using it rather than my daughter's PC, because it uses a lot less power and is quieter.

The main issues from when I tried it before were:

  • Screen flicker every now and then
  • Touch screen calibration issues.
We installed Ubuntu 11.10 on it as a clean install.  Went pretty well.  The issues were:
  1. Used a normal screen shape rather than wide screen.   Solved this by going to the settings / display menu and changing to a 16:10 aspect ratio screen resolution.
  2. Touch Screen Calibration:  This took a while to solve because when you pressed the screen the mouse pointer appeared at a different position.  Eventually I traced it to the display settings that I had altered - Although there is only one monitor on the computer, the software detects two displays (there must be tv-out hardware in the box, but no connector outside).  I had un-clicked the 'mirror displays' option and this had resulted in the two screens being shown side by side.  I didn't think anything of it as there is no monitor connected to the second, but it confused the touch screen calibration - switching the un-used display to 'off' solved it and the touch screen calibration is fine now.
  3. Multi-Touch:  The touch screen works just like a mouse.  I think it should be able to cope with multiple touches so you can do 'pinch' gestures etc. to re-size windows.  This is not working.   I tried using the mtview utility as described in the Ubuntu wiki, and it seems like multi touch is working - you can draw with two fingers at the same time, but the window manager does not seem to be using them.
Therefore, Ubuntu 11.10 worked much better 'out of the box' than the previous version I had tried - the main missing thing is multi-touch support for the touch screen.  This is an important one to fix for me because our son is VERY short sighted, and looks very closely at the screen, often pressing his forehead against it.  Once he has done that, the touch screen does not work because it only detects one press at a time!   I am going to have to learn how x windows input devices work to debug this I think.....

Ubuntu Linux on a Packard Bell OneTwo - Update

The Packard Bell OneTwo touch screen computer has not been used for quite a while, so I decided to start using it rather than my daughter's PC, because it uses a lot less power and is quieter.

The main issues from when I tried it before were:

  • Screen flicker every now and then
  • Touch screen calibration issues.
We installed Ubuntu 11.10 on it as a clean install.  Went pretty well.  The issues were:
  1. Used a normal screen shape rather than wide screen.   Solved this by going to the settings / display menu and changing to a 16:10 aspect ratio screen resolution.
  2. Touch Screen Calibration:  This took a while to solve because when you pressed the screen the mouse pointer appeared at a different position.  Eventually I traced it to the display settings that I had altered - Although there is only one monitor on the computer, the software detects two displays (there must be tv-out hardware in the box, but no connector outside).  I had un-clicked the 'mirror displays' option and this had resulted in the two screens being shown side by side.  I didn't think anything of it as there is no monitor connected to the second, but it confused the touch screen calibration - switching the un-used display to 'off' solved it and the touch screen calibration is fine now.
  3. Multi-Touch:  The touch screen works just like a mouse.  I think it should be able to cope with multiple touches so you can do 'pinch' gestures etc. to re-size windows.  This is not working.   I tried using the mtview utility as described in the Ubuntu wiki, and it seems like multi touch is working - you can draw with two fingers at the same time, but the window manager does not seem to be using them.
Therefore, Ubuntu 11.10 worked much better 'out of the box' than the previous version I had tried - the main missing thing is multi-touch support for the touch screen.  This is an important one to fix for me because our son is VERY short sighted, and looks very closely at the screen, often pressing his forehead against it.  Once he has done that, the touch screen does not work because it only detects one press at a time!   I am going to have to learn how x windows input devices work to debug this I think.....

Wednesday, 16 November 2011

Breaking out of a Frozen SSH Terminal Session

For a long time I have found that if the internet connection is broken during a ssh terminal session that the terminal hangs and the keyboard is un-responsive - CTRL-C, CTRL-D etc. do not do anything.  I have always just cursed and closed the terminal window.

I just found that ~. will break out of the frozen session, giving you access back to the terminal.   ~? gives a list of other escape commands, but I am not sure what I would use those for.

Tuesday, 8 November 2011

Using Android Phone as a Modem

For quite a while I had been able to use my Samsung Galaxy Apollo phone as a modem - I just plugged it into my work laptop (running Windows XP) and it appeared as a modem, which I could use to connect to the internet nicely.

Then I tried (and failed) to update my phone using Samsung Kies and it stopped working.   I remembered as part of trying to get Kies to work I found an obscure code to type on the keypad to switch the phone between 'PDA' mode and 'Modem' mode.   I have just managed to switch it back to modem mode, and this has got my modem working again!

To do this I had to type *#7284# on the phone dialer keypad.  This brought up a menu where I selected the USB option to be 'Modem'

Now plugging it into my computer shows it up as a Samsung Mobile Modem.   I have the phone number set to *99***1#, which seems to work ok.  

I disabled the internal modem in the laptop because sometimes windows tried to dial that one instead, which is not connected to anything.

Sunday, 6 November 2011

Samsung Colour Laser Printer and Ubuntu Linux

Note:  You might find a more recent post more useful.

I have got sufficiently sick of my Epson inkjet printer suffering from clogged print heads, and noticed how cheap colour laser printers have become, so decided to give one a try.

I settled for a Samsung CLP-325W (w=wireless) colour laser printer.   The reason for this is that Samsung provide linux drivers for it, and I had an old Samsung laser printer a few years ago that worked nicely with linux.

To start with, the CD that came with the printer would not mount on my daughter's Ubuntu 11.04 machine - no idea why, so we downloaded the Samsung unified driver for linux from the Samsung UK support web site.

We installed the driver by running install.sh as root, plugged in the printer and it detected ok and seems to work.  We had to select the "Samsung CLP-300 Series (SPL-C)" driver, because the recommended "CLP-325 foomatic...." one only printed black and white.

So far, so good!

The fun came when I tried to set up wireless printing so I could print to it from my laptop without my daughter's computer being switched on.   The first attempt was to repeat what I had done for the other computer, and install the Samsung unified driver on my laptop.  Unfortunately it refused to detect the printer, even when it was plugged into the USB port on the laptop.   I never found out why and tried a different approach.

I plugged the printer into my ethernet network and re-started it.  I found out that to print the diagnostics you hold the 'cancel' button (with the triangle symbol on it) for a few seconds.  This printed  out a network diagnostic page that said the network type was 'dhcp' and the ip address was 192.0.0.192.   This is odd because my router, which would act as dhcp server should give out addresses 192.168.1.*, so I assumed that it was lying about using dhcp and had a static default address.
Re-configured laptop to use the 192.0.0.* subnet and tried looking for the printer - tried a web browser, ping and nmap, and no sign of it.

Had a look at my router's dhcp list, and realised that the printer had been assigned an ip address by the router, which was not the one on the network diagnostics!!!!!
Re-printed the network diagnostics and got the correct ip address - don't know what happened there.

Pointed a web browser at the printer's IP address and got a nice status web page, with a 'login' option at the top right hand corner of the screen (once I had scrolled across because I couldn't see it on my laptop screen for some reason....).   Had to search on the internet for the default login credentials - found out that it is user name -  "admin", password - "sec00000".

Once logged in, I could set up the network to use a static IP address (so I always know where it is, and connect it to my wireless network).

Disconnected the lan cable from the printer, and sure enough, I can see the printer from my laptop.  Used the Samsung printer configuration tool to set it up as a network printer on the laptop and....it works!!!

phew!

Tuesday, 11 October 2011

CodeIgniter / Bonfire

I have been progressing an automated way of generating maps from openstreetmap data, allowing layers to be selected, including contours and hill shading etc. (https://github.com/jones139/disrend).

I want a web front end to allow people to generate maps using this renderer.   When I did this for my townguide program I just built a very simple php based web interface.
Ideally I would like things like user authentication though, which would mean writing a lot of code to go with it.
The CodeIgniter framework goes some way to this by providing an interface to sessions etc, but there is still quite a bit of boilerplate code to write to produce the database interface.
The CodeIgniter / Bonfire application seems to solve this by providing:

  1. Roles based authentication.
  2. Modular structure (this was an issue I had with codeigniter - you ended up with code scattered in different places).
  3. A really neat module builder function that produces a basic module with database interface for you to build on.
I am just trying to get the hang of using bonfire now - I have had a few issues with installing modules based on the module builder code - will write up how to do this once I have it working...

Friday, 22 July 2011

Building Debian Packages

I worked out how to make simple debian packages by hand as described in a previous post.
Trying to build other software into packages is still rather difficult...
I found a really good, simple tutorial on how to use the debian tools to do this more easily at:
http://www.debian.org/doc/packaging-manuals/packaging-tutorial/packaging-tutorial.pdf.