Tuesday, December 23, 2014

Fix slow USB mouse response on my Chromium OS


I have a cordless USB mouse Lenovo N50 connected to a MSI X340 laptop with Chromium OS installed on it. The same mouse works flawlessly on a Chromebook Acer C720 but it gets very slow response on the X340 with Chromium OS ArnoldTheBats build. The mouse cursor's movement on the screen always lags that of the actual mouse by noticeable amount of time. I've tried changing the mousing setting in Chromium browser or xset in console but neither worked. However, today I was able to fix it after updating the Chromium OS to the latest build by following the steps below:
  1. Set my own password for root user: Go to Developer Console in Chromium (push keys Ctrl- Alt-F2) and log in as user "chronos" with initial password "password". Then type the following command:
    sudo chromeos-setdevpasswd

    and enter the new password
  2. Become root user by typing the following command:
    sudo su

    and enter the password set in the previous step
  3. Check network status with the following command:
    ifconfig 
    In my case, the wireless interface wlan0 is not connected under developer console as no IP address is shown under wlan0. I had to connect an ethernet cable to the laptop to get interface eth0 up. 
  4. Update Chromium OS to the latest build with the following command: update_engine_client --update --omaha_url=http://chromebld.arnoldthebat.co.uk:8080/update
  5. (May not be necessary) After the above update is successful, type the following command:
    sudo stateful_update 
    In my case, this command actually failed.
  6. Try updating the system again as the previous command failed:
    update_engine_client --update
    sudo stateful_update 
    No need to supply the –omaha-url any more in future updates. It showed that the update succeeded and system needs reboot.
  7. Reboot the system and now the mouse is as responsive as on the other Chromebook
  8. Reinstall the Flash plugin: the update was 32-bit, so I used the first instruction below with the link http://goo.gl/FrT7Q6

Monday, December 22, 2014

Install Samba 4.1 AD DC on CentOS 7 with yum

CentOS 7's bundled Samba 4 does not provide Active Directory (AD) Domain Controller (DC) functionality due to the incompatibility between the Kerberos 5 libraries used by a Samba 4 AD DC (Heimdal) and those by RHEL/CentOS (MIT). However, Samba 4 binaries (rpms) compiled with Heimdal Kerberos library for CentOS 7 can be obtained from the Sernet Samba repository without the need of compiling Samba from its source code.

To download the rpm files with yum, a user account is necessary at the Sernet Samba repository. Signing up for a user account at Sernet is totally free and can be done in a minute. Upon successful registration, one can log into the portal and obtain a yum repo file with his username and password embedded in the repo URL. The repo file can be copied to /etc/yum.repos.d and one can then use yum to install the necessary rpms for a Samba 4 AD DC on CentOS 7.

If the bundled Samba 4 was installed in the system, remove it with yum first.
 yum remove samba*
The following Samba 4.1 rpms can then be installed from Sernet on CentOS 7 to enable a AD DC
sernet-samba-libs-4.1.14-9.el7.x86_64
sernet-build-key-1.1-4.noarch
sernet-samba-common-4.1.14-9.el7.x86_64
sernet-samba-libsmbclient0-4.1.14-9.el7.x86_64
sernet-samba-4.1.14-9.el7.x86_64
sernet-samba-winbind-4.1.14-9.el7.x86_64
sernet-samba-ad-4.1.14-9.el7.x86_64
sernet-samba-client-4.1.14-9.el7.x86_64


If there is existing Samba 3 NT4-style domain, it can be upgraded to AD type domain with samba-tool, which is installed as part of the packages above. The following Samba Classic Upgrade wiki guide provides excellent instructions on the upgrade. For simplicity,  one can use Samba 4's built-in DNS server for the AD DC. After the upgrade is complete, start the AD DC by
service sernet-samba-ad start
and test it following this guide.

Thursday, December 18, 2014

Value phones and inexpensive mobile family plan with 4G LTE data

A few smart phones that support 4G LTE data on Sprint's network were on sale with reasonable prices such as LG Optimus F3, LG TributeLG VoltHTC Desire 510 or Nokia Lumia 635. Their screen resolutions may not be full HD, but they have decent performance at their price range and in my opinion, they are great phones for Ting, Sprint's MVNO that has inexpensive mobile family plan.

