Translate

Thursday, June 21, 2012

The Logitech saga ...

OK. Let me state as first thing, that Logitech is NOT paying me for this   :)
I love this company ! So far everything I have from Logitech is working flawlessly, from my keyboard, mouse, TV universal remote (series Harmony ... REALLY Neat !) and of course my SqueezeBox.
(well .. Mr. Logitech ... I would not be offended if you want to contribute somehow :) )

Time ago I posted some information about the SqueezeBox internet radio and it's Logitech Media Server code.
Just remember that I don't use Windows, so everything in these articles assumes we are talking about Linux. Specifically the Logitech Media Server was installed previously over an Ubuntu 10.04 distro, now is running over a CentOS 5.x one.

This time I want to discuss a little bit more about the server and other projects around it.
First of all, the SqueezeBox is still working quite great !
I updated the server and the firmware a couple of time and few days ago I decided to move the server on another machine.
Why ?  well, just to optimize the resources and free up a little bit the machine previously hosting the server.

Logitech Media Server


So I downloaded the latest version of the code and installed it from the scratch on a different machine (always on my network).
Initially it was not recognized by the SqueezeBox so I checked some things.
Here some hints and things to check :

  • Be sure that the linux machine where the Logitech Media Server  is installed has the port 9000 and 3843 open
  • Be sure that the directory where the music is stored, has the right permissions.
    The permission should be assigned to the user squeezeboxserver (created automatically during the server installation)
  • Check that the server is actually running
    I had some permission set wrong so the server crashed because it could not access the music folder for the scan
  • Give some time !!  There are some timeout involved in the system, so there is some time (15 minutes or more) before the SqueezeBox sees the server
Also remember that any time you change the Logitech Media Server code, a new firmware is loaded in the SqueezeBox !
My current version of the Logitech Media Server is the 7.7.2



SoftSqueeze

While waiting for the SqueezeBox to see the server, I found another very interesting project : SoftSqueeze.
SoftSqueeze is an open source project aimed to reproduce a SqueezeBox on a PC.
Very neat !
It requires to have Java installed.

Use on Ubuntu 10.04

I installed it very simply downloading the RPM from the website and converted it (with alien) in DEB.
Then simply I installed it.
On my machine (Ubuntu 10.04) the DEB installed the main access to the program it in the /opt/softsqueeze directory.
So in order to run it, is possible to open a terminal and then digit : /opt/softsqueeze/softsqueeze

If is working, it's easy to add an icon in a panel. In this case pointing in the /opt/softsqueeze/softsqueeze/lib is possible to find some icons.


After the installation SoftSqueeze recognized the server using the server name I assigned it.
However it was not working.

In order to have it working I had to force the IP address of the server, instead the name of the server found automatically. It is possible that is due to the fact the version of the player (SoftSqueeze) installed is optimized for the server version 7.5.x and I installed the latest one, 7.7.x.


Anyway after forcing the local IP of the server, the player started to work immediately.
So now the new server recognize the SqueezeBox and SoftSqueeze without problems.

Use on Kubuntu 12.04


I have a laptop with installed Kubuntu 12.04 (it uses KDE).
I just copied the DEB package created with alien and installed via the standard package installer.
Same identical procedure and problems find on Ubuntu.
After forcing the IP address of the server instead the found name, started to work perfectly !
Very very neat !

Like the Ubuntu 10.04, I created a link to the application and is working without problems.
So a new way to hear my collection in streaming !

Hope this can help somebody :)

Tuesday, June 5, 2012

Messages between computers (Linux)

In the era of internet, sometime small needs are solved using complicate applications, when "old" but more functional solutions are available.
If, like me, somebody has the need to exchange quick messages between users inside a LAN, here an easy and functional solution.

Problem

To better define the problem, the need is to be able to send to a user on a computer in the LAN, a brief message.
It is assumed the computer running Linux (Ubuntu).
The user doesn't have to start any application nor do something.
Ideally a "popup" window with the message appears on the screen.

Solution

Two programs are needed and "usually" they are installed by default in a standard Ubuntu and Kubuntu distribution.
It is possible to use other programs, but these two are quite easy to use and the "popup" effect is nice.
In order to receive messages, EACH computer we want be able to do so, need to have a "daemon" running.

Here some pro and cons

Pro

  • easy to implement
  • no special programs to install
  • transparent to the user
Cons
  • it is necessary to know the IP address of the computer where to send the message
    If the computer has a fixed IP is not a big deal. In a DHCP environment it could be a problem
  • it address the machine, not the user so it is implicit only ONE user is using the machine
  • ending the process that sends messages, ends also the receiver
  • in order to send more than one message, the receiver needs to acknowledge the messages hitting OK

