000webhost

Web hosting

Wednesday, September 28, 2011

Filesystem Corruption on Android

In spite of dramatic improvements in filesystem technologies, corruption is still an issue that continues to this day in computing whether it be on the desktop and/or on more portable devices. Recently my Android based phone endured something along these lines. A number of folders had become files and there were randomly named files spread throughout the filesystem on the SD card with unreadable characters. Research indicated that this was a problem that has been experienced before by others (though the type of corruption often varies).


Luckily in my case, all important data was still retained but it was still disconcerting to say the least. The way I dealt with it was by connecting my phone via USB to my laptop and set the connection to run in mass storage mode. Thereafter, I ran 'Scandisk' (FAT32 filesystem is used on the SD card) in order to determine the causes and hopefully create the fixes required in order to achieve filesystem consistency. Obviously, it would store the files in various CHK files. Still had permission errors though. Upon further examination certain directories seemed to have have become files which resulted not being able to save files from camera shots for photos (DCIM) or wallpapers (Wallpaper). By manually recreating the relevant directories and copying back the relevant files to the relevant data directories you could restore most data. By using the built-in image viewer you could regenerate relevant metadata. Obviously, I'm still looking for a more elegant solution that can be built into the device itself.

http://www.brighthub.com/mobile/google-android/articles/37151.aspx

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Monday, September 5, 2011

Open Source PBX Evaluation

A while ago I had to do evaluation of PBX systems for a company after we discovered that we didn't have enough bandwidth between two offices to offer guaranteed quality of service during peak data transfer times. These are some of the notes from that particular evaluation. Note, that this data may be invalid since the actual evaluation was conducted about a year and half ago from the data of this particular post.

- Trixbox/FreePBX/Elastix/AsteriskNOW/SwitchVox have been evaluated
- apparently custom contexts module for Elastix is in beta and has to be custom installed, http://www.freepbx.org/support/documentation/module-documentation/third-party-unsupported-modules/customcontexts
- http://mirror.freepbx.org/modules/release/contributed_modules/ Had to update to latest version of software as old version didn't seem to pick up existing settings from within our current phone network well. New version seems a little funny. Had to setup in unembedded FreePBX, then check in Elastix PBX section and apply, then go back into FreePBX before outbound routes were picked up correctly...
- VMBlast is a module that will allow you to leave voicemail for multiple users in your system, http://www.trixbox.org/forums/trixbox-forums/help/info-vmblast-please
- To install a new module in FreePBX basically download it, extract it, then within the web inteface go to unembedded FreePBX, 'Modules Admin', Install, Process, Confirm
- http://code.google.com/p/teletorture/ Telemarketer Torture module for FreePBX, generates a destination for inbound calls in FreePBX which you may send unwanted callers to Module created by James Finstrom
- Outbound Routes, Dial Patterns
NXXXXXXX
- ZAP, Dial Rules
03+NXXXXXXX
0392123+NXX
0N+NXXXXXXX
XXXXXXXXXX
0011+ZXXXXXXXXX
- AsteriskNOW, think of FreePBX on a stripped down version of Linux that is fast to install. Reminds me of LiveCD produced by Xorcom in order to test connectivity to their devices. http://www.xorcom.com/downloads/live-cd-quick-start.html
- non-critical bug in Trixbox installer. kmod does not require kernel... interesting that they've opted to go for text based installer as opposed to full blown GUI
- Trixbox have apparently setup their own init.d like start-up system, /var/trixbox_load/firstboot/
- builtin functionality to allow for reboot when no active calls are going
- true web based tick and upgrade system that will allow us to pursue more finer grained control than was previously possible with all in one support packages
- interesting that they should choose to go with phpconfig rather than a complete brand new interface for their file configuration
- SwitchVox is very slick but may end up being beyond our budget considering the number of phones in our system, http://demo.switchvox.com/admin
- http://www.freepbx.org/download-freepbx redirects to Asterisk NOW for live test CD
- http://www.freepbx.org/support/documentation/installation, installing FreePBX on various systems
- http://support.freepbx.org/book/export/html/31

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Arduino Programming

Recently, an electronics store opened close by. This of course had its pros as well as its cons. The pros being that I have a place close by where I can get all sorts of electronic parts that I require. The con being sometimes you can get caught up in new pieces of technology. One of these pieces of technology happens to be Arduino electronics. There are obviously many different variations of compatible hardware but the most useful one that I came across that was in stock was the EtherTen.


