Monday, August 12, 2013

Some LibreOffice tricks


Batch convert LibreOffice files to PDF

sudo libreoffice --headless --convert-to pdf *.docx
Just does what it says on the tin .. easy as. Note: sudo is needed - thanks Jay http://listarchives.libreoffice.org/global/users/msg28788.html and https://bugs.freedesktop.org/show_bug.cgi?id=37531

LibreOffice won't start (unless --norestore is used)

I often shut-down my laptop without checking for working documents / emails in draft. Things are so reliable in general that I can start up and continue (generally also the docs / emails were no so important that I could just walk away from unfinished). Lately I've had had the issue that I just couldn't start LibreOffice .. I found --norestore but needed it every time.

Check for restore items in the following file and just delete them
~./.config/libreoffice//user/registrymodifications.xcu

Wednesday, August 7, 2013

Pixel CL-N3 Pin out

In case there are others out there tempted to but the pixel CL-N3 as opposed to the Canon one (or other generic). No comment yet on actual use but here are the pin-outs

Thanks to http://www.doc-diy.net/photo/remote_pinout/

Raspberry Pi project - shutter control on Canon 7D

OK so I'm embarking on my first 'real' Raspberry Pi hack. I've got one running as a music server but that's not really what it's all about. It's time to do some GPIO and maybe work my way towards some real electronics.

What I've selected as my first project is to replicate something that's been done before - getting the Pi to trigger the shutter on my partners Canon 7D. As per http://www.ohmypi.com/2013/06/16/control-canon-camera-using-raspberry-pi-gpio-rpi-gpio-how-to/ and many others out there.

Here is my shopping kit:

  • Raspberry Pi *
  • GPIO ribbon cable*
  • Basic Breadboard *
  • Jumper Wires 6" M/M Pack of 10
  • Asus USB-N10 **
  • 0.5W Metal Film 470K 1% resistors (8 pack) **
  • 2 x 2N222 NPN transistors **
  • Pixel CL-N3 
** thanks to Jaycar

Wednesday, October 17, 2012

Number 0Nxxxxxxx is currently OFFLINE

This is something that's been bugging me for a little while with my iax2 trunk to 2talk. Fundamentally I'm just a bit sow to get how it all hangs together. Generally it works out of the box so I don't 'need' to understand it to use it ... except it's good to know how it hangs together when things get weird.

That said some kind of recent change (possibly with 2talk plus account set-up) my registration died and 2talk showed me as 'OFFLINE' .. hmm.
*CLI> iax2 show registry
Host                  dnsmgr  Username    Perceived             Refresh  State
202.180.76.166:4569   N       0Nxxxxxx               60  Timeout
202.180.76.166:4569   N       0Nxxxxxx               60  Timeout

Ok so I'm not registered - but, I can make outbound calls ... odd? No - this is a clear description:
The only purpose of registration is to allow a device to identify its location on the network, so that Asterisk knows where to send calls intended for that device.

OK so I didn't change anything so perhaps I can force a registry reset / refresh, etc 

*CLI> iax2 unregister
Usage: iax2 unregister
       Unregister (force expiration) an IAX2 peer from the registry.
Hmm .. not helpful - I can't figure out what the peername is .. a few attempts from iax2 show peers to get the name don't seem to help. So I default to a fallback option - change the registry string to something wrong, reload asterisk, then change in back .. maybe. 

So I choose (rather fortuitously)  to replace:
0Nxxxxxx:@iax.2talk.co.nz 
with
0Nxxxxxx:@iax.plus.2talk.co.nz 
and  guess what, it works .. well maybe a change to the 2talk+ accounts? I can't find a reference say here http://blog.2talk.co.nz/iax2.html or  here http://www.2talk.co.nz/2talkplus/ . I've created a ticket so will see what they say.

*UPDATE* apparently if you're on 2talk+ you should always use .plus .. so looks like the last related change got pushed through and they've stopped supporting registration on the old domain. OK.

Tuesday, October 16, 2012

Nexus 7 - Office tablet - it's time to go paperless people