Prerequisites

I'm assuming :
  • you are capable to open a terminal
  • you are capable to open an editor 
  • you are capable to change file properties
  • you are capable to install programs
  • you don't run in the church if you hear the word "daemon"
  • you have admin permission
If you don't understand one of more of the above prerequisites, then better to ask somebody that understand that to set up the system.

Creating the daemon


The daemon is a program that is running in background. In this case the daemon is a bash script.
Here a step by step guide to create the daemon. Remember, this must be done on each computer we want to be able to receive messages.
Of course is possible to prepare the script somewhere else and copy it on the computer.
Again, it is assumed we are using Ubuntu or Kubuntu with zenity and netcat installed.
  1. open a terminal
    You should end up in your  default home directory
  2. open an editor, for example
    $ vim bkmsg.sh
  3. insert in the file these lines :
    #!/bin/bash
    msgport=3564
    nc -l $msgport | while read message; do zenity --info --text "$message"; done
  4. save the file
  5. make the file executable
    $ chmod +x bkmsg.sh
At this point we have the daemon script ready.
To test it, simply run it in background from the terminal : $ ./bkmsg.sh &
Then open another terminal and digit : nc localhost 3564
When you hit Enter, everything you type until the next Enter, will be sent as message and a popup window will appear.
To stop to send messages, simply hit Ctrl-C.

It is important to understand that even if the script is running in background, closing the terminal where the daemon was started, will end the daemon.

Installing the daemon


We need to have the daemon installed and run automatically.
To do so, we need to put our script in the startup list of application.
Be aware that ending the process that sends messages, ends also the daemon !

Sending messages


In order to send a message to the machine, it is necessary to know :

  1. the IP address of the machine where to send the message
  2. the port used to send message (the one in the script, in the example above it would be 3564
The is enough to open a terminal and digit :

$ nc ip_address_where_to_send_the_msg port

For example if the machine has the IP address 192.168.1.134 and the port the one of the example :

$ nc 192.168.1.134 3564

After that every thing written will be sent to the remote machine after hitting the key Enter.
To close the process, hit Ctrl-D or Ctrl-C.
Be careful that doing so, will close also the daemon on the remote machine !

Wednesday, May 30, 2012

The Rain Barrel project - intro

Arkansas is a nice place to live, but is HOT !
It means that a lot of water is used just to water plants, grass and .. vegetables !
Sure is possible to do a lot in this area, thus the idea to deploy a rain barrel for at least some "important" plants.
The project is modular and mostly will depends about the available resources.

Here some basic ideas and practical notes about the project.

The idea 


The idea is to buy a rain barrel and attach it to the gutter spout for the main water supply.
Then attach a low pressure drip irrigation system controlled by a valve and an electronic circuit.

The problem

In order to attach a low pressure  drip irrigation system, it is necessary to put in the system a specific amount of water pressure.
Gravity controlled rain barrels can work, but it necessary to have at least 10 meters (35 feet) of  difference in height between the sprinkler and the rain barrel.
It is necessary a more sophisticated system in order to bring water to the sprinkler system.
For example a pump is necessary.

The project

This project is about to build a low cost/high efficient  system, using a rain barrel as main tank, filled by rain via a spout.
There are different problems to address :

  • bring the water to the plants using a drop irrigation system
    This is necessary in order  to bring the right amount of water where is needed, without dispersing water on unused soil. To do so :
  • a pump is necessary, since the water coming out from the barrel, has not enough pressure to correctly drive a drop irrigation system
  • this imply to have a way to detect if there is water on the rain barrel and eventually connect to the main water grid to continue the watering
  • in order to use the right amount of water, sensors needs to be deployed in the places where the plants are
  • eventually a solar panel and a battery can be used to power the system, making it autonomous.

First test

In order to experiment and better define the project requirements, it is necessary to start  to have at least a rain barrel and start to monitor some basic data, like how much water can be collected on average, how much water is used by a drop irrigation system, how much water is needed by some plants, and so on.
The first "brick" is of course the rain barrel and the water collection system.

Installing the rain barrel

The first rain barrel used for the plant and for the tests, is a 76 gallons foldable one, found on-sale on the Improvements catalog .

After put it together, it is necessary to found a level spot close to the gutter, where to place it.
In my case, under the deck, just close to a gutter, there is enough flat space where to install it.

Impressions

Easy to put together. The plastic is very thick. 
Seems quite stable on the final place. Easy access to the spigot that is threaded and with also an adapter to connet a "bare" rubber hose.
The spigot and adapter are in plastic, not sure how long they can survive the hot conditions.
No leaking so far.

Execution

The rain barrel needs to stay on a flat surface. It MUST not tilt so a flat surface is mandatory.
Under the deck there is a nice flat area, but is too far from the gutter and thus it will be too far from the rain diverter.
The rain barrel needs to stay no more than 2 feet from the gutter and there the area is not flat.
Even worse there is a piece of  concrete slab close to the house wall, so  it is necessary to build a retainer wall in order to raise the soil over the concrete slab and finally level it !
So the first thing to do, is to create a level terrain big enough to support the rain barrel.


This is the area where to place the rain barrel
Marking the place where to put the rain barrel.

Close to the gutter there is a concrete slab, so it is mandatory to raise the terrain in order to create a solid and flat space for the rain barrel.  


Above, building the retainer wall with some "left over" blocks used for the frontyard  retainer walls.


Here how the rain barrel is placed on it's new base.

Next step, connecting it to the gutter via a rain diverter.





Installation rain diverter

The second task to do, is to buy and install a "rain diverter" for the gutter, in order to bring the water coming from the roof, into the rain barrel.

Choosing the rain diverter 

After some searches, I choose the Fiskars Diverter Pro .

Two main reasons to choose this diverter :

  1. The availability from a place where I had some credit
  2. Good feedback from other users
  3. The dimensions of the gutters
    My gutters are actually 3" x 4" and the standard residential should be 3" x 2"
    This one is natively a 3" x 4" with adapters for the the smaller ones, so I should be covered.   

Installing the rain diverter

The rain diverter must be placed so that the pipe going in the rain barrel, remains horizontal.
This is necessary because when the rain barrel is full, the backflow force the extra rain to go  back into the gutter, preventing flooding from the rain barrel.

Following the instructions come with the rain diverter, I cut out a piece of gutter and then inserted the rain diverter.
The job was relatively easy but not too much easy.
Good idea to wear thick working gloves when handling gutters and trying to push the two end of the rain diverter in it ! :)
Here a sequence of pictures showing the installation of the rain diverter.