Its basically a 100% Arduino compatible board that has an on board MicroSD card slot, an Ethernet port, as well as an ATmega328P MCU. Besides doing the usual LED blinker type experiments that you may have encoutered at University you'll also have the chance to interact with the outside world using all sorts of extra functionality such as wireless, LCD screens, motors, and enironmentel sensors. (details regarding this are available towards the bottom of this post)

Software Setup

1) Download software from, http://arduino.cc
2) Upon uncompression the you'll notice a arduino executable. Opening it will result in a minimalistic IDE for simple programming of the device itself.
3) Install the Windows USB driver if required via http://www.freetronics.com/pages/installing-the-usb-driver-file-for-windows (you won't require this if you're using Linux)
4) Select correct board by going to Tool > Board
5) Go to Tools > Serial Monitor to find out where device is going to be plugged in. Else just use dmesg and look for something similar to the following (if using Linux)

[ 8632.239231] usb 3-1: new full speed USB device number 3 using uhci_hcd
[ 8632.431914] usb 3-1: New USB device found, idVendor=20a0, idProduct=4150
[ 8632.431926] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 8632.431935] usb 3-1: Product: Eleven
[ 8632.431943] usb 3-1: Manufacturer: www.freetronics.com
[ 8632.431950] usb 3-1: SerialNumber: 64938323231351C0B1A1
[ 8632.435125] cdc_acm 3-1:1.0: ttyACM0: USB ACM device

6) Go to Tools > Serial Port and select the correct port on which the Arduino has been connected on.
7) You should see the blue LED on the board light up to indicate that the board has now been connected.

Running a Program on the Arduino
1) File > Examples > Digital > Name of Program
2) Sketch > Verify/Compile
3) File > Upload to I/O Board

You'll need to have avr-g++ installed as well as a number of other dependent utilities on Linux. I was using Knoppix Live ISO image so I tried downloading Debian packages obviously. I noticed that there were a few dependency oddities though including some that were not so easy to fix so I resorted to using the Windows version to get things up and running quickly.

Note, that Ethernet will not work without sufficient power. Funnily enough, a Linksys switch AC adapter works perfectly with the device (12V with + in centre) though it can cause the device to heat up a little. Note also that the LCD can be used without extra power although at a significantly lower brightness level.

Not everything is perfect. I had to upload compiled firmware twice a few times or else you may encounter limitations like this guy did here, http://robotjamie.com/etherten-firstlook Nonethless, its an incredible piece of hardware considering how inexpensive it is.

You may need to alter the default initialisation string from the example sketch if you do intend to use the LCD/keypad shield. Details of this were on the underside of the actual PCB on my particular 'Shield'.

Currently, I'm working on wireless transfer of information. Details of my progress on this experiment will follow later.



Thursday, August 11, 2011

Content Management Sytem Evaluation

At some stage, most companies discover that due to their increasing size its hard to keep track of what everyone is doing. Therefore, they will require some form of Intranet to be implemented. Obviously this happened at a company that I was working at. As such, we had to evaluate the many options available to us available at the time. Obviously, there are various classes/types of CMS's. Personal ones favour a flat file structure with no multi-user functionality while the more complex/professional systems use database backends, a web based front end, have the ability to authenticate via a network directory system and have many options with regards to add-ons which allow for extra functionality.

One thing you'll need to watch for is whether there is too much of a learning curve in using the application itself. I noticed this myself when using the more mature systems such as Joomla. In such cases, either user training is going to be required and/or the content may need to be managed by your IT team. For mid-sized companies Drupal is a decent compromise between scalability and functionality.

Installation is fairly simple and similar to other web based applications. Install/untar the packages. Configure your web server. Setup the database backend. Configure the relevant files in order to authenticate correctly via the relevant backend. Thereafter, add any extra functionality as and when required.

http://en.wikipedia.org/wiki/List_of_content_management_systems

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Jocular Computing

