Saturday, December 10, 2011

How to dismiss a window without a close button

The installation of Offisync left a window displayed on the screen without a close or minimize button. It's annoying since that window blocks almost 30% of the viewable area of the screen. The Applicatons tab in task manager doesn't show any trace about it. I had to resort to Process Explorer, which has a nice function called "Find Handle or DLL..." with a hotkey (CTRL+F). After I pushed CTRL+F key, I entered "Offisync" as the handle or DLL substring to search and the result returned has a process of Rundll.exe, which I killed to dismiss the window. 

Sunday, November 27, 2011

Notes on Nissan Quest 2008

Friday, November 25, 2011

USB loaders on Wii system menu 4.3U

The following are collected from various internet resources and I take no credit or responsibility on their effects or consequences. Below is a list of softmode guide applicable to any system menu version (4.3 and below).

USB LOADERs can load and launch all your favorite game backups from a USB hard drive, which may contain a primary partition formatted as WBFS or FAT32 or NTFS (no need to repartition the drive for Wii at all). They will work with official firmware 4.3 with a proper cIOS (e.g. cIOS 222). The cIOS gives HomeBrew access to the USB drive and the DVD drive, among other things. This allows the USB loaders to create/run backup games on/from your USB drive. No need to downgrade the firmware to 4.1.

  1. Enable Homebrew on a Wii. LetterBomb is a known IOS exploit working on system 4.3U without any game.  Download the HackMii installer V0.8 and have it ready before starting LetterBomb.
  2. Install the Homebrew channel V1.0.8 as part of the HackMii installer (as well as BootMii) following the LetterBomb instruction here.
  3. Restore the Trucha bug to IOS36, which enables installation of cIOS
    • Download DOP-Mii V16 from here (note NOT the WiiBrew Edition) and put the DOP-Mii subfolder (containing boot.dol) under apps folder of the SD card. Start DOP-Mii via Homebrew channel.
    • Follow the instruction here to restore the Trucha bug. Note when prompted for file source, select Load WAD from SD Card (instead of Downloading from NUS). The WAD files (IOS15*,IOS36*,IOS38*.wad)  can be obtained from the WeHackWii package.
    • Go on with the above instruction to uninstall stub IOS 222 and make space for cIOS 222
  4. Install the hermes cIOS 222, which gives USB loaders access to the USB drive and the DVD drive
    • Remove all GameCube memory cards and controllers
    • Download hermes cIOS Installer 5.1 and put the subfolder containing the file boot.dol under apps folder of the SD card. Start the installer from the HomeBrew channel
    • Select <IOS 36> with Trucha bug to run the installer and install custom IOS 222 using IOS 38 (default).
  5. USB loaders can now run properly from cIOS 222. No need to install cIOS 249.
  6. Install the USB loaders (USB loader GX as an example)
    • Download the USB loader GX v2.3 here and put the usbloader_gx subfolder (containing boot.dol) under apps folder of the SD card. Start it from the HomeBrew channel
    • The starting IOS in the loader setting may need to be changed to IOS 222 for faster load
    1. Download Priiloader V0.7 here and install it from HomeBrew channel
    2. Download the forwarder DOL for USB loader GX and install it within Priiloader. The forwarder may need to be named as boot.dol and placed in usbloader_gx subfolder under apps for installation. The original boot.dol should be renamed and is needed in later step.
    3. In Priiloader Settings, set Autoboot to Installed file and Return to Autoboot.
    4. Restore the original boot.dol of the USB loader GX (renamed in Step 2 above)
    5. Wii now boots straight into USB loader GX. Want to change Priiloader settings? Power Wii on while holding down the reset button on the Wii console and it will boot into the Priiloader main menu

Wednesday, November 16, 2011

