Thursday, 1 December 2011

Android native SIP / VOIP client

If you have an Android and it runs 2.3.x then you have a native SIP / VOIP client. To set it up, in this case I'm using Pennytel, an Australian VOIP provider, start by going to settings -> call settings.

The following screenshots are from my Nexus 1, its the same on my Nexus S.


Press 'accounts'


and the 'Add account'


and then add your credentials


name and password will be your VOIP name and password, not your account password. The server is 'sip.pennytel.com'.


Press the back button and the account is saved.


When this is done select your calling options byt pressing 'Use Internet Calling' and select

    For all calls
    Only for Internet calls

    Ask for each call.

When you want to place a call you get the option you asked for.



Saturday, 26 November 2011

Getting started with Chrome OS Device Policy

One of the nice things about getting a Chrome OS device as part of ChromeBooks for Business is the policy control options.

After the device is enrolled in the domain, you have two device policies:

- allow / disallow guest
- restrict logins to specified accounts.

The latter takes wildcards so you specify *@domain.com so only members of your domain can log on.



To get device policies you need to enroll the device.

  1. Start the Chromebook.
    Power up your Chromebook by pressing the power button on the top-right corner of the keyboard.
  2. Select your language.
    On the "Let's get started" screen that appears, select the interface language to use by default. If prompted, select a keyboard input method too.
  3. Connect to a network.
    Select a Wi-Fi network from the network menu.
  4. Accept the terms of service.
    The Chromebook downloads any available system updates.
  5. Before signing in to the Chromebook, press the key combination Ctrl-Alt-E.
    The enrollment screen appears.
     
  6. Enter the user name and password you received in your welcome letter from Google, or the user name and password for your existing Google Apps account if you have one.
  7. Click Enroll device.
    The Chromebook is now enrolled and will follow the organizational policies you define.

If the device has already been setup either for another domain, or already has users configured, then you need to wipe the device and start again. For the Samsung Series 5:

  1. Turn off the Chromebook.
  2. Locate the black cover with a SIM card icon, on the right side of the device next to the USB port.
  3. Open the black cover and gently move the switch underneath it to the right (toward the USB port) using a paper clip or a pen tip.
    Moving the switch to this position puts the Chromebook into Developer mode.
  4. Start the Chromebook.
    The screen displays a sad face icon rather starting up immediately.
  5. Press Ctrl-D to begin the wiping process.
    If you don't press Ctrl-D, the process starts automatically after 20 seconds. The Chromebook begins returning to its initial internal state. The process takes about 5 minutes.
     Do not turn off the Chromebook during the wiping process.
    The sad face icon appears again when the process is complete.
  6. Press Ctrl-D again, or wait for 20 seconds.
    The initial sign on screen appears.
  7. Turn off the Chromebook.
  8. Return the switch from step 3 to its original position (away from the USB port, which is normal mode) and close the black cover.
  9. Start the Chromebook.
  10. Enroll the Chromebook before signing in to it.

There are a heap loads of user settings, of which the most interesting is likely the ability to control extensions.
PolicyDescription
Extension IDs to allowBy default, the user can install any extension that does not appear in the list of Extension IDs to block. You only need to list an extension to this text box if the extension has an Extension ID that falls within the Extension IDs to block but you want to allow it.For example, if the Extension IDs to block is set to the wildcard *, all extensions are blocked except for the specific ones listed in the Extension IDs to allow text box.
Extension IDs to blockSpecifies extensions that users are not allowed to install. Identify the extension by its Extension ID, with extensions separated by commas. The user can run any extension that does not appear in the list of Extension IDs to block.A value of * means all extensions are blocked unless they are explicitly listed in theExtension IDs to allow text box.
Extension to preinstallSpecifies extensions to install automatically. Users cannot uninstall these extensions.You must supply both the Extension ID and the URL where the extension is posted, separated by a semi-colon. For gallery extensions, the URL ishttps://clients2.google.com/service/update2/crx. For example, to install the Gmail Checker Extension, enter this string in the Extension to preinstall text box:
mihcahmgecmbnbcchbopgniflfhgnkff;https://clients2.google.com/service/update2/crx 
You can't preinstall any extension whose ID appears among the Extension IDs to block.