Cutting the gutter


The diverter inserted


Some tests


There are some small leaking areas that I will fix with some silicon as soon as the weather allows to do so, but generally speaking it works nice.
Now I can start to monitor if is working properly and how long can take to fill up the rain barrel.


Quick update (June 5, 2012)

We had finally some rain so I was eager to check if everything was working.
I noticed that not too much water was entering in the barrel and I discovered the cause.
The rain diverter need to be screwed to the gutter in 4 places.
2 screws in the upper part and 2 in the bottom. If the screws in the bottom part are too tight, the plastic body of the rain diverter deform itself a little. But is enough to have it bent in the wrong direction !
The solution was to unscrew and screw back with less force, in order to don't deform the diverter.
The transparent plastic cover is a good indicator of deformation. If the body is not deformed, the transparent plastic cover is covering the hole uniformly.
Another important thing to do, is to add some mosquito killer drug in the rain barrel.

Quick update (June 12, 2012)

We had finally some more rain !
This time everything worked like a charm ! The rain barrel is full, no leaking and the overflow worked perfectly ! 

Quick update (June 14, 2012)

First test.
Connected an hose to the rain barrel "as is". With the rain barrel full there was enough pressure (downhill) to have some water coming out. Of course absolutely now way to be able to connect any sprinkler or drop irrigation system.  It was enough to have some plants watered.
Because the impossibility to control the amount of water, this is a really inefficient way to use the water. 

Quick update (June 16, 2012)

First test with the pump.
In order to connect a drop irrigation system to the rain barrel, it is necessary to use a pump since it is necessary to have at least 20 psi of pressure.
A Shurflo pump (2088-488 model) was temporary connected to the rain barrel, with adapters GHT->NPT and NPT->GHT.
The garden hose was connected to the pump.
Limiting the output of the hose was possible to increase the pressure.
The next test is to create a drop irrigation system and see if the pump can correctly drive it.
Problems to solve :
  • the spigot is really poor quality. There are leaking all over the place after the spigot.
  • the water need to be treated with some chemicals.
    The anti mosquito seems working but the very hot weather allows for algae to grow.
    The water starts to smell.
  • with the average rain we are having, 76 gallons are totally insufficient to water the plants more than 3 days ! 

Quick update (June 8, 2014)

The barrel survived so far two winters.
The dirt in the water seems stabilized, i.e. it is a lot but is not a problem to use the water.
It is always necessary to add chemical for the mosquitos.
Honestly the rain pattern on the long run, prevent a real useful use of the rain barrel.
It is always necessary to integrate with the faucet so unless to expand it A LOT, is quite impractical and not beneficial.