Notes on my Palm Pixi Plus

  • Update the WebOS software without incurring data usage
    Today when I tried to activate my new Pixi plus on Page plus, it prompted me to update the WebOS software after activation and I could NOT bypass it. Since I only have two dollars balance on the account, I don't want the software update to deplete the cash balance. I powered it off at the prompt and used webdoctor to update its WebOS to (downloaded from this link). When the device restarts after the webdoctor update, it no longer prompts me to update software and now I can turn on WiFi and turn off its data usage.
  • Turn off data usage
    • Tap on the green Phone button at left bottom corner to open Phone app
    • Open the application menu and tap Preferences
    • Under Network, set data usage to OFF
  • Access the USB update mode for webdoctor
    • First power off the device
    • Connector the USB cable directly to a USB port of a computer but not to the device
    • Press and hold the power and volume up buttons until we see the large USB icon.
    • Connect the USB data cable to the device
  • Turn on the developer mode
    • Type the following on the main screen after unlocking the screen
      upupdowndownleftrightleftrightbastart to launch developer mode icon
    • Press on that icon to enable developer mode. Your device will prompt you to restart in order to complete the process
  • Turn on the USB passthrough/DIAG mode
    Go to the Phone app and type ##USBPASS# (##8727277#). A bar call ed "USB Passthrough Control" will appear and ask for DIAG authorization code. Enter the code generated with the SN number of the phone by PrePassThroughKeygen and configure the USB port 1 mode to DIAG (others are none).
  • Back gesture in an APP
    Before I know the back gesture, I was closing the APP and re-launch it to get back to the main screen of the APP. The following is taken from the above link, "Make the back gesture from right to left anywhere in the gesture area. Back takes you up a level from a detailed view to a more general view of the application you're working in. For example, when you finish reading an email message, make the back gesture to close the message and return to your list of messages. Or when you finish writing a memo, make the back gesture to close and save the memo and return to the display of all your memos. When you make the back gesture in an application and only one screen of that app is open, you minimize the app and go back to Card view. In Web, the back gesture performs the same function as the back button on the browser, allowing you to move back through previously viewed pages."
  • Check the recondition date and status (Reverse Logistics Support)
    Enter ##786# in the phone app and you'll see a comprehensive list of phone parameters displayed including
    • ACTDATE: date of activation
    • MSID
    • RECONDDATE: empty for a non-refurbished phone
    • RECONDSTATUS: no for a non-refurbished phone
    • MEID: ESN(HEX) of the phone
    • MDN: page plus phone number
  • WebOS Quick Install (WOSQI)
    • USB mode for WOSQI: When there is a prompt on the device for the USB mode, I tap on "Just Charge". I only switch it to USB drive mode when necessary since packages won't install properly from WOSQI if the device is on USB drive mode. 
    •  Install Preware: Click on the third button (shown next) to obtain a list of packages available for directly download and installation from internet. Search for Preware and select it then click on the Install button. It should take less than a minute to finish if the device is not on the USB drive mode.
    • Uninstall packages or patches: Select the menu item Tools->Device Management (shown below) for this task.

Friday, November 11, 2011

Change MAC address of an interaface in Mandriva

First I tried the command
ifconfig eth1 hw ether 00:01:02:03:04:05
and I got the following error

SIOCSIFHWADDR: Device or resource busy
Then I tried the following command
ifconfig eth1 down hw ether 00:01:02:03:04:05 
ifup eth1
and it worked!

I also updated the file /etc/iftab with the new MAC address for eth1. Otherwise the system will be confused after a reboot.

Monday, October 24, 2011

Shorewall rules for blocking intra-zone traffic

According to the manual of shorewall-rules, when all is used either in the SOURCE or DEST column intra-zone traffic is not affected. When all+ is used, intra-zone traffic is affected. Therefore, the following rule blocks access from IP of loc zone to all other zones (including the network interface of the firewall running shorewall on the loc zone)
DROP    loc:       all+

Saturday, October 22, 2011

Webdoctor on my HP TouchPad

Today is 10/22/2011 and I learned a lesson after installing an updated version of Advanced reset options (and the 5 packages it depends on) patch through preware,  which wiped all my installed apps out of my TouchPad (TP). I finally decided to doctor back to WebOS 3.0.2. Since the my palm account only allows me to restore 3.0.4 with webdoctor, I did the following instead.
  • Backup my data from Settings -> Backup (Important)
  • Put my TP into USB update mode
  • Run Webdoctor 3.0.2 downloaded from here with the following command
    java -jar "path of doctor-file"
  • Webdoctor actually failed at the first time I ran it and gave me an error says "Failed to reset the device"
  • Run webdoctor again and now it starts to flash
  • See the message "Reset Complete" from webdoctor and TP reboots
  • My TP is back in WebOS 3.0.2 and click on the "Done" button of the webdoctor.

    Now the TP had updated itself to 3.0.4 through OTA, I updated the kernel through preware. And I had to remove the Advanced reset options first.