One of the things that has always been entertaining for me is when technology attempts to interact with humans in a non-trivial fashion. While I was evaluating new phone systems for an old company I had/saw the opportunity to be able to experiment with some new phone lines with our VoIP phones. One of the things that I was working on was having the phone system 'attempt to tell a joke'. This idea was born from my previous experience with eMac systems back at University which had the ability to randomly tell a joke. They did this via a speech recognition system which had limited vocabulary (a group of phrases in order to reduce the search space and is a technique that I've seen commonly used on OEM speech control systems such as that which comes standard with Toshiba laptops). It also relied on an XML based file that contained the actual jokes itself. Thereafter, a randomised algorithm was used to select which joke to tell and what type of joke to tell (Knock knock, Why did the Chicken cross the road, etc...) While it was not quite as entertaining as a real human it was at least amusing and provided me with the idea for my little experiment. Random jokes from the web pulled using a web scraper or else manually downloaded which were then reformatted to be placed into a flat text file as follows.

'line number' 'tab character' 'joke'

Therafter, when and if required the string was encoded to 'wav' and/or another sound file format as required. Then a random number was chosen every once in a while to determine which particular joke to encode as a sound file. Then, when you call the, 'Joke line' a script is called to determine which file to play via 'espeak', 'festival', or any other speech synthesis software. Obviously, I tried playing around with speech recognition but when using the phone as a microphone on a network with 'jumpy' traffic on a VoIP based phone system this can make things a bit difficult. Maybe when I find myself on a network with more managable traffic I'll continue this line of research? Some of the results were very interesting. If I remember correctly though my experiments seemed to suggest that the load ratio would be about 30 people to a single server (Dual Xeon 2.8/4GB/10K SAS) before there would be a drastic drop in performance if I was thinking about completely automated phone based interviewing (a tangent that I was thinking about when I was working on web based interviewing technology (auto-generated code which worked around existing survey scripting languages) which was backwards compatible with SPSS Quancept scripts). Below are some of the notes from my research.


- http://www.voip-info.org/wiki/view/Asterisk+cmd+Festival, text2wave is basically a wrapper script for festival. Uses a LISP type language?
- init.scm and .festivalrc are two config files that are read at initialisation
- Utterance structure, http://www.cstr.ed.ac.uk/projects/festival/manual/festival_14.html
- english.wav is
Audio,araw,Mono,22050Hz,16
- jokes-clean.wav is
Audio,araw,Mono,8000Hz,16
man

- sox foo-in.wav -r 8000 -c 1 -s -w foo-out.wav resample -ql

; ######################################
; English Accent
; ######################################

exten => *777,1,Answer
exten => *777,2,Wait(1)
exten => *777,3,NoOp
exten => *777,4,System(/usr/bin/english)
exten => *777,5,Playback(/tmp/english-out)
exten => *777,6,Hangup
-
translates a sound file in SUN Sparc .AU format into a Microsoft .WAV file, while
sox -v 0.5 file.au -r 12000 file.wav mask
- notes to self, 8000Hz is completely incomprehensible, 22000Hz is much more realistic sample rate

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Sunday, August 7, 2011

Server and Link Load Balancers

Once upon a time I worked in a company that had multiple terminal servers. It soon became apparent that they weren't balanced in terms of work load. Due to financial constraints I ended up writing a fairly simple load balancer which is being augmented over time as tme permits (the basic structure of the original script will be posted to my GitHub and/or website eventually). The way it works is fairly simple. A fixed number of servers which is listed in a hash/dictionary data structure is iterated over. If the socket connections can be made to all servers than a naive algorithm which is composed of a random number which is 'mod' by the total number of servers is used in order to decide which server to connect to. However, obviously if a server/servers are down then these are removed from the data structure. Subsequent revisions have involved automatically mapping the network using NMAP, gaining server status information using WMI/SNMP,and storing/updating this data using SQLite to achieve a drop-in software based load balancer (the original script/program was written using a combination of Python and Perl but I may assimilate and/or port it to another language if and when appropiate).

If you do have the resources it may be worthwhile exploring some of the commercially available systems. Many of these options and other mature software based load balancing options are listed in, "Building a Cloud Computing Service", http://dtbnguyen.blogspot.com
The interesting thing though is how there is an increasing trend towards multi-level load balancing and redundancy. For example, application servers are often able to maintain state so that users do not have to re-login during server capitulation and obviously there many layer 3/4 load balancers available as well. In fact, even consumer networking companies are creating their own products nowadays.

http://haproxy.1wt.eu/

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Open Source Financial Trading

Recently, I've been speaking to some people in the trading/finance industry. One thing which struck me was the nature of software and how most of it was built in house due to its domain specificity. Recently though, its become fairly obvious that this is beginning to change. There have been attempts by various people to Open Source software that is capable of completing such transactions. Some of these are highly specific while others are more general to allow you to add modules of your own to suit your application Obviously, there will be some differences with regards to their suitability for simulations and the real world as well.

http://www.fixprotocol.org/fast

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Unlocking Your Phone/Modem

It used to be the case that unlocking a communications device could only be done by a service provider for a fairly hefty fee. Now, most devices can be unlocked for minimal cost with only the IMEI number from the device and a program that can be purchased for a nominal fee or even free from the Internet (or increasingly even the handset/service provider). Of course there are other methods as well as such as re-flashing the device with generic firmware. I've also seen Universal SIM card holders/convertors which may require trimming/cutting your SIM card which brings me to another point. One of the more interesting technologies that I've seen is a dual SIM card holder which can be used in your phone in order to provide you with the ability to be able to make/listen to multiple calls at the same time.

All this said, please ensure that your device supports the frequencies required by the network that you subsequently need/want to use.

http://forums.whirlpool.net.au/archive/1262036

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Tuesday, July 26, 2011

GroupWare Evaluation

This project was borne from the fact that the company wanted an inexpensive option/s with regards to intra-company communication. To this end we looked as both Open Source webmail, groupware, and solutions that were currently available. Note that these results were from an evaluation of the primary options that were available about 1.5 years from the date of publication of this particular post and may or may not be applicable to your particular situation or needs. Please do your own due diligence.

Zimbra
Seems quite responsive but not sure of the specifcations on their evaluation box. Standard/Advanced GUI that are accessible at the touch of a button. When installed on local (desktop) class hardware was not as responsive as expected. Checked minimum/recommended specifications for hardware and project does not seem feasible from a financial perspective any longer. Even when looking at minimum specifications on their website they seem to be far in excess of the financial resources available to this company. Great desktop client although it does seem to be resource intensive on our Dell GX260/270/280's. Obviously one of the first real Open Source alternatives as well so has a strong development history and community behind it.


Horde
Has most of the capabilities that we require but doesn't integrate particularly well with Outlook. Obviously there is the learning curve problem with regards to the web based interface. What we currently use but based on user feedback it could be better. Latest version has come quite a long way. Suprisingly, synchronisation with your PDA is a realistic/simple option now.


OpenGroupWare
Only took a very cursory look at this. LiveCD in German. Interface was unwelcoming and highly doubt that users will be inclined to use it. Did not continue with evaluation. Moreover, project seems to have become dormant. Last post on homepage for website seems to be from 2009. Does provide integration with various MUA's though.


Exchange
Basically, this is what our users want but due to financial contraints we are unable to pursue it as our network is composed of a number of Linux servers as well as a small number of Windows based terminal servers which can not be re-deployed to meet GroupWare needs. Moreover, the price of properly specified hardware for a Windows based server that is able to run Exchange does not fit into our budget. We calculate that that the project may range anywhere between five and six figures depending on whether or not we factor in future expansion needs.

http://www.microsoft.com/exchange/en-us/default.aspx

Zarafa
The fact that this software is an atrociously good representation of Microsoft Exchange has done it many favours. Basically works on top of existing Linux stack with a web based interface on top. Just like Exchange though uses MAPI error codes which can be almost impossible to decipher without a proper reference source. During evaluation we discovered that some services may need to be restarted to ensure proper/continuous operatation without intervention but we believe that this may have more to do with mis-configuration since there doesn't seem to be many other users online experiencing this same problem at this stage. Strong integration with Outlook but does seem to have a few problems with offline caching mode which we later decided to turn off (may be fixed by the time of publication of this post). Pricing is reasonable (four to five figures).


OpenXchange
Web interface reminiscent of Exchange. Pricing structure is reasonable (four figures). Has Outlook plugin to allow for better integration. A possible contender but was not mature as Zarafa was at the time of evaluation. Pricing is reasonable at first glance.

http://oxpedia.org/index.php?title=Main_Page_AE#quickinstall

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Introduction to Modern Finance

While finance/trading/commerce has existed for several thousand years, never has the number of financial and type of options available been so extravagant and exotic. Below is a reading list of the basic asset classes and some of the terms that you will commonly find in today's financial markets. This list will be updated over time.

http://idm.net.au/article/trading-titans%E2%80%99-clash-swords-discovery-clash

- as usual thanks to all of the individuals and groups who purchase and use my goods and services
http://sites.google.com/site/dtbnguyen/
http://dtbnguyen.blogspot.com.au/

Friday, July 22, 2011

WAN Acceleration on a Budget

Once upon a time computers were completely independent. With the advent of networking (especially the Internet) latency, bandwith, and redundancy are playing increasingly important roles. This is where WAN optimisation technology comes in. Depending on its configuration it can be configured to act as a proxy, and/or a reverse proxy or even in multi-node configuration that is used to accelerate LAN (most likely between multiple sides/nodes in a VPN) as well as WAN traffic. There are obviously many different vendors attempting to sell there wares which include hardware appliances, virtualised appliances, as well as complete software solutions whether they are installed on a dedicated server and/or your local desktop. Based on what I've seen they operate on multiple levels that may be protocol dependent and/or not. Below are some of the more inexpensive options out there along with premium options further down.



Sane and Sensible Hierarchies/Organisational Structures, Random Stuff, and More

- in this post we'll look at professional sports and other fields and how stuff from that field can be used in the business world and ho...