Monday 21 May 2012

USB GPS

After a long time of searching I have managed to get my USB GPS to work with my setup.

I managed to get the GPS up and running successfully, quite easily, it seems, by downloading the 'PL2303GPS MocLocationProvider' from the Google Play Store.

You can find this app here...
https://play.google.com/store/apps/details?id=de.esolutions4you.mlprovider&feature=search_result#?t=W251bGwsMSwyLDEsImRlLmVzb2x1dGlvbnM0eW91Lm1scHJvdmlkZXIiXQ..&purchaseButton=dhRXscJpVRZkdX1jwyWNk6Ba4hc%3D

This app contained the PL2303 driver that I needed to work with my USB GPS Device. Once I had this installed, I just had to make sure that I had Mock Locations turned on in Settings -> Developer Options and the application just found my GPS Device and it worked.

I have found that the application just loads straight up when Android first starts, so that it can connect to the GPS Device, and then it allows any navigation based application on Android to use your USB GPS.


Note...

I am having an issue at the moment, whereby if I start the computer with the GPS plugged in on boot, I lose the ability to use the touchscreen. But if I start the computer with the GPS unplugged, let Android Load then plug the GPS in, all works fine.

This could be because of the order I have my USB devices attached, I will have to try moving the Touchscreen to the first USB Port and GPS after. I will keep you posted!

Happy Droiding!

Thursday 19 April 2012

Android x86 and External Monitor (VGA)

Again, another issue I faced when getting setup with Android x86 in my car is that my VGA screen would not display Android.

A very simple fix, when you know what you have to do and where to go.

Basically you have to turn off the Internal Laptop display, which will force Android to be shown on the external VGA. You will notice, that the Terminal screen will appear on both screens, but only the GUI will appear on the laptop screen.

To fix this you need to edit you Grub Menu to tell it when booting Android, to turn off the Laptop screen.


  1. First of all, reboot your machine and select to boot Android in Debug.
  2. Let Android start to boot up and you will be given a Terminal entry screen like you have seen before.
  3. Now you need to edit your Grub menu.lst file.
    • For me, this could be because I installed Android on my Windows Partition, this is located in /mnt/grub/menu.lst
    • If you installed Android cleanly, then I think it is located in /boot/grub/menu.lst
    1. Either way, Change Directory to the relevant directory  (Without the quotes) "cd /mnt/grub" (For me)
    2. Then type "vi menu.lst"
    3. This will open the file to edit in the vim text editor.
    4. Use the arrow keys to navigate to the first line of the first boot record, it will probably extend off the screen.
    5. Go all the way to the end of the line and press the  (Without the quotes) "i" key. This will allow you to insert.
    6. Modify the end of the entry to add (Without the quotes) video=LVDS-1:d
    7. Press escape to quit out of insert mode
    8. Type (Without the quotes) ":w!" (Which will write the changes)
    9. Type (Without the quotes) ":q!" (Which will quite the vim editor)
  • Now if you restart the computer, you should see that when it next boots up, Android will appear on your external monitor and not on the Laptop Screen.
  • It maybe worth, making a copy of the First Boot Entry below it before making the change above, and renaming it to Android (VGA), so that it will load by default the VGA setting. But you can override to select the original one and display on the Laptop Screen?


I hope this helps! :)

Android x86 and Touch Screen

Now this caused me no end of trouble! Hundreds of Google Searches, 2 evenings of trial and error, physically breaking my Touchscreen Ribbon Connector and repairing it.

Don't worry though! I have made the mistakes and taken the time, so now, I hope you don't have to! And you certainly do not have to break your touchscreen!

When I connected my Touchscreen via the USB, nothing much seemed to happen. I thought, at first, the driver for the touchscreen was not installed. When I looked more closely, on the lock screen, if I touched the screen I saw the circle generate waves, therefore my touches were being detected by android!

Upon closer inspection, I went to Settings -> Developer Options and enabled Touch Location. This puts a cross hair on the screen where it thinks you are touching.

For me, it was all messed up and took me ages to figure out the fix!

When I clicked the bottom left of the screen, the top right would register.
When I moved up the screen, the cursor would move to the left.
It appeared that the Axis were all messed up, like it had been Orientated by 90 degrees, but also inverted as well.