Stay tuned !


Thursday, May 3, 2012

YAAA - Yet Another Android Article




Android, the platform to develop mobile applications.
Is time to start to play with that.

It is assumed starting knowing  nothing  about Android.

The first thing is to have some documentation about Android in order to learn about it.
There are a lot of books and documentation out there, so I just started to grab something, possibly free (no resources to invest in that :) ).
As introduction, also if is an old book, this PDF book  can be useful, at least to have some basics idea about Android.
Of course there is the official updated Google documentation where to start, but I have to admit sometime a book is better as starting point. 

Basically to start to develop for Android, at least three things are needed :  

  • The Android SDK  
  • Java SDK
  • Eclipse plus Android plugins
Eclipse is actually suggested, is not mandatory, but since many examples and documentation assume Eclipse to be used, so it is :)
This article assumes the development host to be a Linux one (Ubuntu 10.04 and 12.04)

Installation

First of course download the latest versions of the software to be installed.
The system I used to install Android the first time, documented in this article, is a quad processor Dell computer, with Ubuntu 10.04 installed.
I was able to install the Android development software over a Kubuntu 12.04 following the procedure described on this article.


Java JDK

Java can be the critical part of the system and MUST BE present before to install the rest of the environment.
Probably Java already exists on the development machine, but it is possible is an old one or incompatible one with the Android SDK.
So the first thing to do is to verify if :

  • Java already exists on the machine
  • if the installed version is a JDK version (the JRE version is not enough)
  • if the installed version is compatible with Android SDK 
  • eventually remove it and install the latest one
To verify what version of Java is installed on the machine (Linux only) ope a terminal and digit :

$ java -version
In my case I had :
steve@Oliver3:~$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.13) (6b20-1.9.13-0ubuntu1~10.04.1)
OpenJDK Server VM (build 19.0-b09, mixed mode)
steve@Oliver3:~$ 
The documentation about Android specify to have Java 1.5 or 1.6 and the  JDK version, so I should be OK.
The latest JDK  is available at this URL.
The first choice, the Java JDK, must be chosen.
In my case I selected this one :
http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html 
After downloaded it I exctracted it in the /home/steve/Android directory but NOT installed for the moment since I assume the one already installed is OK.

CAUTION !  In some distributions Java JDK from Sun/Oracle is not available anymore !
In this case the OpenJDK is the "official" release to use with Android ! 

 Android SDK

The Android SDK contains all the Java libraries to develop for Android plus tools to compile and debug the code, i.e. an Android simulator.  So in theory there is no need to have a specific hardware (see note) in order to install and develop under Android.

The latest  SDK can be download from the official Android  website.
Choose the SDK version for your system. In my case I choose the Linux one.
Create a directory somewhere on your disk where to exctract the tarball. I created :

 /home/steve/Android  and exctracted the tarball into  android-sdk-linux.

Tip
Can be useful to have the SDK tools in the path. Many sources suggest to create a system variable called ANDROID_SDK and add it to the main path.
Edit  the .profile file (in the main user home - for example in my case : /home/steve/.profile) and add :

export ANDROID_SDK="/home/steve/Android/android-sdk-linux"
export PATH="$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools"

Save the file. The next time the system starts the Android SDK path will be available, with also the system variable ANDROID_SDK. 
  
Then, after reading the  SDK Readme.txt file, I opened a terminal and run the android program under tool :
$ cd /home/steve/Android/android-sdk-linux/tools/./android   (or if the path is set, ./android)

The program is needed in order to "populate" the SDK. The SDK exctracted is moslty empty.
By default  is marked for installation the latest Andorid SDK, at the time of this article, the 4.0.3.
Follow the instructions and install it (select Accept all)
I choose to install also the documentation. The installation tooks few minutes and of course is necessary to be online since everything needed is downloaded from Google.
Here a screenshot after the installation :


Note : at the installation time I didn't have ANY Android hardware. Having a specific hardware it means to select the version of Android capable to run on a specific one, not necessarily the latest one will work on a specific hardware !!

It is possible to install more than one Android API version and actually is one thing necessary to have.
The project usually uses the correct version as defined in the project parameters.  
To select the correct API to use for a project, go in the Project menu', select Properties and then choose Android.

The API in use for the project is stored in the file project.properties in the project root. 

Eclipse

The last tool to have is Eclipse.
As said before is not mandatory, but since many examples and tools that simplify the life are based on Eclipse, I choose to install it and use it.
As suggested in the eBook, at the URL  is possible to download Eclipse.
There are many different choices. I choose the "basic" Java version called Eclipse Classic. 
After downloading it, I exctracted in the /home/steve/Android/eclipse directory.
To start it, is enough to go in the eclipse directory and start ... eclipse :)
The first thing to do is to create a workplace for Eclipse. I created mine in the /home/steve/Android/Workplace directory.