Free XLS/XLSX to CSV/TEXT file converter

I found the utility bundled in the perl module Spreadsheet::Read is pretty good. It actually uses Spreadsheet::ParseExcel or Spreadsheet::XLSX to read Microsoft Excel files. Its main utility is xlscat and a wrapper xls2csv. It can read both XLS (excel 2003 and before) and XLSX (excel 2007 and beyond) files but not XLSM (macro enabled excel workbook) files yet. It can output in different text file formats

usage: xlscat [-s ] [-L] [-n] [-A] [-u] [ Selection ] file.xls
              [-c | -m]                 [-u] [ Selection ] file.xls
               -i                            [ -S sheets ] file.xls
    Generic options:
       -v[#]       Set verbose level (xlscat)
       -d[#]       Set debug   level (Spreadsheet::Read)
       -u          Use unformatted values
       --noclip    Do not strip empty sheets and
                   trailing empty rows and columns
        -e     Set encoding for input and output
        -b     Set encoding for input
        -a     Set encoding for output
    Input CSV:
       --in-sep=c  Set input sep_char for CSV
    Input XLS:
       --dtfmt=fmt Specify the default date format to replace 'm-d-yy'
                   the default replacement is 'yyyy-mm-dd'

    Output Text (default):
       -s     Use separator . Default is TAB \t, \n allowed
       -L          Line up the columns
       -n          Number lines (prefix with column number)
       -A          Show field attributes in ANSI escapes
    Output Index only:
       -i          Show sheet names and size only
    Output CSV:
       -c          Output CSV, separator = ','
       -m          Output CSV, separator = ';'

    Output HTML:
       -H          Output HTML
       -S Only print sheets . 'all' is a valid set
                   Default only prints the first sheet
       -R    Only print rows    . Default is 'all'
       -C    Only print columns . Default is 'all'
       -F    Only fields e.g. -FA3,B16

Therefore to read rows 5-100 in first worksheet of file in.xlsx and output as semi-colon delimited file out.csv
xlscat -m -R 5-100 in.xlsx > out.csv
When there isn't a output format option, xlscat defaults to use "|" as delimiter and I found it's more convenient to use TAB (\t) as the delimiter. Therefore I changed the program of /usr/local/bin/xlscat at line 129 to
defined $opt_s or $opt_s = "\t";
After the above change, I can use the following command to read rows 50-100 in first worksheet of file in.xlsx and output as TAB (\t) delimited file out.csv
xlscat -R 50-100 in.xlsx > out.csv

PBO loses settings when power cycled

Starting from this week, I noticed that my Patriot Box Office (PBO) asked me to select language and time and network settings every time when it came out of the stand-by mode or power cycle. I tried downgrading the firmware back to P02 then flashed back to P70R2(BCN) but that didn't fix the problem.

I telnet to the BOX and found the file for the above settings is located at
and every time  when the PBO is turned on, this file is recreated upon user selections. I found the reason is most likely that the partition /usr/local/etc/ is full and the Setup file can't be saved to disk when powered off. Below is the result from df showing exactly that.
# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                78.6M     71.0M   7.6M  90% /
/dev/mtdblock/2          69.1M     69.1M      0 100% /usr/local/etc
/dev/rd/0                40.0k     40.0k      0 100% /mnt/rd

I deleted some RSS files I added and then did a du on the disk usage of partition /usr/local/etc

/usr/local/etc # du -d 1
54      ./playlist
874     ./dvdplayer
14      ./hdd.old
36660   ./linked
23827   ./mos
11      ./ppp
1962    ./srjg
2       ./lost+found
63419   .

The two biggest subfolders are linked (>30MB) and mos (>20MB). I found there are some redundant executables in


So I deleted those files and replace them with symbolic links to files in /usr/local/etc/mos/rssex2/bin/ After doing this, I now have roughly 7.5MB space in /usr/local/etc again.

 # df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                78.6M     71.0M      7.6M  90% /
/dev/mtdblock/2          69.1M     61.6M      7.5M  89% /usr/local/etc
/dev/rd/0                40.0k     40.0k         0 100% /mnt/rd

And PBO can save the Setup file correctly and no longer asks me to do initial setups.

Friday, October 21, 2011

use Urpmi to upgrade perl

Perform the following in the specified order to prevent breaking urpmi
  •  Always upgrade urpmi first
    urpmi urpmi
  • Use rpm to query all installed perl packages and display only package names (without distributions)
    rpm -qa --qf '%{name}\n' | grep -i perl
  • Feed the results of the above query to urpmi (to upgrade all perl related packages)
    urpmi `rpm -qa --qf '%{name}\n' | grep -i perl`

Tuesday, October 11, 2011

NT ACL on Samba

  • Enable ACL support in the file system by remounting it with acl option. ACL must be enabled in a file system before Samba can use it.
    mount -o remount,acl /home
  • Enable acl support during boot time with the following in the /etc/fstab
    LABEL=/home /home ext4 noatime,acl 1 2
  • Enable acl support in Samba on a per share basis with the following in /etc/samba/smb.conf (typically already enabled by default)
    nt acl support = yes
    acl map full control = yes
  • Set the setgid bit for the directory
    chmod g+s /home
  • Have the following in /etc/samba/smb.conf
    inherit acls = Yes
    delete readonly = Yes
  • Check the ACL of current directory
    getfacl .
  • Set a default group (manager) ACL for files created in /home
    setfacl -m d:g::---,d:g:manager:r-x /home
  • Copy the ACL from a template folder to /home
    getfacl /template | setfacl -M - /home
    There's a warning of "getfacl: Removing leading '/' from absolute path names" from the above command, which can be safely ignored.


Monday, October 10, 2011

Shorewall rule for a particular time period

I found from the manual for /etc/shorewall/rules that Shorewall can have rules active on a particular time period of each day or particular days of the week or month, or a range defined by dates and times if supported by the kernel and iptables. The following can be checked:
#shorewall show capabilities | grep Time
   Time Match: Available
#rpm -qa | grep shorewall

#uname -r

The TIME field should be the 12th field in the rules file (after the CONNLIMIT field and before the HEADERS field). The following creates a rule blocking a local IP address of from accessing internet at 18:45-21:00 every day in my local time (instead of UTC).
DROP loc: all all - - - - - - - timestart=18:45&timestop=21:00&localtz
#service shorewall reload 
#iptables -L | grep TIME 
DROP all -- anywhere TIME from 18:45:00 to 21:00:00
DROP all -- anywhere TIME from 18:45:00 to 21:00:00
DROP all -- anywhere TIME from 18:45:00 to 21:00:00
DROP all -- anywhere TIME from 18:45:00 to 21:00:00

Thursday, October 6, 2011

Notes on xmgrace

  • Hotkeys:
    • Ctrl L: Move current graph legend
    • Ctrl M: Move an object
    • Ctrl T: Place timestamp
  • Set font color for plot legend
    • Click on the plot and prefix the legend string by \R{red} (for red color)
  • Transform axis tick label from length to angle in degree (acceptable expressions)
  • Set the number of decimal digits to N on the transformed axis tick labels
    I had to multiply the result by 10^N and round it to an integer then divide by 10^N. For e.g. the following will set the number of decimal digits to to 2

Tuesday, September 27, 2011

Cannot connect to X server localhost:11.0 error

Today when I try to install a program that has a GUI via SSH client, I received the following error:

_X11TransSocketINETConnect: Can't get address for localhost
egs_install_Linux_self.exe: cannot connect to X server localhost:11.0

I checked the X11 forward setting of sshd server and client and both are correct.

cat /etc/ssh/sshd_config | grep X11Forward
X11Forwarding yes

set | grep DISPLAY

It seems from the error message the program has difficulty resolving the address localhost therefore I also checked /etc/hosts file and ping localhost also works fine.

cat /etc/hosts | grep localhost               localhost.localdomain localhost
Now the problem seems to be that the program to be installed doesn't understand the DISPLAY env set as localhost:11.0. Therefore I ran the following after I sshed to the host
export DISPLAY=
and the program now works

Sunday, September 25, 2011

Convert file encodings between UTF-8 and GB2312

  1. Check the encoding of a file with enca utility
    enca home.php
    Universal transformation format 8 bits; UTF-8
  2. Convert the encoding of the file with the GNU iconv utility (-c  omit invalid characters from output, -f from-encoding, -t to-encoding)
    iconv -c -f utf-8 -t gb2312 home.php > home.php.GB2312

Friday, September 23, 2011

Notes on my WD TV Live

  • Remote key sequence to start flashing firmware (without connecting to a TV or monitor)
    Load the firmware (wdtvlive.bin, wdtvlive.ver and wdtvlive.fff) files into a USB stick and I use a flash drive with a LED indicator, which blinks while being accessed.
    1. Plug the USB stick into the left side USB port and the stick is being accessed for a few seconds as indicated by the LED of the USB stick. 
    2. Push the Right arrow then Enter key on the remote. 
    3. Check the LED of the USB stick to see whether it's being accessed. If NOT, go back to repeat step 2. Otherwise go to next step.
    4. WDTV will reboot and flash the firmware. Wait until it's completed.
  • Command line to start flashing firmware (did NOT work for me)
    run_all upgrade
    /dev/sda1 wdtvlive.bin &

    Others had succeeded after killing some running processes as in this post.
  • Latest WDLXTV firmware version I know of is 1.05.04_V_WDLXTV.COM_WDLXTV_LIVE-
I found in this post the following changes were implemented since version - 2011-09-21
  * enable usb 5V bus power off + deep sleep mode (b-rad)
  * allow 'hot plug' of MSHEETDIR (b-rad)
  * lots of extra logging, bug report fattened (b-rad)
  * Issues:
  ** WDLXTV-PLUS DOES NOT SUPPORT 3TB HDD'S!!!! Tell WD you want this fixed (with netflix too)!!!
  **** The GPL wdtvlive2.fff is 6mo old and lacks support for 3TB hdd's + it deletes netflix keys!
  **** Email WD and tell them you want Netflix + WDLXTV + 3TB hdd support
  ** 1.05.04 dmaosd requests up to 65 search/related/etc results from
  **** YouTube at a time. If you have youtubeHD enabled, you might
  **** notice sluggishness with rapid fire YouTubage
  ** if you enable EIRI buttons down, right, & up buttons don't work on stock remote
  * For base firmware differences see:
  *** - 2011-09-15
  * assembly code patch to fix ISO's stopping working after playing a few (b-rad)
  * inotifywait-3.14 included to clean up the mess left over by the OSD when ISO's are stopped (b-rad)
  * stuck at 0% upgrade fix (b-rad)
  * localizations updated new: swedish, serbian, greek, catalan, netherlands, slovenian, danish, dutch, & slovakian
  * aufs included (b-rad)
  * linksheets converted to aufs to save memory (b-rad)
  * MSHEETDIR disables automagic linksheets scan (b-rad)
  * fix fuse module (b-rad)
  * ntfs-3g removed from automagic filesystem detection (b-rad)
  * bi2 fixes (b-rad)
  * fix upnp-cmd to support wireless interfaces (b-rad)
  * fix webend pw change not working on 1.05.04 (b-rad)
  * apache & mt-daapd init.d tweaks (b-rad)
  * added sparse mount option to ntfs (b-rad)
  * xml fix 1.05.04 video playback options menu data disappearing (2d)
  * various xml fixes (jumbalaya)

Monday, September 19, 2011

Stop annoying password prompt dialog from Outlook in windows 7

From last week, my outlook 2007 started popping up a dialog asking for username and password while trying to receive POP3 emails from Yahoo small business email servers. The annoying dialog may pop up as frequent as the Send/Receive frequency set in Outlook (in my case every 3 minutes) and it will pop-up again even if the correct username/password is entered and saving the password is checked in the dialog.

I did an investigation and this method seems to work, at least for me. The steps are summarized below:
  1. Close/kill outlook.
  2. Type the following in Start->Run (Windows+R key) or search box
    A explorer window will pop up showing the contents of the above folder
  3. Look for a folder named as the SID of the logged on user (starting with something like S-1-5-21-) and rename it by appending .old or -old to its name.
  4. Start outlook and enter the username/password when prompted (check to save the passwords by outlook) and the above folder will be recreated.
  5. Sit back and relax.

Saturday, September 17, 2011

gvoice login error

My pygooglevoice 0.5 suddenly stopped working and if I run gvoice at the command line like
 # gvoice -b -e -p wtfpasswd call 18664254745 1CALLBKNUMBER 3
I got a error saying Login failed.

I found at this thread that it's probably due to recent changes in the Google voice web login interface. And after I have the following in the file /usr/lib/python2.7/site-packages/googlevoice/ (the folder might be python2.6 depending on the python version installed), it works again and gvoice can dial out without any problems
LOGIN = ''

Notes on Windows

  • How to reset/kill a non-responsive remote desktop session remotely
    Occasionally I see the following error when I try to connect the remote desktop 
    The requested operation cannot be completed because the Terminal connection is currently busy processing a connect operation
    When that happens, terminal services typically reject any new sessions.
    1. One may use the query command to get session ID and reset command to reset the session as found in this post.
    2. Alternatively one may use the tasklist and taskkill commands to kill the process that hangs the terminal services as found in this post.
  • How to use more than 4 GB memory with 32-bit windows 7/vista kernel
    I found the method from this post, which is applicable to both windows 7 SP1 and windows vista 32-bit. We know a PAE address is 37-bit long, which implies an address space of 2^37=128GB. As we know windows server 2003 (32-bit) may use 64 GB memory, in principle any PAE enabled kernel should be able to do that. After booting from a "true" PAE kernel, all 8GB memory installed was recognized by windows 7 (32-bit) and 7.74 GB is usable as shown below.
After dataram's ramdisk is activated with a 3GB ramdisk, task manager found that windows 7 (32-bit) used 4.68GB memory and 3126MB memory is avaible as shown below. 

Saturday, September 3, 2011

Notes on my Patriot Box Office (PBO)

  1. Flush lastest yaffs2 firmware (official SquashFS firmware image is NOT moddable):
    One must downgrade to P02 official firmware first before flashing the following moddable firmware. Otherwise it may brick the PBO with a small PBO logo shown on the TV after booting. 
  2. Debrick PBO without a USB-TTL cable:
    There's a reset switch SW3 on the circuit board of PBO without any physical connector soldered onto it. The switch SW3 can be used to initiate an emergency flashing after the PBO is bricked without using a USB-TTL cable.

    • Detach the PCB from the box and expose the reset switch SW3. I had to unscrew about 10 screws.
    • Put the PCB assembly on a piece of plastic bag and power it on.
    • Plug in a USB flash drive with official P02 install.img into the front panel USB port
    • Short the two soldering pads of SW3 circled in the picture above briefly. I shorted the two pads with a metal wire very briefly and I can see PBO reboots immediately and starts to read the firmware from the flash drive. 
    • Firmware flashing will be completed after rebooting twice.
  3. Latest moddable megapack firmware

    BETA.P70R2(BCN).megapack Moddable bootcode neutral

    Only the megapack has ipkg-cl for optware installation so get the megapack. It may take 10-15 minutes to flash a moddable firmware so be patient and don't turn off PBO until the flashing is completed.
  4. Install ipkg
    mkdir /tmp/hdd/root/opt
    mount -o remount,rw /
    ln -sf /tmp/hdd/root/opt /opt
    mount -o remount,r /
    mkdir /opt/tmp
    cd /opt/tmp
    ipkg-cl install uclibc-opt_0.9.28-13_mipsel.ipk
    ipkg-cl install ipkg-opt_0.99.163-10_mipsel.ipk
    rm *.ipk
  5. Install Vsftpd
    cd /opt/tmp
    ipkg-cl install vsftpd_
    rm *.ipk
    cd /opt/etc
    mv vsftpd.conf vsftpd.conf.orig

     Create my own vsftpd.conf to allow root user login
    cat vsftpd.conf
    ftpd_banner=Welcome to My PBO.

    Now create the log folder and set up root directory
    mkdir -p /opt/var/log
    mount -o remount,rw /

    modify /etc/passwd and change the home directory for root user to be / (from empty)
    cat /etc/passwd | grep root:
    mount -o remount,r /
    /opt/sbin/vsftpd /opt/etc/vsftpd.conf &

    Now ftp login as user root (empty password).
    I also start vsftpd at boot by adding this line to the end of /usr/local/etc/rcS
    /opt/sbin/vsftpd /opt/etc/vsftpd.conf &
  6. Customize IMS feeds
    Modify the file /usr/local/etc/dvdplayer/savedrss/scripts/menu.rss or wget from a web server hosting the modified menu.rss. (Power cycle the PBO by the remote if the root IMS menu is not refreshed after the modification.)

Saturday, August 27, 2011

Notes on my HP TouchPad (TP)

  • Install Novacom driver in windows 7 64-bit for touchpad
    Download the Universal Novacom Installer (UNI) v1.2.1  and click on the UniversalNovacomInstaller.jar file. Click the button "Install Novacom" then click on the button "Select file..." and select the previously downloaded webdoctor jar file for the touchpad. (e.g. webosdoctorp302hstnhwifi.jar). The driver installation will then start and complete. 
  • Install CyanogenMod (CM) 9 on touchpad and dual-boot WebOs and CM9
    ACMEInstaller2 is necessary for CM9 and can be downloaded here. If ACMEInstaller was used, ACMEUninstaller needs to be run to repair, which can be downloaded from the same link.
    Full update guide on CyanogenMod wiki (all the download links for the tools worked for me)
    Guide on webosnation with more detailed instructions
  • Power on the touchpad from shutdown
    Holding down both Power button and Home (center) button until the HP logo is shown on the screen (about 10 seconds)
  • Access the USB update (bootie) mode for webdoctor
    • First power off the TP (device info->reset options->shut down)
    • Connector the USB cable directly to a USB port of a computer but not to the TP
    • Press and hold the power and volume up buttons until we see the large USB icon.
    • Connect the USB data cable to the device
  • Turn on the developer mode
    • Tap on the "just type" box on my TP and type webos20090606 to launch developer mode dialog
    • Click on the submit button
    • Close the developer mode dialog (Don't Set/Change Password)
  • WebOS Quick Install (WOSQI)
    • Freeze after the touchpad is connected: Most likely you set a password for developer mode as I did. For WOSQI 4.2.3, I found there's a workaround. After the TP is connected to a Windows PC and WOSQI appears to freeze, I run the task manger on the Windows PC and kill the process named novacom (note NOT the process novacomd). Then WOSQI will prompt you to enter the password for the developer mode and memorize it. Now if you close the WOSQI and open the WOSQI again, it will not freeze anymore.
    • TP USB mode for WOSQI: When there is a prompt on the TP for the USB mode, I tap on "Cancel" or "Just Charge". I only switch it to USB drive mode when necessary since packages won't install properly from WOSQI if TP is on USB drive mode. 
    •  Install Preware: Click on the third button (shown next) to obtain a list of packages available for directly download and installation from internet. Search for Preware and select it then click on the Install button. It should take less than a minute to finish if TP is not on the USB drive mode.
    • Uninstall packages or patches: Select the menu item Tools->Device Management (shown below) for this task.

  • Performance tuning of TP (detailed instructions click here)
    • minimize or eliminate logging
    • overclock TP with uberkernel and Govnah (default to 1.5 GHz)
  • Terminal session (Terminal app)
    • Linux Commnadline of WOSQI: Select the menu item Tools->Linux Commandline (shown below) for a terminal session as root user

      Somehow I couldn't make xorg-tools to work properly in it. So I had to find an alternative as shown below. 
    • OpenSSH: I install OpenSSH from Preware and start the SSH server on TP. In order to connect to the SSH server on TP, I generated keys from Linux Commnadline of WOSQI with the method described here. I then use the file id_rsa copied from /media/internal/ as identity with my SSH client on my Windows PC. It works like a charm with SSH 2 protocol, PublicKey authentication. I also installed nano editor from Preware for text editing in the terminal session.
    • XTerm: I also installed XTerm (it needs xecutah and XServer) from Preware and I can use the on-screen virtual keyboard to enter commands without using a bluetooth keyboard in XTerm.
    • SDL Terminal app: I couldn't install it from Preware. It seems to install from WOSQI, but it won't run at all.
    • Autostart OpenSSH server upon device restart
      • Upstart script needs to be in /etc/event.d/ folder
        cp /media/cryptofs/apps/usr/palm/applications/mobi.optware.openssh/upstart/mobi.optware.openssh /etc/event.d/
    • Kernel installation
      • Feeds for 3.0.2-36 uberkernel and patches

      • Postinit error when I tried to install 3.0.2 kernels (uber or Palm)
        Unable to run command: IPKG_OFFLINE_ROOT=/media/cryptofs/apps /bin/sh /media/cryptofs/apps/usr/lib/ipkg/info/org.webosinternals.kernels.uber-kernel-touchpad.postinst 2>&1
      Kernel is not compatible with this webOS version, aborting
      Then I discovered my planned upgrade to WebOS 3.0.2 on TP didn't finish properly so it's still in WebOS 3.0.0. I had to install the Palm Kernel (TouchPad) V3.0.0-1 to recover the original kernel from the following feeds
      and then run the System Updates again to update the WebOS version to 3.0.2 68.
    • Access Windows shares on NAS or PC from TP (detailed instructions click here)
      • uberkernel (as of version 3.0.2-36) has CIFS support
      • uberkernel (as of version 3.0.2-52) has NLS UTF-8 support
    • Access media from local network server
      • UPnP media server: MediaTomb
      • Media player app: BHome/Pro
        • Since Version 1.2.1 BHome is able to use an external video player such as TouchPlayer to play media file formats which are not inherently supported by WebOS (in Preference->VIDEO->Use TouchPlayer)
        • Transcoding at the UPnP server is no longer necessary since TouchPlayer supports virtually all media file formats (avi, mkv, divx, flac, rmvb)
    • Make the advanced browser the default  browser (not working for WebOS 3.0.4)
      The following can swap the roles of the WebOS built-in browser and the Makesoft advanced browser after a Luna restart
      • Change the id field of /media/cryptofs/apps/usr/palm/applications/com.maklesoft.browser/appinfo.json to
      • Change the id field of /usr/palm/applications/ to com.maklesoft.browser
    • Video Formats supported by WebOS
      Below is the output from the TP built-in ffmpeg -formats
    • Play media files from CIFS shares by Kalemsoft media player
      • The CIFS shares need to be mounted in the jailed folder. Execute the following commands in TP shell before running the media player.
        mkdir -p /var/palm/jail/com.kalemsoft.ksmplayer/media/internal
        chown -R 6917:5000 /var/palm/jail/com.kalemsoft.ksmplayer
        mount /var/palm/jail/com.kalemsoft.ksmplayer/media/internal
        mount /var/palm/jail/com.kalemsoft.ksmplayer/media/internal/nas

        The following should be in /etc/fstab
        /dev/mapper/store-media /var/palm/jail/com.kalemsoft.ksmplayer/media/internal vfat noauto,rw
        //nas/share /var/palm/jail/com.kalemsoft.ksmplayer/media/internal/nas cifs noauto,iocharset=utf8,username=USERNAME,password=PASSWORD 0 0
        If the media player has already run at least once, only the commands in bold color are necessary.
    • Build/extract an IPK file from an installed package: Ipk Packager
      • Copy the app folder under /media/cryptofs/apps/usr/palm/applications to a PC
      • Run Ipk packager from the PC
      • Pack the folder into an IPK file
    • Useful shell commands
      • restart Luna (GUI) from command line: initctl stop LunaSysMgr && initctl start LunaSysMgr 
      • restart device: reboot
    • Best free radio streaming app from App Catalog
      • TuneIn Radio: Listen live to your favorite radio stations, DJs and programs and find new ones on local, global and Internet radio. Find your faves with over 40,000 channels of music, sports, news, podcasts, and national networks like NPR and SWR. TuneIn for HP WebOS is powered by RadioTime.
      • Public Radio: Contains webcasts from over 250 public / non-profit radio stations here in the US. National Public Radio (NPR), American Public Media (APM), British Broadcasting Corporation (BBC), etc. When first launched, it will automatically find the station closest to you (using GPS).

    Tuesday, April 26, 2011

    Tuning network(TCP) in windows 7

    • To show the TCP global settings:
      netsh interface tcp show global
      Querying active state...

      TCP Global Parameters
      Receive-Side Scaling State          : enabled
      Chimney Offload State               : automatic
      NetDMA State                        : enabled
      Direct Cache Acess (DCA)            : enabled
      Receive Window Auto-Tuning Level    : normal
      Add-On Congestion Control Provider  : ctcp
      ECN Capability                      : disabled
      RFC 1323 Timestamps                 : disabled
      ** The above autotuninglevel setting is the result of Windows Scaling heuristics

      overriding any local/policy configuration on at least one profile.
    • To enable CTCP:
      netsh interface tcp set global congestionprovider=ctcp
      To disabled CTCP:
      netsh interface tcp set global congestionprovider=none
    • Disable Green Ethernet in Realtek NIC driver advanced properties. 
    • Measure the hard disk (drive letter c) throughput in windows vista/7
      winsat disk -drive c
    • Reference: Windows 7, Vista, 2008 Tweaks