Endpoint

Projects and software by Matt Collinge @ www.mattcollinge.co.uk

Archive for the ‘Software’ Category

Titanium Apps and the Blackberry Playbook

with one comment

In Feburary 2012, Blackberry updated the OS for their 7″ Playbook tablet to v2.0. This introduced compatailbity with Android-based applications whereby developers can simply repackage, code sign, and submit their Android apps into BlackBerry App World. It also means you can take any Android app (that hasn’t gone through this process) and sideload the app yourself.

Since I develop mobile apps for iOS and Android using the Titanium platform, I was interested in how much effort it would be to get my existing apps working on the Playbook. There are plenty of posts on how to take an APK and sign it correctly for App World, but what took me a while to figure out, was which version on Titanium was compatible with the Playbook.

After some experimentation, I’ve found that if you package your app against Titanium SDK 1.7.5, it’ll work nicely on the Playbook. Version 1.8.x won’t work (hmm, maybe it’s V8 vs Rhino.. V8 definitely doesn’t work…). Certain pieces of code may also cause the app to crash (whereas it won’t crash on a proper Android device). The one thing I hit, was passing url:null, into Titanium.UI.createWindow will crash the app, whereas that’s absoutely fine on iOS and Android.

The other small advantage of using the 1.7.5 SDK is that the resulting APK is a lot smaller, although since the current Playbook only has Wifi this is less of an issue than it is on a mobile phone.

Now we have the APK, you just have to go through the app packaging/signing process as detailed elsewhere on the web, or in Blackberry’s official documentation. This new GUI-based tool looks like a good place to start if you don’t like working from the command line.

Written by Matt

March 20, 2012 at 6:43 am

Using Wireshark and MITM to explore a STB

leave a comment »

I’ve recently bought a new Freeview HD box from 3view. It has a whole host of features and can be considered a “connected” device. As with most high-end set-top-boxes (STB) it pulls software firmware updates from the web, and I was interested to see where it went to get these updates & how it knew they were available.

I know about using tools to sniff network traffic, but have only done this to sniff traffic coming directly out of the PC I’m running the capture software on. Buying this 3view box gave me more of an inventive to expand my knowledge & figure out how to capture the traffic from other devices.

It was actually relatively easy. I decided to do a Machine in the Middle (MITM) ‘attack’ which was documented over at the Wireshark wiki.

In my case I didn’t have 2 network cards, but did have a laptop with one network card, and a wireless card. In Windows XP I bridged the NIC to the Wireless adapter, then plugged in a cross-over cable that linked the 3view box to my laptop. Then, after a bit of messing about with IP addresses it started working.. my 3view box was accessing my wireless router via my laptop.

Now that all the traffic from the 3view box was going via my laptop, all I then needed to do was fire up Wireshark & take a look at the packets.

Intercepting the traffic allowed me to see where the box was going for it’s updates, and the User Agent. That’s been documented over at the 3viewer community website I set up for 3view owners.

http://3viewer.elementfx.com/

Written by Matt

September 11, 2010 at 1:49 pm

Android Apps – Pick of the best stuff – Jan 2010

leave a comment »

Here’s my pick from the thousands of Android apps that are available as of Jan 2010.. all of these are free!

Media

  • Listen – Google’s podcast subscription & listening app
  • beebPlayer – Stream content from the BBC’s iPlayer
  • Rev3Remote – Stream video content from Revision3

Screen Candy

  • chompSMS – View SMS conversations like the iPhone
  • SMS Popup – Nice pop-up notification of SMS messages
  • Endless Walls Wallpapers Lite – Wallpapers
  • Backgrounds – Wallpapers
  • Retro Clock Widget – Nice clock + date widget
  • The Weather Channel – has a nice widget

Developer / Techie / Advanced stuff

  • Quick Settings – Quick access to settings, e.g. turn off wifi
  • ASTRO File Manager – Access files on your SD card
  • AppsInstaller – Install apps from your SD card
  • Free Advanced Task Manager – Task management & app uninstaller
  • Wifi Analyser – Wifi graphing (like Netstumbler)
  • GPS Status – Detailed GPS info
  • android-vnc-viewer – VNC Viewer

Barcodes / Shopping

  • ShopSavvy – Read barcodes and it’ll find the product online
  • Barcode Scanner – Recommended for reading (and creating) QR Codes

Augmented Reality

  • Google Sky Map
  • Reality Browser 3.0

Misc Useful Stuff

  • RealCalc Scientific Calculator
  • Voice Recorder
  • Text Edit
  • Compass
  • DrawNoteK – Draw notes on the screen
  • Bubble – Spirit level