Configuration


There are some plug-ins for Eclipse that  integrate the Android SDK and facilitate to create Android applications.
The indications on the book are not exactly precise since the version of Eclipse is quite different.
So basically, from within Eclipse, go to the Help menu, select Install New Software.
A windows appears :


In the box Work with, digit the address of the repository for the Eclispe plug in for Android :
https://dl-ssl.google.com/android/eclipse/
In the box below (Name) will appears the possible plug-ins. Mark them all then click on Next and follows the instructions. 
After the installation Eclipse need to be restarted. After that it will asks for the Android SDK.


Since I already installed the SDK, I selected the Use existing SDKs and browse for the main directory of it.
Follows the instructions to complete the binding between Eclipse and Android SDK.
After this point, Eclipse is ready to be used to develop and debug Android applications.

Saturday, February 18, 2012

GXV3140 - Update (02/2012)



The GXV3140 is the latest IP phone from GrandStream.
Here some updated notes since the original post and impressions about this new phone.

Positive things

As I mentioned in the original post, the screen activation based on some motion, is really a nice thing.
When in front of the phone is possible to see information about the status of the line or the time (yeah, I love watches :) ) and if nobody is there ... black screen.

Skype is working well. The quality of audio and video is really good also with Skype.

Also the normal calls with SIP are really high quality.

Negative things


Most of the time the phone is working well, however it is less stable and reliable than the older GXV3000 series.
The GXV3140 crashed at least 4 or 5 times since I activated it.
So far I observed that the crash happens when Skype is activated (i.e. logged in).
Some times it was enough trying to place a call to trigger a crash.  In one occasion I had the phone crash without doing any operation, probably after 2 days of continuous log-in to Skype.
Usually the crash manifest itself with a "frozen" system, i.e. the display shows something but the phone is totally non-responsive.
The only thing to do is to unplug the power, wait few seconds and then reconnect the power.

It would be interesting monitor the IP traffic to the phone to see if the crash is due from attempts to attack the phone.
Skype is notoriously dangerous, I don't think the phone is "smart" enough to protect itself.

Another annoying characteristic is the menu' to place a call.
To place a call, assuming to have the number in the phonebook, is necessary to press a lot of buttons, much more than the GXV3000.
First the phonebook button, then select the user, then press the F1 (assigned to the call function), then select if the call is only audio or audio/video and then finally the call is placed.
Really time wasting.

Still remains the impossibility to change some  parameters in the phone. Probably a factory reset is necessary but so far I didn't spend time on that.
Maybe one of these days.

The automatic gain of the camera is quite annoying.
It's enough to move little bit far from the phone during a call to have the image transmitted to become totally dark. I did try also other settings but the final effect is not better.

Skype doesn't support conferences. That would be quite useful.

Sunday, February 5, 2012

Alphaline and Sears

A tale of trust.   I want to share my experience with Sears. The last one.
Back in December 2011 I wanted to buy a new Mp3 player for my daughter.
I went around for a while, on-line and in shops, to see what was available on the market.
As usual the budget was not very high, so I spent some time looking for models and brands.

One day I went to Sears and saw a small touch screen Alphaline MP3 player, not too much expensive (less than 70$) and with all the requirements.



Alphaline was a brand never heard .. I usually am very suspicious about new strange brand, but I trusted Sears.
Sears always stayed back on what they sell.  So I bought it !
It worked OK, nothing spectacular but enough to have the job done.

Already guess what happened ?
Yep, after just about a month the MP3 player  become a nice small brick.
Loss totally of the memory.
Everything hardware seems working but there is no real firmware in the unit, so the only thing you can do is turn it on, watch the splash-screen and then  look a a nice piece of useless plastic and metal.

I tried to contact the  Alphaline customer support via email .. AHAHAHAHAHAH .. no answer.
Then I went to Sears, asking for a replacement, since the receipt stated that I had time until March 19 2012 to return or exchange the player.
Of course it was a lie. For the electronics, only 30 days are allowed .. small printed on the back of the receipt, so of course in the store they refused to do anything.
The clerk in the store suggested to call the Alphaline support. AHAHAHAHAHA

Back home I called the Alphaline support ... that doesn't exist.
Sears answered the call.  A brief chat to discover that :

  • they don't have ANY number or contact  Alphaline  (I seriously doubt it ever existed !)
  • Alphaline discontinued some services to Sears ... maybe a diplomatic way to say that this "company" doesn't exists anymore
  • the warranty office at Sears can not handle warranty problems via phone (!!!!) .. wonder what they do.
  • I should go back to the store and asking to talk with the store manager .. AHAHAHAHAH