I wasn't able to find an easy way to get the ExtensionID and URL. Still working on that.

Thursday, 24 November 2011

Moving email from one Google Apps account to another

As part of my digital clean up, I needed to move email from an account on one domain, to an account on another domain.

Google Apps used to have a good tool for this, it ran from the cpanel over IMAP, and was in essence a server-server tool, but this got deprecated. Now, you need to download the email locally from the source account / domain, and then upload to the destination account / domain.

On a Mac there are two ways how to do this: use MailFetcher and the Google Email Uploader.

The Email Uploader is very nice. It links to your Apple Mail or Thunderbird on your local machine, shows folders, and you can selective which folder to upload. You can also give the transferred folder a name so you can see it.


To get the email onto your local machine you need to use these instructions. You would need the domain admin to turn on IMAP first of course.


You may find that nor all messages can be moved across. The uploader won't move corrupt messages, messages that are not RFC 822 compliant, or messages with disallowed attachments eg .exe.

If the message is not RFC 822 compliant then you'll see "Invalid RFC 822 Message" in the window.

    Message did not upload
       The operation couldn’t be completed. (Invalid RFC 822 Message: Date header "Sun, Dec 23 2001 13:26:12 +0000" is invalid.)
       /Users/user/Library/Mail/IMAP-user@domain.co.uk@imap.gmail.com/Email Saved.imapmbox/Messages/143660.emlx
      

I found that Mail did not see these messages either, so I couldn't use drag and drop, but since they are plain text you can view them using QuickLook in the finder, and decide if you really need them.



Also, if a folder / label has over 500 messages in it, you'll find progress quite slow after the 500. It gets to 500 really fast, maybe only a few minutes, depending on attachments. Thereafter you are limited to one message per second, so a folder with, say, 4000 message will take about an hour to upload. You might consider splitting a large folder up. You also likely parallelise things up, by running the uploader more than once, but I didn't try that. I know you can multiple GAMME uploads concurrently, to get around the ingestion limit.

Monday, 21 November 2011

Synology access to satashare over AFP

I use a Synology NAS with an eSATA HD for backup, and various Synology backup jobs to make sure my data is backed up.

And I wanted to check that the data is being backed up. But for some reason over AFP I couldn't see it. I could see it over SMB, and the Shared Folder control panel in DSM showed it as shared.

After some investigation I found that the user account must be enabled to see satashare over AFP.


Go into the 'user' control pane, select the user you want to have access to satashare and make sure the read/write box is ticked.

They should then be able to see satashare after connecting, either through the left hand side window onf the finder, or apple-k to connect.

Friday, 18 November 2011

Changing the email address of your Apple ID

As part of my clean up of my digital life, I decided to retire an email address, and my Apple ID was on that address so I needed to change it.

There's no doubt that changing the email address associated with things like your Apple ID can be scary. What if it goes wrong? Most folks have a lot of $$ / ££ / €€ invested in the iOS ecosystem.

BTW this doesn't solve the multiple Apple account problem. One day maybe Apple will solve this.

Here's the process (information gathered from Apple's help system, and personal experience).

  1. sign out of your iOS devices:

    settings > store


  2. sign out of itunes

    itunes > store > sign out


  3. goto appleid.apple.com and follow instructions from support.apple.com/kb/HE40

  4. login by selecting 'manage your account'. Use using existing (old) email address / password
     
  5. in the section for "Primary Email Address", click edit

    put in new email address, click save, and it'll generate a verification email
  6. If you try to run the verification too soon, you'll get an error saying something scary like the address is already in use.

    so, give it a few minutes, and re-login to iOS and iTunes, the try the verification again

Wednesday, 9 November 2011

OSX: Launching aplications as root