Here is the fix. (All commands are in the quotes and Linux is case sensative, so please copy exactly.

  1. Press Alt + F1 to go into Terminal mode. (Alt + F7 will switch back to the GUI)
  2. Type in (Without the Quotes) "stop zygote" and press enter (This will stop the Android GUI)
  3. Type in (Without the Quotes) "mkdir /data/system/tslib" and press enter (This should make a directory/folder called tslib inside /data/system
  4. Type in (Without the Quotes) "cd /data/system" and press enter (This will change the current directory to /data/system
  5. Type in (Without the Quotes) "ls" and press enter (This will list all files and folders in the current Directory)
  6. Check to see if your new directory, tslib is listed.
  7. Type in (Without the Quotes) "ts_calibrate" and press enter
  8. This should load up the calibration tool and you should have a X in the top left to press, when you do, you are moved to the top right, then bottom right, then bottom left and finally the centre of the screen.
  9. Type in (Without the Quotes) "cd tslib" and press enter (This should move you into your new tslib directory you made earlier)
  10. Type in (Without the Quotes) "ls" and press enter (You should see a file in there called pointercal, which was created by the calibration tool)
  11. Finally, type in (Without the Quotes) "start zygote" and press enter (This will load up the GUI again along with your new calibration settings)
You should now have a fully working touchscreen!

I hope this helps!

Using the Android On Screen Keyboard (SoftKeyboard)

Ok, so now I had Android up and running on my Netbook! Great, I hear you say! Well, don't get so excited yet!

One of the issues that I came across was that my netbook was going to be closed up and hidden away inaccessible, I would need the On Screen Keyboard to work.

Again, after a lot of Googling I found the answer to this, so I thought I would share it with you.

Android x86 will, by default, disable the netbook physical keyboard, when the lid has been closed, and will show you the On Screen Keyboard!

However, if like me you removed the switch on your netbook that tells the netbook if the lid is open/closed, this doesn't help you! I had to remove my switch a few years ago, because the netbook could not be powered on without the lid being open! (I'll save this for another blog post at some point).

So if you have removed the lid switch, in Android, select an input box, in something like the Browser, Google Play or anywhere you can type text.
Then you should see, down in the bottom right of the screen, in the notification area next to the clock a small keyboard icon. Click this and it will expand a small keyboard menu. At the top of this menu is a switch to turn off the External Keyboard. When you turn this off, and select and input text area from now on, the On Screen Keyboard is shown! You can reverse this is the same manor.

Note:
I have found that even though I disable the External Keyboard as mentioned above, the keyboard does still work, it just seems to tell Android to always load the On Screen Keyboard too.


I hope this helps!

Getting Started with Android x86

Ok, so I was ready to take the plunge with the Android Ice Cream Sandwich x86 Port and as it has been very fiddly and taken a lot of internet searching, I thought that I would share with you, the steps that I went through to get mine up and running. Now, I currently have my system installed on my Windows NTFS partition, so I can switch back to Windows while I am playing around.

Note:
I am by no means a Linux expert, everything I have done took a lot of Google searching to come up with solutions. I may not be able to help you with any specific problems you are receiving.

Ok, so my current Hardware Setup is the following.

  • Samsung NC10 Netbook
    • 2 GB RAM
    • 160GB HDD
    • 1.6GHz Intel Atom
    • 1.3mp Camera
    • Bluetooth
    • WiFi
    • 10/100Mb Ethernet
    • Microphone
    • Speakers
  • USB GPS (I can't remember the Model at this time but it uses the PL2303 Driver)
  • 7" VGA Screen with a 7" USB Touchscreen (In windows, uses the TouchKit driver)
  • Velleman K8055 USB Interface Board
  • ScanTool.Net ElmScan 5 USB OBD-II Reader

  1. I headed over to  http://www.android-x86.org/ to get a copy of the latest version available. I my case, I got a copy of Ice Cream Sandwich. I tried several different versions of the build, but the one that was the most reliable for my hardware was the EEEPC ISO.
  2. I downloaded the ISO, and saved it away to my PC.
  3. I then headed over to get myself a copy of unetbootin from  http://unetbootin.sourceforge.net/ to enable me to copy the ISO image onto a USB device and make it Bootable.
    1. Open UNetbootin.
    2. Select Diskimage.
    3. Make sure ISO is selected from the drop down.
    4. Click the button with "..." to browse and select the saved EEEPC ISO image that I saved earlier.
    5. Make sure the Type is set to USB Drive.
    6. Select the correct Drive for the USB Drive I want.
    7. Click Ok.
  4. Once I had a bootable USB Drive of Android x86, it was time to load it into the Samsung.
  5. I plugged the USB Drive in.
  6. Started the Netbook and pressed F2 to load up the BIOS options.
  7. I then made my way over to the Boot Menu and modified the Boot Sequence/Order, so that my USB drive booted before anything else.
  8. Saved my settings and exited BIOS.
  9. I let the computer boot up and was presented with a menu of Android Options
    1. Run Android x86 without Installing
    2. Debug Mode
    3. VESA Mode
    4. Install Android x86 to the Hard Drive
  10. I chose option one to run Android first, to try it without installing it, so that I could test if it works with the Netbook and to see if I got on well with it. (I strongly suggest this)
  11. Once I was happy, I rebooted and chose the last option to Install Android to the Hard Drive.
  12. I was then asked to select a device (Drive) to install Android to. If you are a Linux noob then what you are presented with is a list of devices.
  13. Then I was asked if I wanted to format the selected drive and if so, which Format? As I was installing this alongside my Windows OS, I chose not to Format the drive. If you are installing this from scratch I suggest Ext3.
  14. The next thing I was asked was do I want to Install the Grub Menu. I selected Yes. This will handle the boot requests and direct the machine to the Operating System.
  15. Because I was installing on my Windows drive, I was told that Windows OS had been detected and did I want to add an option into the Grub menu for Windows. I chose yes. You will not get this question when you install from scratch.
  16. I was then asked if I want to make the system Read and Write for debugging mode, I selected Yes (You may or may not be asked this?)
  17. I let the installation run through, which only took a couple of minutes as the operating system is so lightweight.
  18. I was finally asked if I wanted to setup a User space, and if so how much space should it allocate? I selected the maximum storage space which was 2047MB (2 GB). This took quite a while, a good half an hour I think. This option, I think is only asked if you are installing on your Windows Partition.
  19. When all is ready to go, you are asked to Run Android.
  20. The first time Android is started you are walked through a self explanatory wizard to set the Operating System up.
  21. Android seemed to have already picked up my WiFi adapter and Built In Camera straight away.
  22. I was now able to play around with the OS and download new apps etc.

My Car Pc Project

I am Jon Hoare and I have been working on a Car PC project for the last 7 years, ever since I passed my driving test and had my first car.

The original Car PC, was made up of old desktop components I had lying around the house, housed in a custom made wooden case in the boot of my car. This ran Windows XP Professional and ran a custom Application that I wrote in VB6, that responded to voice commands to play music, as it had no screen.
My application grew larger, integrating Winamp, Google Earth, Videos, and my own Front End, which was displayed on a VGA only display. Obviously, the computer components had to grow alongside the software development, to cope with the new application, and eventually invested in a Touchscreen to interface easily with the computer.

I eventually did away with "Reinventing the wheel", so to speak, and decided to invest in a product called Centrafuse, that a great friend of mine had recommended. This allowed me to use all the core features of the product such as...
  • Satellite Navigation
  • Music
  • Videos
  • OBD-II
  • Internet Browser
  • WiFi
  • Bluetooth Hands Free
On top of these core features, I was also able to write my own "Plugins" using C#.Net to expand the software further. I built a plugin that did the following ...
  • Had 3 Modes (Based on Knight Rider) ... Normal, Auto, Pursuit
  • K8055 USB Interface board with the following devices attached
    • Green LED strip (Passenger and Driver Footwell) - Normal Mode
    • Yellow LED strip (Passenger and Driver Footwell) - Auto Mode
    • Red LED strip (Passenger and Driver Footwell) - Pursuit Mode
    • Used to originally turn on a RADAR based Speed Camera detector (This was replaced by my GPS module in my program)
    • Front Red LED Scanner Effect (Based on Knight Rider), Just for giggles! This had no real use, or would be used on the road as this is illegal in the UK and in many other countries.
  • Auto Music Volume ATT based on the vehicle speed being less than 15MPH or if I was within a set proximity of a known place, such as a friends house.
  • GPS Speed Camera Detection module. When enabled, would warn me by Voice that there was a camera nearby, the camera type (Fixed or Mobile) and based on the Speed Limit and the Vehicle Speed, would flash the Footwell LED Strips accordingly.
    • Overspeed - Flash Red and Yellow
    • Underspeed - Flash Green
    • Unknown Speed Limit - Flash Yellow
  • GPS Proximity warning of Points Of Interest (Friends houses etc)
  • Traffic alerter to read the RSS Feed from the Highways Agency to alert me of any known traffic on the current road.
I upgraded the hardware in the car from desktop components in the boot to a Samsung NC10 Netbook. More than capable of running everything.

I then upgraded the Operating System from Windows XP to Windows 7, and also upgraded Centrafuse through from Centrafuse 2.0 through to Centrafuse 3.5.

Now for the juicy bit.
I had recently read that a port of Android Ice Cream Sandwich had been made for x86 machines. Now, this to me sounded really very cool! Even though I have an iPhone and there is a lot of banter amongst my friends between iOS and Android devices, I have always admired Android and thought this would be the ultimate ideal Operating System to run in the car. Android is an extremely lightweight operating system and oriented towards touch like devices. So it's time to give this bad boy a go!