Soooooo what is the lesson learned ?
First of all, always trust the instinct.
If a brand sounds phony, not reliable .. is because IT IS !  No matter where it is sold.
The store that sell crap is not more serious of the "company" who produce crap.
Sears had a name to be a serious company, a one that stands behind what it's sell.
Well .. NOT ANYMORE !  
For me  the bigger assets of a company is the NAME and the TRUST.
Maybe the greed changed also this company that I always considered reliable.

To recap .. I gained a piece of crap, trashed away some money, I can not fix the player since the producer doesn't exist anymore and Sears is willing to do absolutely nothing about that.
So Mr. Sears ... I guess there is a reason if your business is not very healthy lately.
I lost 60$ .. you lost reputation, name and a customer.  Was it worth ?

Selling crap and not willing to accept responsibility  it means only one thing :  another customer that say to you bye bye.
It will be my pleasure to advertise what happened and warn people that buying electronic stuff at Sears is only trashing away money.   I will not do the same mistake twice.

Eventually .. if somebody out there has a working version of the Alphaline MP4 player, model 18281, could he/she tries to backup the content of the memory, compress it and sends it to me ? :)
Not the contents ! Only the "system" stuff.
Actually I strongly suggest to ANYBODY that has such model to do a backup !!  One day you could turn on your player and discover that become a nice piece of brick.

Friday, December 30, 2011

GrandStream GXV3140



The GXV3140 is the latest IP phone from GrandStream.
Here some notes and impressions about this new phone.

First of all, the first impression is about a more professional phone.
More slim and slick, nice to see.  The screen is definitively better than the GXV3000, but smaller.
High resolution. And also the web pages used to set up the phone, are definitively "professional looking" and better organized than the older series.

So, here some pro and cons, compared mostly with the GXV3000.

Pro
  • professional looking
  • a lot, really a LOT, of functionalities  (IP radio, YouTube viewer, Skype, social networks (fb/Twitter/IM/ecc.), browser, ecc. ecc.)
  • doesn't require to be booted after every change of parameter !!
  • the screen saver is interrupted if the phone detect movement !!!! This is nice !!!
  • better organization of the screen
  • high definition video, is feasible to watch a movie
  • nice sound, both for music/movies and phone calls
  • WiFi as optional
Cons
  • much more complex to use, so I don't think is a phone suitable for non-technological people
  • a lot of functionalities but hardly multitask .. so is not possible for example hearing the IP radio and navigate with the browser
  • without an external keyboard many functionalities are limited
  • is not storing passwords for skype
  • some settings are "stuck" and is not possible to change them (bug ?)
  • different format of the xml file for the phonebook, so is not possible to share the one used for the GXV3000
Compatibility

So far I was able to use the phone with the services I normally use with the GXV3000.
No problem at all to call and receive calls from the other GXV3000 using different VoIP providers.
Fully compatible with Asterisk too, like the GXV3000.
And it has also Skype functionality !! It means that it can handle 3 VoIP providers SIP based PLUS Skype.

System data

Here some data about the phone :

Product Model :
GXV3140

Hardware Revision :
V0.4A

Version :
1.0.7.2

Core Version :
1.0.7.4

DSP Version :
1.0.5.21

Base Version :
1.0.7.36

Program Version :
1.0.7.50

GUI-A Version :
1.0.7.2

GUI-B Version :
1.0.7.3

Recovery Version :
1.0.7.1



Here the first update.

Thursday, December 15, 2011

GrandStream GXV3000


Short review of  the SIP videophone GrandStream GXV3000.

The GXV3000 is one of the cheap SIP videophone on the market.
Is produced by the GrandStream and is on the market for many years.
There are already a lot of information on the net about this phone, so I'm not attempting to describe the product, rather I want to point out some good qualities and some problems this phone has.

Why this phone ?

Years ago I started to build a private network, in order to talk with other family members and to close friends.
In order to cut the costs,  but still having a decent way to communicate, I opted for the VoIP.
Initially I considered Skype, but there were some security and usability issues ... for example the necessity to have a computer always on, running Skype.
People not accustomed to computer surely would have problems to handle such media.

So instead to look for a computer based solution, I started to look for a VoIP phone.
VoIP phones are now quite easy to find nowadays, and they can be really cheap, but at the time, about 6 years ago, the choice was limited and quite expensive.
Especially for a video phone.

After looking around for a while, the choice was the GXV3000, because relatively cheap and with some nice features.