OK so after moving to Auckland to start a fledgling branch of the company I work for I'm thinking about operational readiness. And, next on my list is a printer/scanner/copier .. or is it? So I don't want toner cartridges or paper jams or manual duplex or whatever. Furthermore all the cool kids up here just take a tablet to meetings and with the features of Adobe Reader X (i.e. highlighting and freehand overlays) I'm thinking a tablet is a better first choice and aim to go paperless.

So having considered (and discarded .. for now) the Samsung Note 10 I have opted for a Nexus 7. So far so good - will update .. just opted for Wifi model to keep it cheap and simple but aside from tethering issues (easily getting documents on it before a meeting) we're up and running.


Phones can be hotspots - but what about laptops?

So here I am chewing through mobile data and surely I don't need to buy and set-up a permanent wifi AP when I want the odd bit of wireless data. Normal process follows - ask google what ubuntu can - wifi tethering?

Turns out 'yes' and some good instructions are forthcoming on askubuntu.com but (aside from only seemingly supporting WEP and some IPv6 issues) I don't see a hotspot?

The answer - via http://askubuntu.com/questions/76981/cannot-make-wi-fi-hotspot

 $ sudo iw list | less
   ...         
 Supported interface modes:
                 * IBSS
                 * managed
                 * monitor

 so no AP and so hardware does not support being an AP. Bummer - but good to know.

Tuesday, September 18, 2012

Samsung Vehicle Dock Kit for Galaxy Nexus

OK so I love car docks .. I bought a Google Nexus One and forked out for a custom Google car dock (shipped from Europe at no small expense). So now I have a Galaxy Nexus it was just a matter of time before I caved in and got a car dock. I found one discounted on MobiCity (parallel importer in Wellington) - not cheap but acceptable at the time.

So now it's arrive - time to unpack. 


OK so straight up this is a nice looking car dock. Time to put my phone in .. OK it is a very very tight fit - will be interesting to see how it goes in the car ..it's a 2 handed operation. All in all look an feel and operation is so far a Rating: 4/5

Not having yet plugged it in (and in doing so triggering the bogo pins into action) I start looking to download the google car dock app .. oddly it't not available for 4.x .. hmmm. Once usb is connected to the dock however - bingo the base home screen goes landscape and the view is quite tidy .. so I might be fine as is. What is particularly nice is the voice activation icon on the bottom left.



Just by fooling I'm finding the voice activation is quite cool but my results to date are well below 50/50 however:
  • CALL call such as "call fred mobile" rarely if ever seems to work.. the more words you say the lest likely it is to succeed Rating: 1/5. Simplifying to call such as "call fred" can work well for simple names ... I don't hold out much hope that it'll replace typing / touch in the car but it can help to reduce typing by bringing up search results Rating: 2/5
  • DRIVE drive such as "drive home" works well for simple preset destinations - the integration here with google maps online is pretty awesome. That said if I ever try "drive Quay street Auckland" the best I get is "drive key street waltham" .. not likely to work at any level of acceptability .. possibly my accent - enunciation is very definitely important  Rating: 3/5 (for the saved locations and maps integration)
  • LISTEN listen to a-la "listen to the x x" .. so far only succeeds in starting my preferred music player (PowerAMP) with a failed search .. but a one touch from here to folders so Rating: 2/5. That said to be able to support 'start music' and 'stop music' simply activating/deactivating your preferred music player would be a 5/5 for me. How about "drive home" "start music " .. that would be cool.
  • SEND send text to along the lines of "send text to matthew hello" .. this finally worked on about the fifth attempt after giving up on a couple of other names. Once I got it working I still needed to choose a matthew as I have a few in my contacts .. unlikely to use this with much success Rating: 0/5. Given sending a text was not super successful you can imagine how much success was in store for email .. send email quickly yields results .. but once you have a email editing dialogue .. well, good luck to you.

A complete list of valid actions can be found here http://www.google.co.nz/mobile/voice-actions/

Also note my voice settings are for 'English (UK)' and I have this downloaded to be able to work offline. Phone search is across People and Play Music.