On Ting, minutes, messages and data are pooled and shared between devices under the same account. You can have as many devices as you want on one account and each device costs $6 per month. There’s no premium charged for a mobile family plan and there isn't any weird line items on the monthly bills besides the taxes & regulatory fees. For example, to have 4 devices share 1000 minutes, 2000 global messages and 1 GB of 4G LTE data would have a total cost of $69/month plus taxes & regulatory fees at Ting, which is below $20/month per device. The 4G LTE data can be bumped to 2 GB for $10 more. At $79/month, it is still less than what I used to pay for only one device with 2 GB data at Verizon.

Most Sprint phones including these LG ones can be activated on Ting with the built-in hands-free activation after a Carrier Reset ##72786# (##SCRTN#). No flashing is necessary at all and you may also enjoy the 4G LTE data speed instantly with this phone that is not available from Page Plus or with a flashed device. If that doesn't sound good enough, Ting has started testing service on a GSM network since February 2015, which will allow both CDMA and GSM devices coexist under a single account and share a single pool of minutes, messages and megabytes.

What makes it even better is that Ting is giving out $25 credit for trying their service. The credit may be adequate for a month's free trial with Ting on one device. Click on this link to receive the promotion for $25 credit, which will show up upon successful activation.

Thursday, October 30, 2014

How to use Sprint LG Tribute with Page Plus (voice and SMS)

I bought a Sprint LG tribute this week at Bestbuy.  For $39.99, it comes with a solid specification:
  • 1.2 GHz Qualcomm Snapdragon 400 (MSM8926) quad-core
  • Android version 4.4.2
  • 4.5" diagonal LCD with 480 x 800 pixels
  • 4G LTE capability
Update: Page Plus phone activation policy is changing and will no longer allow activation of flashed devices after January 15th, 2015. However, this phone is great to use on Sprint's MVNO Ting for its inexpensive mobile family plan with 4G LTE data. No flashing is necessary at all for activating it on Ting and you may also enjoy the 4G LTE data speed instantly with this phone that is not available from Page Plus. As of now, Sprint's MVNO Ting is running a promotion with a $100 credit to new sign ups with a referral until 11:59pm EST on December 1, 2014. The credit is adequate for a few month's free trial with Ting ($12-21/month depending on usage). Click on this link to receive the promotion for $100 credit, which will show up upon successful activation.