The network

One of the main characteristic I looked for the phone, was the compatibility with the SIP standard.
Having a standard appliance means to have the capability to choose different VoIP providers.
The GXV3000 has the capability to support 3 distinct VoIP providers and this is quite important, since during the years  some providers can  close or they can have  problems, so it is important to always have a backup line in order to be able to call somebody.
I also set up a my PABX based on Asterisk, so to have always a backup line and the capability to use the GXV3000 as an interfonic system in the house.

The setting

Each GXV3000 of the network is set up to use 3 different VoIP providers, one of them is my Asterisk server.
It is possible to assign most of the configuration parameters using the menu on the phone, but is much more comfortable to use the web access.
Each GXV3000 has a web server inside, to easily allow to access all the phone parameters.
Each phone has it's own IP address. Assigned via DHCP by default or can be forced manually.
I chose on the phones in my local network, to assign manually the IP addresses, because in this way is easy to associate a specific IP to a phone in a specific location.
The phone in my office it will always be accessible at a specific IP and so on.
But the DHCP assignment works nicely too.

To access the setting page to the phone, is enough to open a browser (Firefox, Chrome, others) and enter the IP address of the phone.
So for example, assuming to have a phone with the IP address equal to 192.168.1.10, is enough to go on the browser and enter in the URL area : http://192.168.1.10
This is what will come out :


Each phone requires a password in order to access the parameters.
By default the password is "admin".
After entering the password different pages will allow to set up all the phone parameters.
Caution ! In order to do so you need to be familiar with the SIP protocol characteristics and the provider setting.

The web setting possibility is very important because allow the administrator of the network to set up also the remote phones. However, for security reasons, it is important to set the remote system (router) to open a specific port and set the phone to accept remote management only through that port.

I'm not describing here all the possibilities. There is a well done user manual that describes in details the meaning of each parameter.
The suggestion is ... READ IT !  It will saves a lot of troubles ! Believe me !

The Pro and Cons

Well, the phone so far has a more than positive result.
In all these years I had NO dead phones. They are working 24/7, 365 days year and they still works nicely. I'm talking about a fleet of 20 phones.

Different matter for the power supply.
The power supply of the phone is quite weak. On an average of 3 years, usually 1 power supply dies.
It is tricky though to figure it out, because they don't die suddenly, but they "degrade" after some time until they reach the point where the phone is not working anymore.
The first sign of the power supply degradation, is the LCD back-light flickering when there is an incoming call.
Usually it starts just noticeable, then after some months the effect is clearly visible and weeks after, the phone starts to act strange, sometime freeze, sometime lose settings.

So if something like that happens, DON'T PANIC !!! Is not the phone broken, only the power supply.
Any power supply capable to give 12V at 1A it will work !

Other minor problems exists with some secondary features, like the integrated browser or the news feed.
Quite hard to set up and often they simply doesn't work.

To recap, let's see a simple table.

Pro
  • cheap video phone
  • decent support
  • possibility to remote management
  • lot of documentation available
  • easy to configure/manage
  • on newer models (GXV3005/GXV3006) integration with PSTN
Cons
  • power supply weak
  • some features are difficult to set up/understand 
  • some secondary features are not working
  • no WiFi enabled

Conclusion

If you need a decent VoIP video phone, without open a loan, it is the right choice.
Is not the top, some features could be done better, but it's totally capable to handle the main job.
It is a reliable phone, especially if you keep handy some spare power supply :)

Sunday, October 16, 2011

Olimex MSP430F169 LCD board


Olimex has different development platforms available for the MSP430.
One of these is the MSP430-169LCD. This article contains some notes about the board, tests operations and tips/tricks.

This development kit is very interesting.