App Versions of Websites

  • Quickpedia – Mobile optimised Wikipedia
  • Seesmic – Twitter client
  • Facebook for Android – Official Facebook app
  • Bloo – Unofficial Facebook app that includes notifications

Games

  • Labyrinth Lite
  • Phit Droid
  • Frozen Bubble
  • Coloroid
  • Bebbled

Written by Matt

January 18, 2010 at 6:55 am

Posted in Android, Internet, Software, Technical

Tagged with , ,

iPhone and Android development with Titanium

leave a comment »

Over the past few months I’ve worked on a couple of mobile applications for the iPhone and Android platforms. I’d looked at Phonegap some time before that, but determined that it wasn’t up to the job, but more recently I stumbled across Titanium from Appcelerator. The idea is that you code up your apps using HTML and Javascript. The Javascript calls the Titanium API to create things like lists, dialog boxes, and phone features such as geolocation.

Some of the advantages of using Titanium are:

- No need to learn Objective-C (iPhone) or Java (Android)
– Leverage existing HTML + Javascript skills
– Write one version of the code that can be deployed to both platforms
– Code is compiled up into native applications which are accepted in the App Store
– Potential to deploy to other platforms in the future (e.g. Blackberry, Symbian)

The level of support provided by the Appcelerator staff on the official forums is brilliant, and the tutorial videos are good for those who want to get an overview of creating apps without wading through documentation.

You’ll still need a Mac if you want to develop for the iPhone, because Titanium makes use of the iPhone SDK. But if you just want to do Android development then you can use Window or Linux as well.

Although you’ll be developing 1 set of code for both the iPhone and Android, you’ll probably want to customise the UI slightly differently for each platform. For example, Android apps often hide away items such as ‘Settings’ and ‘Help’ under the Menu button. It’s simple to code this kind of thing up:

	if (Titanium.Platform.name == 'android') {
		var menu = Titanium.UI.createMenu();
		menu.addItem("Help/About", function() {
			displayWindow('Help / About', 'window_about.html');
		}, Titanium.UI.Android.SystemIcon.HELP);
		Titanium.UI.setMenu(menu);
	} else {
		data.push({title:'Help / About',image:'tabicon_help.png', color:'#ffffff'});
	}

That code will create the Help/About option under a menu on Android, and add it to the home screen’s list on the iPhone. Simple.

Titanium is an awesome framework so if you’re considering developing for the iPhone and/or Android then I’d highly recommend you take a look.

Written by Matt

January 13, 2010 at 7:10 am

Power Meter Plus 1.6 Released

with 2 comments

This release of Power Meter Plus – the popular replacement for the standard Windows power meter – adds 4 new features/settings. These have been added after feedback from users.. a lot after it was featured on Lifehacker.com and in PC Pro magazine :)

The features/settings now available are:

  • Hide the meter instead of switching sides.. it then fades back a few moments later
  • Change the transparency level of the message that appears across the screen for certain warnings
  • Flash the warning message (optional)
  • Start the meter on the right of the screen (which is where it will stay if you set it not to move sides)

Click here for the Power Meter Plus download page.

Power Meter Plus

Written by Matt

February 9, 2009 at 8:17 pm

Power Meter Plus in PC Pro Magazine

leave a comment »

pc-pro-logo Power Meter Plus has been getting a lot of coverage this month; it’s been mentioned on dozens of blogs and now in PC Pro magazine issue 172, in fact I think Lifehacker might have picked up on it from there & the blogs picked up on Lifehacker’s article.

pcpro-jan-2009

Written by Matt

January 5, 2009 at 7:30 am

Power Meter Plus featured on Lifehacker

leave a comment »

Lifehacker is one of my daily visits, so it was brilliant to see that it had Power Meter Plus as the Featured Windows Download :-D

Written by Matt

December 31, 2008 at 3:49 pm

Power Meter Plus 1.5 Released

leave a comment »

This release of Power Meter Plus – the popular replacement for the standard Windows power meter – fixes a bug with widescreen monitors.

Click here for the Power Meter Plus download page.

Power Meter Plus

Written by Matt

December 27, 2008 at 9:59 am

Using JSLint with Notepad++

leave a comment »

I’m doing a fair amount of development using the ExtJS framework. IE is a bit picky about getting JavaScript properly formatted (otherwise it refuses to render the page). That’s why I’ve found JSLint really useful for locating stray commas or semi-colons.