While looking for a solution to how to launch TrueCrypt as a root, when logged in as a plain user, I got the hang of a terminal command.

I thought I could also do it with an AppleScript. Turned out to be harder than I thought, but then I've never used ApleScript before.

First I got a copy of Pseudo, which was harder than I thought sice the author has disappeared. Eventually I found a copy here. NB these instructions WILL NOT work for Lion since Pseudo requires Rosetta, and Apple have done away with Rosetta.

  1. Launch Pseudo and create a new launch document


  2. Drag the TrueCrypt application icon onto that little window, and go to then Save
  3. Create an AppleScript:

    tell application "Pseudo"
        open file "Mac:Users:user:documents:TC_Root.pseudo"
    end tell

    Fix the command to reflect the location of the .pseudo document.

    Save this an an application, put on the dock, and when you run the script it'll launch TrueCrypt for you, with a pop up for credentials.

Monday, 7 November 2011

OSX QuickLook plugins

One moment my Mac can QL my camera raw files (NEF and CRW) and the next it cannot, just producing a grey area on the screen. Did a whole lot of googling to see whats going on. Didn't find anything other than suggestion to re-install the current update (10.6.8). A restart seemed a less time consuming option first, which happily fixed the problem.

While digging, I found that 3rd parties can write their own QL plugins, and there's even a site for them, www.quicklookplugins.com

Some plugins struck me as immediately useful such as:

whomwah.github.com/qlstephen to read the suffix-less README, INSTALL and CHANGELOG files you get with downloaded source code and some apps.


Here is it being used to QL the install instructions of itself. Your recursion dollars at work :-)

www.kainjow.com/?p=77 to QL AppleScripts

If you use InDesign, InCopy, ASE, PostScript, EPS, Illustrator & Quark then www.metadesignsolutions.com/products/mac-osx-quicklook-adoview.php will be useful, and the increase in productivity surely worth the $9.99

Photoshop brush viewer.


For more free ones take a look here.

When you've installed the QL plugin, you may need to force a refresh of the QL databse.

In terminal you can run some QL related commands:

    $ qlmanage -r

refreshes the QL databse

    $ qlmanage -p file.crw 

generates a preview. Handy to see if QL has the right plugin.

    $ qlmanage -h 

gives all its options