FEATURES:

  • MCU: MSP430F169 with 60K Bytes Program Flash, 256 Bytes data Flash,2K Bytes RAM
  • NOKIA 3310 LCD 84x48 pixels black & white
  • Joystick with 4 directions and push button function
  • SD/MMC card connector
  • two LEDs: status and power
  • RESET switch
  • JTAG connector
  • 32 768 Hz oscillator crystal
  • 8Mhz crystall oscillator
  • power supply voltage regulators and filtering capacitor
  • extension headers for all uC pins
  • PCB: FR-4, 1.5 mm (0,062"), soldermask, white silkscreen component print
  • Dimensions: 67x66 mm (2.65x2.6")
On the Olimex website or the Sparkfun Electronics website , is possible to download the schematic of this board, a test program and the processor specific datasheet .

Linux development environment

First of all, I installed the mspgcc development system.
Since I use Ubuntu I installed it (another article will describe that ), then I installed the program msp430-gdbproxy and the libraries from the Soft-switch.org website.

This is very critical.
The msp430-gdbproxy must be copied in the directory where is installed the mspgcc environment (usually /usr/msp430/bin, but in my case /opt/msp430-gcc-4.4.3/bin) and the two libraries libHIL.so and libMSP430.so, must be copied in the directory /usr/lib.
It is vital to copy the program and libraries from the same site, i.e. compiled for the same version.
The mspgcc installation process already copy the libHIL.so and libMSP430.so but very likely these libraries are NOT in sync with the msp430-gdbproxy program.

JTAG test

Then I started to see if the Olimex board was working.
I connected a 9V battery to the board (Vin and GND) and the board become alive.
Then, removing the external power, I connected the board to the JTAG connector, already hooked to the parallel port of the PC.
The board come alive, since the JTAG connector, thru the jumper P-IN (inserted by default), bring the power.

At this point, following the instructions found on the Develissimo website and from this article on the MSP430 development environment , I started the msp430-gdbproxy in a terminal.
The first time I had strange error, so I reset the board and something started finally to work.
However using the suggested command :

#msp430-gdbproxy --port=2000 msp430

I obtained this error :

debug: MSP430_Configure()
error: msp430-gdbproxy: unable to open debugger connection. Will restart

I spent quite some time tracking this error but the only thing I realized, was that the error was somehow related to the TCP port used or about some conflict with other services or the Linux configuration.
Then I started to read the mspgcc documentation and I found some notes about the msp430-gdbproxy .
In the notes it was suggested to try the command:

#msp430-gdbproxy --debug msp430

and it worked !
Only I noted that the default port was not 2000 but 2001 !
So I modified the original command using the new port :

#msp430-gdbproxy --port=2001 msp430

and ... voila' !!!
I was able to connect the Olimex board with the JTAG.


So to recap, in order to open a debug session with the card :

  • connect the Olimex board to the Jtag (parallel version)
  • open a terminal and start the gdb proxy :
    msp430-gdbproxy --port=2001 msp430
    Note ! If is not working is possible to use sudo, but in this case the absolute path of the msp430-gdbproxy must be issued.
    For example in my case : sudo /opt/msp430-gcc-4.4.3/bin/msp430-gdbproxy msp430
  • open another terminal, or a tab in the already opened, and start the gdb :
    msp430-gdb name_program_to_load.elf
Inside the gdb digit help for generic help.
Here some common operations :
  1. connect to the board (first thing to do)
    target remote localhost:2001
  2. erase the flash memory (needed to do every time before to load the new code)
    monitor erase
  3. load a program in the flash
    load name_program_to_load.elf (or .a43)
Converting the demo code

The first test is to convert the IAR demo code available for this board, for the mspgcc.
Following the conversion rules , it is possible to compile with mspgcc the code.
To simplify the process I created a makefile. Looking at what files the IAR used to create the code, I created a simple makefile :

CC=msp430-gcc
CFLAGS=-O0 -Wall -g -mmcu=msp430x169

OBJS=main.o mmc.o system.o lcd_new.o

all: $(OBJS)
$(CC) $(CFLAGS) -o test.elf $(OBJS)

%.o: %.c
$(CC) $(CFLAGS) -c lt;

clean:
rm -fr main.elf $(OBJS)

To compile the code, simply open a terminal, go in the directory where there is the makefile and the source code and then :

  • $make clean
    to clean up the objects
  • $make
    to compile

The result is a file called test.elf that can be load directly using the procedure described above.
The code is running smoothly.




Joystick
Here some notes about the joystick on the board.
The joystick is seen as 5 different switches.
The higher 4 bit of the Port1 (set in I/O - input direction - MSB) are used to carry the state of the 4 direction switches and 1 bit of the Port 2 (set in I/o - input direction) is used to carry the state of the pushbutton.
Here a table :


Signal  Name  Description 
 P1.4 B1  Right
 P1.5 B2  Down
 P1.6 B3  Up
 P1.7 B4  Left
 P2.0 B5  Pushbutton 


The signals are pulled up, so when the switch is NOT pushed the reading will be high (1).
Here a Schematic to indicate the combinations of signals (remember, a 0 means the switch is pushed).







The continue line indicates the real signals, the dotted one the combinations of signals.
The inner circles indicates the name of the connection on the schematic.
Pushing the joystick on the left for example, will generate the combination of 0x7x (0111xxxx), i.e. masking the MSB will have 0x70 (01110000).
Pushing the joystick Up and Right will generate the masked combination of 0xA0 (10100000).







Here some other link to related resources and examples.