To make it a bit quicker to put the file contents in the JSLint box I decided to hook it up to the Run menu in Notepad++. However, the JSLint web page doesn’t allow us to pass in data to it. To get around this you can copy the HTML + JS files from the authors website an copy them locally. Once you’ve got them locally you can modify the source to allow the passing of data.. here’s the change I made to do it on my system:

jslint.php changes.. add this right near the end

<script src="javascript.js"></script>

You’ll then need a way to take the file contents and fire it off to the page. At first I tried passing the file contents via the GET request, but it’s limited in length. Also, Notepad++ won’t let you send the file contents via the Run command. In the end I chose to use a piece of VBScript to bring up the webpage in the default browser, and some JavaScript to read in the file & place it into the page.

launchJSLint.vbs

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(wscript.Arguments(0), 1)

Dim strCharacters

Do Until objFile.AtEndOfStream
    strCharacters = strCharacters + objFile.Read(1)
Loop

strCharacters = Escape(strCharacters)

Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objOutputFile = objFileSystem.CreateTextFile("c:\progra~1\notepad++\jslint\javascript.js", TRUE)
objOutputFile.WriteLine("document.getElementById(""input"").value = unescape(""" & strCharacters & """);")

Dim wShell
Set wShell = CreateObject("WScript.Shell")
wShell.Run "c:\progra~1\notepad++\jslint\jslint.html", 9

Finally, this is the Run command you can use in Notepad++ to launch the script…

wscript "C:\Program Files\Notepad++\launchJSLint.vbs" "$(FULL_CURRENT_PATH)"

Written by Matt

November 20, 2008 at 8:04 am

Switching FoxyProxy Profiles using Script

with 4 comments

FoxyProxy is a useful extension to Firefox, but I’m always having to switch profiles back and forth as I take my laptop from work to home, and vice versa. I experimented with proxy PAC files without any success (mainly because laptops have multiple network adapters and the PAC scripts only detect your first IP address). Plus, as far as I can tell, PAC files are checked for every single HTTP request which must be a hit on browser performance.

Anyway, what I decided to do was directly modify the FoxyProxy config file before Firefox was run, and this would then select which FoxyProxy profile was used. The script below detects the host of something on my local network (which doesn’t exist at work) and switches accordingly. You could get it to switch on anything you like, but this works for me.

runfirefox.vbs

Set WshShell = WScript.CreateObject("WScript.Shell")

' Code to determine where you are and switch profiles accordingly
if (Ping("somehost") = "201.69.34.132") then
	ModifyFoxyProxy("3402440320")
else 
	ModifyFoxyProxy("patterns")
end if

' Run Firefox - this uses a specific profile.. your command line can simply exclude it
ReturnCode  = WshShell.Run("""C:\Program Files\Mozilla Firefox\firefox.exe"" -profile ""z:/firefox/profiles/qtxjee58.default""", 6, False)



sub ModifyFoxyProxy(sProfile) 
	' Path to your foxyproxy.xml file
	xmlfile="Z:\Firefox\Profiles\qtxjee58.default\foxyproxy.xml"
	outfile="Z:\Firefox\Profiles\qtxjee58.default\foxyproxy.xml"
	set oparser=createobject("msxml2.domdocument")
	with oparser
	    .async=false
	    .validateOnParse=false
	    .resolveExternals=false
	    .load xmlfile
	end with
	    
	if oparser.parseerror.errorcode<>0 then
	    wscript.echo "xml file " & xmlfile & " is not well-formed." & vbcrlf & "Operation aborted."
	    wscript.quit 999
	end if
	
	set oroot=oparser.documentElement
	oroot.setAttribute "mode", sProfile
	oparser.save outfile
	    
	set oparser=nothing 

end sub


function Ping(strHost)

    dim objPing, objRetStatus

    set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery ("select * from Win32_PingStatus where address = '" & strHost & "'")

    for each objRetStatus in objPing
        if IsNull(objRetStatus.StatusCode) or objRetStatus.StatusCode<>0 then
    		Ping = ""
            'WScript.Echo "Status code is " & objRetStatus.StatusCode
        else
            'Ping = True
            'Wscript.Echo "Bytes = " & vbTab & objRetStatus.BufferSize
            'Wscript.Echo "Time (ms) = " & vbTab & objRetStatus.ResponseTime
            'Wscript.Echo "TTL (s) = " & vbTab & objRetStatus.ResponseTimeToLive
            Ping = objRetStatus.ProtocolAddress 
        end if
    next
    
end function 

Written by Matt

October 25, 2008 at 12:34 pm

IBM Thinkpad Hardware Control

leave a comment »

The ‘Access IBM’ button on my laptop doesn’t get much use, so I decided to map it up to the PC release of XBMC (Xbox Media Centre). That’s the easy part, because you either set that in the registry, or use this small app.

When XBMC fires up I’d also like to set the volume levels of the laptop so that they output properly for the AV equipment I’ve got hooked into it. Once XMBC shuts down I’ll set back down so that the sound is at a lower level. The IBM laptops use a hardware volume control (independent to the Windows volume control) so I’m using some Python scripts to access the IBM hardware.

Here’s the finished scripts (the first one calls the second):

xbmc.vbs

Set WshShell = WScript.CreateObject("WScript.Shell")

'Set windows volume level
SetSoundLevel 90

'Set IBM ThinkPad volume level
ReturnCode  = WshShell.Run("C:\win32app\startup\thinkpadsetvolume.pyw 14", 1, true)

'Run XBMC and wait until it exits
ReturnCode  = WshShell.Run("C:\Progra~1\XBMC\XBMC.exe -fs -p", 1, true)

'Set IBM ThinkPad volume level
ReturnCode  = WshShell.Run("C:\win32app\startup\thinkpadsetvolume.pyw 3", 1, true)

'Set windows volume level
'SetSoundLevel 30

' ------------------------------------------------------------------------
' Function to set the Windows sound level
' ------------------------------------------------------------------------
Sub SetSoundLevel ( iMyLevel )

On Error Resume Next
Err.Clear 

Dim blSoundDevicePresent
Dim objSoundDevice

blSoundDevicePresent = False

For Each objSoundDevice In GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("Win32_SoundDevice")
 blSoundDevicePresent = True
 Exit For
Next

If Not blSoundDevicePresent Then Exit Sub

Dim iDefaultLevel, iSoundLevel, objSoundLevel

iDefaultLevel = 5

If Not IsNumeric ( iMyLevel ) Then iMyLevel = iDefaultLevel

MyLevel = CInt ( iMyLevel )
If Err.number  0 Then iMyLevel = iDefaultLevel

If iMyLevel  100 Then iMyLevel = iDefaultLevel

Err.Clear
set objSoundLevel = CreateObject ( "SetSoundLevel.SoundLevel" )
If Err.number  0 Then Exit Sub

iSoundLevel = iMyLevel * ( objSoundLevel.GetMaxSoundLevel - objSoundLevel.GetMinSoundLevel ) / 100

objSoundLevel.SetSoundLevel iSoundLevel

set objSoundLevel = Nothing

End Sub

thinkpadsetvolume.pyw

import thinkpad
import time
import sys

if __name__ == '__main__':
    try:
        c = int(sys.argv[1])
    except IndexError:
        c = 14
    hk = thinkpad.Hotkeys()
    hk.set_volume(c)

Written by Matt

October 16, 2008 at 7:30 am

USB Detect & Launch Version 1.5 Released

leave a comment »

USB D&L USB Detect & Launch allows you to automatically execute a script or application each time a USB storage device is plugged into your PC. Different scripts can be executed for different devices and it’s the volume label that determines what action to perform.

Version 1.5 contains new functionality to monitor for any device being plugged in; useful when you have no control over what memory stick is being inserted, but need to fire off a script to perform a particular action.

e.g.

label:(any)
exec:”c:batchbatch-any.cmd” %1 %2

You can find the download on the USB Detect & Launch page.

Written by Matt

February 29, 2008 at 7:10 am

File Mover 1.9 Released

leave a comment »

File mover is useful little utility that will move files from one folder to another. This is useful when a program (or remote server) dumps files into a folder & you want to move them somewhere else. An added bonus with this utility is that it’ll (optionally) run a program each time a file is moved; this could be useful for firing off email notification.

Version 1.9 has been released and includes some small fixes and enhancements. E.g. copy from log now works, and the app doesn’t freeze when executing a script in ‘Wait for executed process’ mode.

You can find the download on the File Mover page.

Written by Matt

February 29, 2008 at 7:07 am

Drive Map Pro 1.6 Released

Drive Map Pro is a great piece of Windows software for organising all the servers you connect to. It’s primary purpose is to give you easy access to mapping a network drive with the minimum of fuss, however it does a lot more that that, including managing your VNC/Radmin connections too!

The latest version of Drive Map Pro (version 1.6) is now available to registered users and includes the following:

  • Lots of bug-fixes :-D
  • Ability to have multiple UNC drive mappings under one entry, syntax is ‘\serverc$,d$,whatever’, which gives you the ability to map to any/all 3 of those drives without clogging up your list of servers!
  • Middle-click launches the application you’ve associated with the server.. saves a click or two!
  • Store notes against each entry.. handy for storing box info, like who’s the administrator
  • More application preferences (like auto-hide DriveMapPRO after launching an application)

Click here for more information on Drive Map Pro.

Drive Map Pro 1.6

Mapping a drive has never been easier!!

Written by Matt

February 25, 2008 at 7:22 pm

Topfield TF5800 – a hacker’s PVR :)

leave a comment »

The Netgem iPlayer I’ve had for watching Freeview doesn’t provide any PVR functionality, so I’ve been looking for a replacement that does everything I want. It was between the Humax 9600 and the Topfield TF5800. After a lot of research I went for the Topfield.

The thing that swung it for is that the Toppy is extremely configurable due to 1) the custom firmwares 2) the user-built applications (TAPs) that are available.

Between the firmwares and the TAPs you can customise almost anything! For example, on the standard box the display on the front will show the time when in standby, and the channel number when it’s switched on. That’s not something I care for.. I can see the channel I’m watching and the time is more useful to me. Someone else obviously thought the same, and they’ve created a TAP (TF5000Display) to completely customise the display to your needs, doing way more than what I needed.

First Things First

Setting the box up wasn’t as arduous as I thought it was going to be. After rigging it up to the TV and making sure everything worked, I fired up my laptop and installed the Topfield Tools suite, together with the USB Driver for Windows XP. Easy so far.

Firmware

Next I downloaded the firmware I wanted to install. This was from Toppy.org.uk and required me to sign up for their forums, and that gave me a login for the main site that brings up a new menu where you can download new (and beta) firmwares. I chose the 5.13.65 release which was recommended by the site.

The firmware can then be (optionally) patched with extra fixes which have been community-written. To work out which ones I wanted to integrate into the firmware I read this topic and downloaded FWPatcher & PatchPackV2 which contained everything I needed.

The patches I chose were:

  • [C0] NoCYR
  • [Cy] NotCYR_02
  • [H] HDDPatch_03
  • [I] PBSiS
  • [P] PowerRestore_05
  • [R] RecRoundel
  • [S] StartupPatch_03
  • [T2] TimerPatchT2b
  • [Ts] TimerSetting_02
  • [T] TimerPatch_04b
  • [Wf] WindFaster_02
  • [Xp] PlayNoCYR_04
  • [Xw] WatchNoCYR_03
  • [Z] Disable0AspectSwitching

After integrating the patches the next step was to blow it onto the Toppy using the firmware utility in Topfield Tools.

The process was surprisingly easy and the online documentation is good if you get lost.

TAPs

There’s only so much you can stuff into 1.5mb of firmware, and Topfield were considerate enough to allow people to program applications, a bit like plug-ins, which have access to an API provided by the company. That allows these programs to access things like EPG data or write out to the screen.

The standard EPG that ships with the box isn’t great.. but add the MyStuff TAP and the unit is completely transformed with a highly customisable, and skinnable EPG. There’s even a 71-page PDF manual for MyStuff! Here are 3 things you can customise (out of a list of maybe a hundred):

  • Show/hide channel logos
  • Choose how many hours to display in the EPG window (3hrs seems sensible)
  • How many channels to display per EPG page (8 suits me!)

The TAPs I added on day 1 were:

  • MyStuff (which adds a few of it’s own, including one that scrapes EPG data)
  • Display
  • PowerDown
  • TAPCommander

Conclusion

The standard Topfield box is okay. And it’ll probably be a lot better with the new firmware that will be released shortly that features in the new TF5810 and conforms to the Freeplay standard. However, with the custom firmware and TAPs (especially MyStuff) the box is awesome and I’m having a great time configuring it to be exactly what I want from a Freeview PVR box. Kudos to the user-community who put so much time into developing the patches and TAPs!! And thanks to Topfield for being forward-thinking enough to open it up enough to allow these mods to be written.. if only more manufacturers did this!!!

Quick Video Demo

This is a demo showing what the Topfield PVR looks like once the MyStuff application has replaced the standard UI.

At the start of the video you’ll see the default Toppy UI, then I fire up MyStuff where you’ll see the difference straight away.

After viewing the EPG I navigate around a bit, then show a MyStuff settings page to give you an idea of how many things you can configure.

I go on to show a few more things including setting series link (via a Search), and a some of the standard Topfield things like pausing live TV, PiP, etc.

Near the end I dip into TAPCommander which helps you configure any user-written apps you’ve got loaded into memory.

This covers only a small portion of what the box is capable of and is only meant as a taster :)

Written by Matt

February 19, 2008 at 7:30 pm

Follow

Get every new post delivered to your Inbox.