Usage: qlmanage [OPTIONS] path...
    -h        Display this help
    -r        Force reloading Generators list
    -r cache    Reset thumbnail disk cache
    -m [name ...]    Display statistics about quicklookd. Stats names:
            * plugins    Show the generators list
            * server    Show quicklookd life information
            * memory    Show quicklookd memory consumption
            * burst        Show statistics about the last burst
            * threads    Show concurrent accesses stats
            * other        Show other information about quicklookd
    -d debugLevel    Integer between 1-4
    -p        Compute previews of the documents
    -t        Compute thumbnails of the documents
    -x        Use quicklookd (remote computation)
    -i        Compute thumbnail in icon mode
    -s size        Size for the thumbnail
    -f factor    Scale factor for the thumbnail
    -z        Display generation performance info (don't display thumbnails)
    -o dir        Output result in dir (don't display thumbnails or previews)
    -c contentType    Force the content type used for the documents
    -g generator    Force the generator to use

or you can do

    $man qlmanage

NAME
     qlmanage -- Quick Look Server debug and management tool

SYNOPSIS
     qlmanage -r

     qlmanage -m [name ...]

     qlmanage -t [-d debugLevel] [-x] [-i] [-s size] [-f factor] [-c contentTypeUTI [-g generator]] [file ...]

     qlmanage -p [-d debugLevel] [-x] [-c contentTypeUTI [-g generator]] [file ...]

     qlmanage -h

DESCRIPTION
     qlmanage allows you to test your Quick Look generators and manage Quick Look Server.

     The following usages are available:

     1.       qlmanage -r resets Quick Look Server and all Quick Look client's generator cache.

     2.       qlmanage -m gets all sort of information on Quick Look server including the list of detected generators.

     3.       qlmanage -t displays the Quick Look generated thumbnails (if available) for the specified files.

     4.       qlmanage -p displays the Quick Look generated previews for the specified files.

     5.       qlmanage -h displays extensive help.

Thursday, 3 November 2011

Convert squid timestamps to readable time

Squid uses Unix time for its timestamps, which is not human readable eg

Here's a perl script convert unix timestamp in squid access.log to normal time. I found it here www.terrencemiao.com/Webmail/msg00333.html.

Here's how to use it.

First create a file called squidtimeconvert.pl and open it for editing

    touch ~/squidtimeconvert.pl
    nano squidtimeconvert.pl

add the following lines

    #! /usr/bin/perl -p
    s/^\d+\.\d+/localtime $&/e;

save and exit

allow it to execute

    chmod o+x squidtimeconvert.pl

then run it on the log file of your choice

    ~/timeconvert.pl /squid-access.2009-03-09

Monday, 31 October 2011

TP-Link WR-700N - English Instructions

I acquired 2 TP-Link WR-700N devices, one to use as a repeater to overcome a dead zone in my house, and one to use as a bridge to connect some ethernet only devices in a part of the house without cables.

The adventure starts when they arrive from China via Ebay: instructions exist only in Chinese. 

Never mind, Google Translate to the rescue. BTW, Here's the product page.


Then they are set to be Access Point (AP) mode with no WEP/WPA key (ie open) on the fixed IP address 192.168.1.253.

The easiest way to start is to add a second IP to your computer. On OSX you do this by going to the Network Settings and on the active network add a second:


At the bottom of the window click the "+" sign


Select interface "Airport" if you use WIFI. The name is immaterial. Then click "Advanced"



 and then "TCP/IP", change Configure IPv4 to "manually" and put in an address such as "192.168.1.250"


Click "OK" and then "Apply".

Next go to your browser, and open 2 tabs:

translate.google.com
192.168.1.253 : The default credentials are admin/admin.

Once you get the hang of having the Google Translate open in the tab next to the web UI to configure the WR700N, it'll be fairly straight forward.



To make your life easier, here's the device's home page, with English translations.


The best place to start is the "Wizard" and work your way through. Flick between tabs to get the translation.

After its configured, you can move to Network to change its IP, and then to System Tools > Change Password. When changing the password I found I had to also put in the admin name "admin".

Friday, 28 October 2011

Using TrueCrypt on OSX as a non-Administrator

As you know, its not a good idea to be logged in with an account that is an administrator on OSX.

This gives you a problem with TrueCrypt if you use the encrypted device method, because you can't put in your admin credentials because you don't have any.

What you need to do is to switch user accounts, and launch TrueCrypt as an admin. Start terminal and type:

    su adminaccount
    Password:
    /Applications/TrueCrypt.app/Contents/MacOS/TrueCrypt

Then TrueCrypt will behave just like you launched as the admin, remember when you select device to put in the admin account's password.

The terminal session will stay showing that you launched TrueCrypt, which is fine. It'll stay that way until you quit TrueCrypt.

Monday, 24 October 2011

Updating iPod / iPad / iPhone open file open dialog, doesn't auto-update

If, when you click 'check for update' iTunes opens a dialog where you can select a new firmware, its due to iTunes auto check for update being turned off.

developer.apple.com/library/ios/#featuredarticles/FA_Deploying_iTunes/Introduction/Introduction.html refers

From the command line:

    defaults write com.apple.iTunes disableCheckForUpdates -bool NO

Manually updating iPod / iPad / iPhone firmware

If you have a few iOS devices to update, its best to download the update file (ie the .ipsw file), and manually apply.

www.felixbruns.de/iPod/firmware/ lists the various updates.

I use curl to download because if your lose the connection, curl will resume. Do a right / ctrl click on the link, copy and then in terminal make a command such as

    curl -o iPod_1.2_36B10147.ipsw http://appldnld.apple.com/iPod/SBML/osx/bundles/041-1920.20111004.CpeEw/iPod_1.2_36B10147.ipsw

Then in iTunes, option/alt click update and you can choose the firmware to apply.

Sunday, 23 October 2011

Step by Step: GPS tagging Photos and creating PhotoWalk in Google Maps and Picasa



  1. Synchronise the time between your camera and GPS. To display the exact time on my Android phone I use TM World Clock (free). I never change the timezone on my camera. Later we allow for timezone offset between camera time and UTC. The more accurate the time on your camera, the more accurate the geo-location will be.


  2. Create a GPS log where you've been - I use MyTracks (free) on Android

  3. Export the GPS log twice: to GPX and to KML. Call the file something like gpslog.kml / gpslog.gpx


    Press the triangle bottom right to bring up the MyTracks menu


    select Write to SD card, and then press "save a GPX file"



    Repeat to create a KML file


  4. Copy these file to your computer. I use Bluetooth, while USB and email works fine as well. If using Bluetooth or USB then the two files are in the MyTracks directory on the SD card/



  5. Apply the GPS data to your photos - I use GPSPhotoLinker (free) from www.earlyinnovations.com/gpsphotolinker. Its at this point that you apply the UTC offset. If you are away from your home timezone, or DST applies then deselect 'use system time zone'.


    Click 'Load Tracks' and load your GPX from MyTracks


    Drag and drop your photos into the right hand window. Then switch to 'batch' and press 'batch save to photos'.

  6. When applying GPS data the date/time stamps on your files will change. I find this annoying so I fix the date / time stamps by using jhead (free) from www.sentex.net/~mwandel/jhead

    The command is

    /path/to/jhead -ft *.JPG

    and / or

    /path/to/jhead -ft *.jpg

    ie the command is case sensitive

  7. Import / upload to Picasaweb using either Picasa desktop app or the uploader into a new album.

  8. Fire up a browser, navigate to the photos in Picasaweb, and download the KML by clicking "view in Google Earth". When this file has downloaded you need to manually add a .kml at the end. Call the file something like photomap.kml

  9. Goto to maps.google.com and click My Places because we need to upload the Picasaweb KML to My Places

  10. Go to Google Maps eg maps.google.com , and select MyPlaces




  11. Click "Create Map" and then click "Import". Upload your KML file from Picasaweb ie photomap.kml.






  12. You'll find some junk in the description section, which you can delete and put in your own description
  13. Click "Import" again.



  14. This time upload the GPS track from your logger ie gpslog.kml.

  15. After a few moments processing, the track will overlay with the photos

  16. Click "done" and set sharing options.



Saturday, 22 October 2011

Combine Google Maps and Picasa / Picasaweb


Previously I've given instructions on how to combine a Picasaweb photo album with a GPS track. Well for some reason that no longer works. What you can do now is:
  1. Get the GPSx file from your GPS logger and then use a converter such as GPSBabel to convert to KML. Or, in the case of MyTracks on Android which is what I use, you can just re-export to KML. Call this gpslog.kml or some such.
  2. Tag your photos.
  3. Upload GPS-tagged photos to Picasaweb just like always.
  4. Download the file for viewing in Google Earth, except we won't view in Google Earth. You need to add the .kml to this file. Call it photomap.kml or some such.




  5. Switch to Google Maps, and select MyPlaces



  6. Click "Create Map"



  7. Click "Import" and then upload your KML file from Picasaweb ie photomap.kml.






  8. You'll find some junk in the description section, which you can delete and put in your own description
  9. Click "Import" again.



  10. This time upload the GPS track from your logger ie gpslog.kml.
  11. After a few moments processing, the track will overlay with the photos
  12. Click "done" and set sharing options.



Friday, 21 October 2011

Synology Music player: file not found

I was having problems with my Synology and the mobile DS Audio player application. Quite often, maybe every 10 or 15 minutes I would get "file not found" error.

Turns out that I had a load of orphaned ._ files likely from using iTunes to do album management.

Logging in by SSH, I ran the command

    cd volume1
    cd music
    find . -name "._*" -exec rm -i '{}' \; -print

Usually this would ask if you want to delete any files found, but since the Synology file system couldn't find the files gave errors instead. I used the errors to work through deleting the offenders.

I found that OSX finder and even command line would not delete the files. If there was a folder with some lost files I copied off anythng I wanted to save and then used Filestation to delete, and that worked OK.

Then I used Audio Station to re-index the media, and then checked my play lists.

Saturday, 15 October 2011

OSX Howto copy files to / from EXT 3

I have a media player, Popcorn since you ask, and the network interface stopped working for some reason. First up I needed to copy off my files. It seemed that the various EXT file system drivers were not good / supported, so I decided to use Ubuntu inside a VM.

First I got VirtualBox from www.virtualbox.org, and Ubuntu from www.ubuntu.com.


Friday, 14 October 2011

OSX Command line image editing

If you are away from home, or just need some very light weight image processing here's two that are useful:

increasing jpeg compression because your connectivity is not so good, use 'sips'. Its built into OSX

    sips --setProperty formatOptions normal 1.jpg

or, for all images in a folder

    sips --setProperty formatOptions normal *

    sips --setProperty formatOptions normal *

SIPS can also take a % for finer control


    sips --setProperty formatOptions 30 *

If you want to use lossles rotation, the get nconvert from http://www.xnview.com/en/features_nc.html

Assuming you leave it in your downloads folder then the command to rotate 90 degrees anti-clockwise would be

    ~/Downloads/NConvert/nconvert -overwrite -jpegtrans rot90 1.jpg


After these, you'll find the date/time stamp of your files is wrong, so use jhead to put them back. First get it from http://www.sentex.net/~mwandel/jhead/

then the command would be

    ~/Downloads/jhead/jhead -ft *.jpg
    ~/Downloads/jhead/jhead -ft *.JPG

you'll note that its case sensitive.

Monday, 10 October 2011

The iPod cannot be updated because it contains files that are in use by another application.

If you get this error its most likely due to you syncing at the same time. So let the sync complete and try again.

Thursday, 29 September 2011

Howto Configure Linksys PAPT2 and SPA2102 for PennyTel

The Linksys PAP2T and SPA2102 ATA work well with PennyTel and other VOIP SIP providers.
  1. Get the quick start guide from www.cisco.com/en/US/docs/voice_ip_comm/csbpvga/spa2102/quick_start/guide/spa2102_quick.pdf

  2. And the PennyTel guide for PAP2T / PAP2 from www.pennytel.com/doc/linksys_pap2.pdf

  3. The main commands to get started are:

    To get into the Menu dial "****"

    To get the IP address (assuming you have DHCP) press "110"

  4. Then in your web browser load the IP you get. By default you get User Login, so click on the Admin Login link upper right. Then click "Line 1" and configure per below.

Monday, 26 September 2011

Ubuntu Guest on OSX: getting 1280 x 800 and other resolutions

After install, pretty much everything works out of the box, except one annoyance. The screen resolution was stuck at 1024 x 768, which on a MacBookPro is annoying when you've got 1280 x 800 to play with.

Selecting System > Preferences > Monitor gives only 1024 x 768, 800 x 600, 640 x 480.




You need to install two things. First open a terminal window (Applications > Accessories > Terminal) and run the command

sudo apt-get install dkms

Put in your password, and it installs.

After its finished, install the Additions:

Right at the top, on the VirtualBox menu bar, select Devices / Install Guest Additions. You get the AutoRun prompt, so accept, then after click Run, and put in your password when asked.



Follow this through, it may take a few minutes and then restart. The 'power button' upper right.

After restart, initially things will look worse! You'll get 800 x 600. Don't worry. Go into full screen mode by pressing Apple-F.

The window will resize automatically to fill your screen ie 1280 x 800. You can then back into monitor settings and the new resolution will be there. When you press Apple-F again you'll run windowed mode, which is actually my favourite.