I've had a few phones with Verizon or Page plus and like their signal coverage. Therefore I did the following to use it with Page plus:

  1. Obtain its MSL/SPC code: The MSL/SPC code of this phone may be obtained upon activation on Ting. Alternatively you can activate the phone on Ringplus with its $1.99 Kate plan after entering both its MEID and ICCID (activation would fail without ICCID) and obtained it's MSL/SPC code
  2. Enable DIAG mode (Serial/COM port): Dial ##3424# in the phone dialer then enter the MSL/SPC code obtained in the above step. Change the USB PC connection in Settings->Storage (after tapping on the menu icon ) from MTP to Charge Phone (important). If USB PC connection is MTP, the windows MTP driver instead of the serial port driver will be installed when the phone is connected to USB.
  3. Download and install the latest LG USB phone driver (LGUnitedMobileDriver_S51MAN312AP22_ML_WHQL_Ver_3.12.3.exe worked for me)
  4. Connect the phone to the PC via USB. In windows Device Manager, there is a new deivce installed as LGE AndroidNet USB Serial Port.
  5. Download and install the free software cdmaDevTerm 2.85. Extract the zip file with WinZip or 7-Zip to a folder on the hard drive and run the file cdmaDevTerm.exe.
  6. Connect to the phone by clicking on the button connect as red-boxed below. It should read out MDN/MIN and other information about the phone when connected.
  7. Change the SPC to my own (e.g. 000000).  First send the SPC code (manually enter in the box) to the phone by clicking the button send as red-boxed below. The phone should be unlocked now.
     
    Now enter my own SPC code (e.g. 000000) into the box after SPC and click on the button write as red-boxed below. The new SPC code can be read back by clicking on the button read to the left of button write
  8. Manually program the phone: (Update: It is not necessary to cancel plan at Ting or Ringplus prior to the activation of the phone at Page plus.) Activate the phone at Page plus (ESN swap for me as I had a Page Plus phone number on a old device). Obtain the MDN and MIN of the Page plus account and enter them into the two boxes (leaving the other fields unchanged). Then click the button write under the button disconnect as red-boxed below.
  9. Write a Verizon PRL to the phone: Download the PRL from internet and save to the hard drive (e.g. http://www.howardforums.com/showthread.php/1815401-Pageplus-latest-prl-hacked-for-sprint-radio-phones)
    1. Click on the select button to select the .prl file downloaded (53401_spt.prl for sprint phones worked for me)
    2. Click on the write button to write prl to the phone
  10. Reset the phone: Set the MODE of the phone to MODE_RADIO_RESET and click on the send button to reset the phone
  11. Make an outgoing call to test. Worked and also tested with receiving a SMS. The phone is working with Page plus now for voice and SMS. If for some reason, the outgoing call does not go through, repeat the step 8-11.
  12. 3G Data programming: A Verizon 3G capable phone (donor phone) that can be programmed to write new MEID/ESN and read out HA/AAA key may be necessary. The following  guides have detailed instructions on how to get PagePlus 3G data working on non-Verizon phones

Saturday, September 13, 2014

Convert a Korean speaking BlackVue DR550GW-2CH to speak English

Today I installed a BlackVue DR550GW-2CH camera on my car. However, I didn't know that its voice prompt was in Korean until I powered it on. Then I realized the DR550GW-2CH I installed came with a Korean firmware but I don't understand Korean at all. I tried upgrading its firmware to the official international firmware V2.002E but failed as the device keeps complaining "The verision information is different" (in English though) after powering on and refuses to work with this firmware on its MicroSD card.

The list below is a step-by-step guide of what I did to change its language to English (after upgrading its Korean firmware to V2.002K):
  1. Power off the DR550GW-2CH by unplugging its power cord. Wait until all the LEDs are off (and after some Korean voice prompt probably says it's powering off) and take out the microSD card. If its Korean firmware is already on V2.002K, Steps 2-4 can be skipped and jump to Step 5 directly. There is possibility that Steps 2-4 might not be necessary at all, but I did them prior to the conversion.
  2. Make a backup of all the files in the microSD card and then format the card to clean it up. I did the format with Windows explorer as shown in the screenshot below with drive letter K.
  3. Download the Korean firmware V2.002K for DR550GW-2CH from Blackvue's Korean website: Windows ZIP download link and extract the folder Blackvue and all the files within it to the root folder of microSD card (K drive in my case, and there will be a folder of K:\Blackvue after extraction). Inerst the micrSD card back to the device.
  4. Power on the device and it will say "Start upgrading" in Korean to upgrade the firmware to V2.002K. After upgrading, check to make sure the device works properly. Power off the device and take out the microSD card. 
  5. Prepare the conversion files on the microSD card as listed below
    • Download the file upload.rar from this link and extract the folder "upload" to the root folder of the microSD card (NOT under blackvue). In my case, there will be a folder of K:\upload after extraction.
    • Download the file upgrade.cgi from this link and extract the file "upgrade.cgi" to Blackvue\config. In my case, the file is in K:\Blackvue\config after extraction.
    • Inerst the micrSD card back to the device.
  6. Power on the device and push the Wi-Fi button to turn on Wi-Fi. Get on my PC with Wi-Fi connection and connect to the wireless network SSID starting with DR550GW-, the default password is blackvue
  7. Open a web browser on the same PC and copy&paste the following link then enter
    http://192.168.8.1/Config/upgrade.cgi to initial the conversion to English. Upon successful conversion, the following will be shown on the browser

    A critical function of the file upgrade.cgi is setting system_language to English in the firmware to enable upgrade to future versions of English firmware.
  8. Power cycle the device and enjoy its English voice guidance now. If English is all needed, skip Steps 9-11 and jump to Step 12.
  9. If any other language than English is needed, repeat Step 2 to clean it up. Download the English firmware V2.002E for DR550GW-2CH from Blackvue's English website: Windows ZIP download link and extract the folder Blackvue and all the files within it to the root folder of microSD card (K drive in my case, and there will be a folder of K:\Blackvue after extraction). 
  10. Run the program BlackVue\Application\Viewer for Windows\blackvue.exe in the microSD card and click on the setting icon on the right top corner. Select the desirable language and other settings (such as time zone) then save them to the microSD card.
  11. Inerst the micrSD card back to the device and power it on. It will prompt "upgrading firmware" then "restarting" after upgrade. After restarting, it will speak your language.
  12. Take a quick drive, its GPS should pick up the satellites and sync the time. 
  13. Congratulations and it's done.

Friday, May 9, 2014

Enable flash,PDF and mp3 plugin for 64-bit Chromium OS ArnoldTheBats build

Yesterday I downloaded and installed the latest 64-bit Chromium OS ArnoldTheBats daily buildCamd64OS-20140508010101.img.7zto an old laptop MSI X340. It booted into Chromium OS successfully and Wi-Fi worked well (push Fn-F8 to turn on Wi-Fi if the Wi-Fi LED is not lit). However, its web browser lacks the plugin of flash, mp3 player or PDF viewer that Chrome OS has. I had to do the following to get them to work:
  1. Login as a normal Chromium user (not a guest or a supervised one)
  2. Push Ctrl-Alt-F2 to open the developer console, where it shows "localhost login:"
  3. Enter "chronos" as the login user, "password" as the password if prompted
  4. Run the following command to become the root user
    sudo su
  5. Run the following command script as root user to enable the 64-bit flash and PDF plugin
    curl -L http://goo.gl/MuVta5 | bash
    After it downloads a file that is about 10 MB, it will install the 64-bit flash, mp3 player and PDF viewer plugins and restart the Chromium OS. The following functions were verified to be working after logging into Chromium:
  • Flash
  • PDF
  • mp3/mp4

Tuesday, January 28, 2014

Stop sleeping computers from waking up at nights by themselves

It's annoying to me recently some of my sleeping computers started waking up at nights randomly. The first thing I did is to identify devices that are currently configured to wake the computer up from a sleep state in Windows by the following command line:
Powercfg -devicequery wake_armed
Below is the list of the devices returned by the command:
Standard PS/2 Keyboard
Logitech USB TrackMan Wheel
Realtek PCIe GBE Family Controller

Since I had configured the computer to allow wake-on-LAN by magic packets for a while, it is anticipated to see the device "Realtek PCIe GBE Family Controller" on the list. However, I didn't expect to see the other two devices since I didn't want any unintentional motion or events on them to wake the computer up. So what I did to disarm them from waking up the computer is:
powercfg -devicedisablewake "Logitech USB TrackMan Wheel"
powercfg -devicedisablewake "Standard PS/2 Keyboard"
The above commands runs in Windows  7 or 8 with an elevated command prompt (running the Command Prompt program with administrator privileges). Now if I query for wake_armed devices again, I only see the network adapter, which is desirable.

Another useful command for troubleshooting the unintended waking up is
powercfg -lastwake to report information about the last event that woke the computer up from sleeping. And below is what's reported from one computer:
Wake History Count - 1
Wake History [0]
  Wake Source Count - 1
  Wake Source [0]
    Type: Wake Timer
    Owner: [SERVICE]     \Device\HarddiskVolume2\Windows\System32\svchost.exe (SystemEventsBroker)
    Reason: Windows will execute "NT TASK\Microsoft\Windows\Media Center\mcupdate_scheduled" scheduled task that requested waking the computer.


The above tells me that the task mcupdate_scheduled is so intelligent that it woke up the computer from sleep to do its job. And it is not alone. The following command can list all such clever tasks that can wake up the computer:
schtasks /query /FO list | more

The following command can disable the task from being scheduled again:
schtasks /change /TN "\Microsoft\Windows\Media Center\mcupdate_scheduled" /disable

After disabling all these tasks, the following command can confirm that no active timers are scheduled to wake up the computer.
powercfg -waketimers

The above changes worked for me to stop sleeping Windows 7 computers from waking up at nights by themselves.