Tech Notes, Tips & Reviews

Creating GP2X video files with Mencoder

Jan 142007

undefinedHere is a simple script for converting video files for use on the GP2X, videos are scaled to 320×240 to save storage space. No error checking is included.

In a Linux console cut and paste the following code into a file and call it say gp2x-convert:

#!/bin/sh
if [ -z "$1" ]; then
echo usage: $0 source_video_file gp2x_dest_file.avi
exit
fi
INFILE=$1
OUTFILE=$2
echo $INFILE
echo $OUTFILE
/usr/bin/mencoder “$INFILE” -o “$OUTFILE” -ovc xvid -xvidencopts bitrate=320 -vop scale=320:240 -oac mp3lame -lameopts abr:br=128

Make the script executable and then run it as shown in the following example:

chmod +x gp2x-convert

./gp2x-convert sourcefile.avi destfile.avi

I would appreciate your feedback if you have comments, corrections or additions to this article, Thanks.

 

Configuring the GP2X on Mandriva 2007

Jan 042007

undefinedMy new toy is the GP2X, a linux based handheld multimedia device. It’s an awesome little device. If you want to know more about the features of the GP2X click here.

Below I have detailed the steps I made to make life easier when using the GP2X with Mandriva Linux 2007.

The GP2X can act as a standard USB storage device, allowing you to drag and drop files just like you do with a hard disk. This is good but using the USB Network feature of the GP2X is much more useful and once setup a lot easier to use. As an added bonus you can still use the GP2X while it is connected and transferring files.

Before beginning see this article at http://wiki.gp2x.org/articles/u/s/b/UsbNet_on_Linux.html and follow the instructions under “Troubleshooting”. This will make your GP2X compatible with the 2.6 Kernel of Mandriva 2007. (This step may not be necessary, but until I did this the network would lock up).

To setup the GP2X end go into “Setting” from the main menu, then select “System”, make sure “Menu Extension” is on. Scroll down to “USB Network”. Make these settings…

USB Network: Always On

IP: 192.168.0.2

FTP,Telnet Server: Always On

Samba Server: Always On

Press “B” to save the settings, there may be a slight pause while the network starts.

To setup the PC end, first create a file called “gp2x.rules” in /etc/udev/rules.d containing the following lines

# Experimental rules to automatically bring up usb0 when the GP2X is connected.
ATTRS{configuration}==”CDC Ethernet”,ATTRS{product}==”RNDIS/Ethernet Gadget”,RUN+=”/usr/bin/gp2x”

Now create a file in /usr/bin called gp2x and make it executable. (ie chmod +x /usr/bin/gp2x), with these contents:

#!/bin/sh
echo $ACTION-`date` >> /tmp/gp2x-status
if [ "$ACTION" = "add" ]
then
/sbin/ifconfig usb0 192.168.0.1 192.168.0.1
fi

Now plug in and switch on your GP2X, if all goes well in a short while you should have a network interface called usb0, check this by issuing a /sbin/ifconfig command. Now to access your GP2X you can run “telnet 192.168.0.2″, login as root, default is no password.

You can also access the GP2X samba share by running konqueror using the address smb://gp2x or open up straight into the sd card using smb://gp2x/gp2x/mnt/sd.

I’ve added two icons to my desktop to make life easier. (Right click on the desktop and select New). The first icon is an “Link to application” called “GP2X Console” which runs “/usr/bin/konsole -T GP2X -e telnet -l root 192.168.0.2″, this automatically opens up a console and logs you in. The other icon is a “Link to URL” which is called “GP2X Network” and has a location of “smb://gp2x/gp2x/mnt/sd”.

Here are the icons I used for the links:

undefinedThis one for console. (Thanks to Paul for this icon, see http://dl.openhandhelds.org/cgi-bin/gp2x.cgi?oovxdnowromm,0,0,0,8,1960 )


undefinedand this one for network, which I modified from the above icon.

 

Hope this helps. Now if someone can show me how to automatically display and remove these icons on the desktop when the GP2X is plugged /unplugged that would be great. I would appreciate your feedback if you have comments, corrections or additions to this article, Thanks.

 

Using WRT54GP2 with MyNetFone for VoIP

Dec 042006

undefinedSetting up VoIP is not always trivial, here I document the settings I used to get the Linksys WRT54GP2 wireless router to work with the MyNetFone VoIP service. Also see the support page on http://www.mynetfone.com.au for more info.

You can access the router in your browser at http://192.168.15.1 (substitute your assigned IP address if you have changed it).

Basic settings page http://192.168.15.1/Voice_Line1.htm

Display Name: 09XXXXX {Your account number}
User ID: {Same Again}
Authentication User Name: {Same Again}
Authentication Password: ************** {Your Password – Case Sensitive}
Registration / Proxy Server: sip01.mynetfone.com.au
Voice Quality: Good (G.729 Require 8k Bandwidth)

Now the trickier part, you need to go to the “hidden” page at http://192.168.15.1/Voice_adminPage.htm

Here select “Line 1″ and ensure that “Line Enable” is set to “Yes” and “Use Auth ID” is set to “No”.

Now scroll down and at “Dial Plan” enter a dial plan, something like the following should work OK (for Australia),

(*xx.|000S0|121S0|151S0|181S0|[2-9]xxxxxxxS0|0[23478]xxxxxxxxS0|0011xxx.|1800xxxxxxS0|
1300xxxxxxS0|13[1-9]xxxS0|xxx.)

Now, click “Save Settings”, if you get an error at this point, don’t worry the settings will still be saved, just wait about 10 seconds, then enter http://192.168.15.1/Voice_adminPage.htm again to see the updated settings.

That’s it, plug a telephone into Line 1 and you should get a dial tone and be able to make calls.

To setup Line 2 repeat the above steps substituting Line 2 where appropriate.