Binglong's space

Random notes on computer, phone, and life

Update Driver of AMD Radeon HD 6470M in HP EliteBook 8460p for OpenCL

Posted by binglongx on September 1, 2015


I would like to try out OpenCL on my laptop. The HP EliteBook 8460p Windows 7 x64 laptop came with an old factory graphics driver for AMD Radeon HD 6470M chip. The driver was too old and it did not support OpenCL. According to the guideline, I need to:

AMD Driver Installers

The first latest driver installer that I downloaded was amd-catalyst-15.7.1-without-dotnet45-win7-64bit.exe (238MB). Although the package appeared too big, it seemed successful in installation without any error message. But I checked the installation log and there were 4 or 5 obscure error entries. When I ran the installed AMD Catalyst Control Center, it said “Catalyst Control Center cannot be started”:


This was a bad sign. From my past experience with AMD video driver installer, I suspected it again went wrong. After I installed AMD APP SDK and built the HelloWorld OpenCL example in Visual Studio, the example crashed at the call of clGetPlatformIDs. It’s obvious that the OpenCL driver was also not installed correctly.

The GPU Caps Viewer is a very popular tool to check the GPU and driver software status. So I downloaded the latest GPU Caps Viewer 1.23.0 and wanted to check around. However, GPU Caps Viewer also crashed at launching, obviously it did not expect calls to functions like clGetPlatformsIDs would crash.

So I had to go back to Windows Programs and Features, run AMD Catalyst Install Manager to uninstall all AMD driver software components, and try to reinstall them. While uninstallation was ongoing, all the displays went blank (I had two external monitors connected to the dock, and the laptop was on dock). After waiting for 5 minutes the monitors did not seem to come back on, I had to hold the power button of the laptop for 10 seconds or so to force shut down the laptop. When the laptop booted up, it showed an awful 640×480 VGA desktop. The worse, the laptop did not detect my external displays on dock!

Now I decided to download a different driver installer, amd-catalyst-15.7.1-with-dotnet45-win7-64bit.exe (286MB) and hoping better luck. The bulky thing again seemed to install successfully, but the Catalyst Control Center still did not run, and the screen was still VGA. Basically it did not install successfully. I even thought that maybe HP’s driver, rather than AMD’s driver, would work, and downloaded the HP’s corresponding driver sp64287.exe. Upon installation, it did not change anything, and my external displays were still gone.

System Restore

In the end I thought maybe I should quit trying OpenCL on PC. I wanted my full resolution screen and big external displays back! The last resort was Windows System Restore. I wanted to restore to a restore point before all this mess. Luckily I had one such restore point. After restoration and reboot, my default laptop screen was full resolution, but the two external displays were still not detected. System Restore reported that the restoration was not completed successfully, probably due to anti-virus software interference. But this is my work laptop and I could not turn off anti-virus software protection due to lack of security privileges.

I decided to chat with IT for help, to either install the AMD driver properly, or restore to the previous restore point correctly. I was amazed how today’s IT working remotely on my computer, but obviously they did not have much experience to this situation.

Manual Driver Update

While IT was remotely working on my laptop, I suddenly wanted to have another try. In Device Manager, under Display adapters, it had only one entry, Standard VGA Graphics Adapter. This was obviously not correct. Right click on the entry, then choose Update Driver Software, from there I wanted to manually install drivers rather than using AMD’s installer.

So I first used 7-Zip to open the downloaded driver installer amd-catalyst-15.7.1-with-dotnet45-win7-64bit.exe. Although it is an executable file, it is in fact a compressed archive of many driver files. 7-Zip reveals that the file contains quite some directories and file. Skipping the directory with garbled characters (probably 7-Zip’s problem), I extracted the directory with Bin64, Config, Images, and Packages to my hard drive. The drivers seem to be under Packages\Drivers directory.

Now I came back to Update Driver Software, and choose Browse my computer for driver software. Then I chose the parent directory with extracted files from AMD installer. After a few minutes, the driver was installed. Upon reboot, the two external displays come back on, and the screen resolutions are full!

Device Manager shows that the Display adapter is AMD Radeon HD 7400M Series. It is a bit off from 6470M, but it seems to work fine. At least it is not the lame Standard VGA Graphics Adapter.


I do not have the fancy Catalyst Control Center software installed, but that’s not a big deal.

The better, when I run GPU Caps Viewer, it does not crash any more:


More details on OpenCL support of AMD Radeon HD 6470M:


This means not only the graphics driver was installed correctly, but also the OpenCL 1.2 driver was also installed correctly. Now the AMD APP OpenCL HelloWorld example code would run:



If you could not install AMD graphics driver correctly using AMD installer, try to extract the driver files in the installer with 7-Zip and manually update the drivers in Device Manager. This even installs OpenCL drivers.

Posted in Computer and Internet | Tagged: , , , , , , , , , , , , , , , , , | Leave a Comment »


Posted by binglongx on August 18, 2015





  • 数码照片
  • 填表信息


申请人应该使用六个月内新拍的数码照片,具体要求参见国务院网站照片要求。如果照片仅仅是大小或头像位置不符合要求,此网站有免费的在线照片工具,点击网页右侧的“START PHOTO TOOL”, 你可能裁剪并得到符合要求的照片。

有了照片之后,可以在填写DS-160的网站测试照片是否会被正式接受。先到申请非移民签证填写DS-160网页,从“Get Started”下面选择你要申请签证的城市。这时候,网页会出现“Test Photo”的链接。点该链接,就可以上载你的照片,看看是否符合要求。不符合要求的话,重新准备好照片再说。



  • 个人信息:姓名(包括中文电码),出生日期/地址,身份证号,住址,电话,护照信息等。准备材料:身份证,护照,姓名电码。
  • 旅行信息:旅行性质,目的地,时程,落脚点,出钱方,同行人,过往入出美国日期,上次美国签证,拒签历史等等。准备材料:大致行程,过往5次入出美历史,护照的上次签证页。
  • 美国联系人信息:姓名,单位,关系,地址,电话,电邮。
  • 家庭信息:父母姓名/生日,在美直系亲属姓名/在美身份,配偶信息。准备材料:申请人的父母的生日要事先准备好。
  • 工作教育信息:职业,工作单位,高中职学校,当兵等。
  • 安全背景信息:有没有恐怖,贩毒,迫害,洗钱,间谍等等活动,不是牛人一般一概选NO了。
  • 申请地点:面谈的美国使领馆所在城市。
  • 申请表填写人:代填写者的姓名/地址/关系。

这里是一份我填过的DS-160表格,里面的个人信息都已经删去,但是你可以参考都有哪些空要填。这个PDF文件被Microsoft Word转换编辑过,格式不是很美观,凑合看吧。如果你能手工都填好内容,上网填就很快了。



申请非移民签证填写DS-160网页,从“Get Started”下面选择你要申请签证的城市(中信银行代传递免面谈要选广州)。

新开一个申请表,选“START AN APPLICATION”。网页会显示一个Application ID,让你设一个问题和答案,这样如果填写中断了,你还能用Application ID和答案找回表格继续填写。

之后就是逐页逐页填写大量的信息了。将近最后时,会让你上载照片。最后确认提交。提交之后,你可以选“Print Confirmation”,打出的确认页就是要交给签证官的那张纸,Confirmation Number条码就是Application ID,通常是十位字母数字,形如AA00AAA00。

打出确认页后,不要急着退出。再选“Print Application”,可以打出完整的DS-160表格信息。保留这份完整表格,下次再申请签证填DS-160时可以参考,非常有用。上面我分享的表格就是从这里得到的。

如果是两个或更多的人一起申请签证,这时可以选“Create a Family Application”。这样会填一个新的DS-160表格,有一个新的Application ID/Confirmation Number,只是有的表格部分已经用前一个表格的内容自动填好,省点事。



Posted in Life | Tagged: , , , , , , , , , , , , , , , , , , | 1 Comment »

Air Conditioner Test Run

Posted by binglongx on August 16, 2015

In the coastal area of southern California the summer is normally pretty cool and there is not big needs to run the air conditioner. Today happened to be a hot day so I just used the change to test the air conditioner.

Around the 2pm in the afternoon, it was 91F outside in my zip code according to my phone. This was the running results shown on upstairs/downstairs thermostats:

+00 min 83F/82F
+20 min 78F/80F
+40 min 77F/78F
+60 min 75F/77F

It seems the air conditioner works fine.

Posted in Home | Tagged: , , , | Leave a Comment »

A Weird Windows Update Problem Causing Application Installation Trouble

Posted by binglongx on August 11, 2015

I have a Windows laptop that was not used often. My wife decided to blow the dust and take it for a trip. Since she wanted to take care of some work in travel, she needed to install the VPN client on it, which is Palo Alto GlobalProtect.

After downloading the installer from her employer’s website, the installation of GlobalProtect went well without any error. However, when the VPN client was launched, it did not run. It showed an error message like “…The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.

With past experience in SxS errors, I knew its much easier first to pull Event Viewer than to run sxstrace.exe. In Event Viewer under Application events, it said that GlobalProtect could not run because its dependency assembly, Microsoft.VC90.MFC, version 9.0.21022.8, could not be found. Obviously, the GlobalProtect installer did not install the SxS assembly correctly although it did not report any error.

So I went online and downloaded the Microsoft Visual C++ 2008 Redistributable package matching to version 9.0.21022.8. However, when I tried to install the package, the installer failed with “Error 1935. An error occurred during the installation of assembly… HRESULT: 0x80071A91”. I should have known that the GlobalProtect installer was not so stupid to forget to install the Visual C++ Redistributable. But it’s still to be blamed for not reporting the error while it was not able to install the VC++ Redistributable.

What could prevent the VC++ Redistributable from installing? This normally means the file system is not in a consistent state for SxS installation. This link suggests a few approaches to try:

  • I tried Method 1, fsutil resource setautoreset true C:\, to clear the file system transaction log, and it did not work.
  • I did not bother to try Method 2 to manually inspect the registry items under HKEY_LOCAL_MACHINE\COMPONENTS, which is normally tedious, risky and unfruitful.
  • I also tried Method 3 – I was able to uninstall the Visual C++ 2010 and Visual C++ 2013 Preview Redistributable packages. But after reboot, I still could not install Microsoft Visual C++ 2008 Redistributable. No matter the plain one or SP1, the installation resulted in the same error.

Now the only option was to perform Windows Update first and then try to install VC++ Redistributable.

I went to Windows Update. Since the laptop had not been used for a while, there were 146 recommended updates to be installed. I chose to install all, but it never showed any progress even after one hour. Although this discussion suggests that it might only be a UI issue and the underlying updates would still be advancing, my experience was not aligned to that. After long waiting, the error message popped up “Code 80071A30 Windows Update ran into a problem”. This link suggests two methods:

  • I tried Method 1, run the Windows Update Troubleshooter. Unfortunately, the tool reported no error, and did not work for me.
  • Method 2 is quite involved. It requires restarting Windows into Clean Boot, performing updates in Clean Boot, and restarting back to normal boot. Since there was no other way, I had to try this.

In Clean Boot, I tried Windows Update, but it again ran into problems. Now the error message was “Code 80248007 Windows Update ran into a problem”. Obviously, Windows Update was very very sick! Eventually with Resource Monitor (resmon.exe) and Task Manager, I realized Windows Update was constantly using almost 100% of CPU and having very high disk usage.

I had to stop Windows Update. Using Additional Manual Steps of this article, I was able to:

  • Stop the Windows Update service;
  • Delete temporary update files in subdirectories DataStore and Download under C:\Windows\SoftwareDistribution;

I did not bother to restart Windows Update service at the moment, because I needed to enable the VPN client GlobalProtect for my wife’s trip tomorrow and I could not afford any more delay!

Although Windows Update was no longer running, the Windows Module Installer service was still have high CPU and disk usage. According to this article, I changed Windows Update to Check for updates but let me choose whether to download and install them. Eventually after rebooting, the laptop did not show high CPU usage and Windows Update no longer ran.

Now I was able to install Microsoft Visual C++ 2008 SP1 Redistributable package successfully. GlobalProtect started fine! GlobalProtect had some glitch, in that it did not try to connect to the VPN server after entering credentials. But after reinstalling GlobalProtect, it works flawlessly. I will figure out how to re-enable Windows Update when her trip is over. Later.

Summary: Windows Update went wrong and kept crunching on CPU and disk, so VC90 redistributable could not be installed successfully. I had to stop Windows Update manually to allow correctly installing the software.

Update 8/16/2015: Checking Windows Update status reported 146 updates totaling 700+MB. Worried about the perpetual 0% downloading updates message, I decided to manually install tens of updates each time such that I could see progress. The Windows 8.1 Windows Update has some unfriendly UI if you want to select/deselect certain updates for installation and requires too many clicks, when you have a lot of different categories of available updates. Anyway I was able to install all the updates in 4 batches and 3 reboots with some patience. It might be okay if I chose to install all 146 updates in one shot; I just did not try. After that I turned on the Windows Update to automatic, hopefully this will not come to me again.

Posted in Computer and Internet | Tagged: , , , , , , , , , , , , , | Leave a Comment »

Direct Link/Host File on Google Drive

Posted by binglongx on August 9, 2015

Sharing Preview URL

It is easy to upload a file to Google Drive and share with anyone. After you share the file, you’ll get a URL sharing link like:

This shared file is an HTML file that allows easy navigation of C++ Quiz questions through JavaScirpt and IFRAME. The reason that I have to share the file through Google Drive instead of a blog post is that the file uses JavaScript and JavaScript is not allowed in posts.

I highlight the FILE_ID in the URL link above, which uniquely identifies the exact file I share. It should be obvious to find the corresponding FILE_ID when you share a file.

If you send out the URL link above to your friends, when they click the link, the browser will show a Google Drive preview of the file. Depending what type the file is, the preview may or may not be the action you want your friends to see. For example, the link above actually points to an html file. The Google Drive preview of the html file just shows the contents of the file as text, which is pretty much useless – I would like the browser to load and render the html file in most cases.

Host URL

If you would like to let the browser directly load and render your html file that you share on Google Drive, you can use a URL similar to this:

When you click the link above, the html file is loaded directly in the browser. In fact, right now it redirects to a non-obvious URL like this:

The html is loaded through https instead of http. This can cause trouble if iframes in the html use http src’s. Other lax browsers may warn and continue to render the iframes, but Chrome would just show blank iframes.

If you want to host a website, basically a Google Drive directory with a bunch of html and supportive files, you share the directory as host above. The index.html file in the directory is loaded if someone clicks the host link. Keep in mind your little website is served through https, not http.

Direct Download URL

Since my html is not really for https, I would like people to download the file and open locally in browser, rather than hosting as https. Below is the link that would download the file if clicked:

The file could be of any type. After it is downloaded, you decide how to open the file in your local OS.


Other than previewing a file shared on Google Drive, there are URLs to host or direct download the file. Just replace the FILE_ID with your own file’s id.

P.S.: To upload a new version of the file to Google Drive, choose the file in Google Drive page, then choose More actions | Manage versions… | Upload new version. This will keep the FILE_ID unchanged.

Posted in Computer and Internet | Tagged: , , , , , , , , , , , , | Leave a Comment »

Remove Malware JumboSale From Chrome

Posted by binglongx on August 8, 2015

My wife’s Windows 8.1 PC got some pesky malware, JumboSale, with the Google Chrome internet browser. When she used Chrome, the normal webpage was inserted with extra ads blocks with “ads by JumboSale”, or sometimes just stubborn popups with fake claims like “Your Windows is infected by a virus and please call 844-xxx-xxxx” even with women voice reading that repeatedly.

With my previous experience in fighting malware, I first tried similar measures: reboot Windows to Safe Mode, use Autoruns to identify suspicious items and so on. There are other websites regarding removing JumboSale, such as this and this. It was however not fruitful. It was not found in Windows’s installed programs. And no suspicious entry was found in Autoruns. After rebooting Windows back to Normal Mode, JumboSale came back to Chrome. The malware is really sneaky.

Chrome Menu | More Tools | Extensions did not show any trace of the JumboSale extension:


But Chrome Menu | More Tools | Task Manager showed JumboSale extension running (and still showing annoyances):


According to Google, they have Chrome Cleanup Tool. Running the tool did not find anything:


However, after the tool exited, I was able to update Chrome to latest version (I remember it said something like administrator did not allow updating Chrome), and Chrome was reset:


Now the JumboSale annoyances are gone.

Conclusion: Update Chrome to the latest version and reset settings to remove the secret JumboSale adware. The JumboSale extension must have used some nonpublic or flawed accesses in probably older Chrome versions.

Posted in Computer and Internet | Tagged: , , , , , , , , , , , | Leave a Comment »

C++ Template Template Parameter

Posted by binglongx on August 4, 2015

An old but very good article on C++ template template parameters: C++ Common Knowledge: Template Template Parameters. Below is a short summary.

A “normal” class template takes one or more template parameters. When you instantiate a class from a class template, you need to provide types as template arguments.

template<typename T>
class A

int main()
    A<int> a;
    return 0;

In the example above, A is a class template, T is A’s (only) template parameter. A<int> is a class, i.e., an instantiation of class template A by providing int as template argument. a is an instance of class A<int>.

Although less often seen, a class template can also take one or more template template parameters. When you instantiate a class from such a class template, you need to provide templates as arguments to the template template parameters.

template<typename T>
class A

template<template<typename> class U>
class B

int main()
    A<int> a;
    B<A> b;    // ok: A is a class template.
    B<int> c;  // error: expect a class template. int is not a class template.
    return 0;

In the example above, A is a usual class template. B is a class template that takes U as a template template parameter. When you instantiate B, you must provide a class template as argument to replace the template template parameter U.

In this simple example, B’s definition does not use U at all, so you can even omit the name U from B’s definition (in fact, this is also true for A’s T in the example). Notice that U is a class template taking one template parameter, which is not named – this is always okay, because when B uses U it must provide actual type as template argument to U, and U’s template parameter name is never used by B; it may only serve as documentation. If U has more than one template parameters, B’s declaration has to indicate the exact number of template parameters for U.

Posted in C++ | Tagged: , , , , , , | Leave a Comment »

Experience with New Trent iCarrier IMP120D External Battery

Posted by binglongx on July 31, 2015

The external battery is to be charged at home on wall outlet. When I need to travel for long time without access to wall outlet, it can be used to charge mobile phones or pads.

I bought the New Trent iCarrier IMP120D External Battery but rarely used it. Since there will be a camping trip, I decided to give it a test in advance. When my phone, Moto X 2nd generation, ran out of battery, I just happened to charge iCarrier to its full capacity. It’s a good time to test.

The user manual of iCarrier IMP120D can be found here. It is pretty simple to use.

  • After the external battery is fully charged, I just disconnect the charging USB cable between my wall USB charger and iCarrier.
  • Without any load (phone or pad), press and hold the Power On/Off button of the battery for 2 seconds. The battery is turned on with lights indicating its charge level.
  • Connect a USB cable between the battery and the phone. The external battery starts to charge the phone.

The Moto X completely runs out of juice and it turns itself off. It is then charged without being turned on (it is charged faster than when it’s turned on). I use the Output 2 of iCarrier, which could supply charging current up to 2.1A. Below is the charged level of Moto X at different times:

  • +000 minute: 00%
  • +030 minute: 28%
  • +060 minute: 57%
  • +090 minute: 83%
  • +120 minute: 99%

Because the battery in Moto X is rated at 2300mAh, 57% percent would be about 1311mAh, which translates to a charging current of about 1.3A when the phone battery is low. Moto X’s stock USB charger is rated at 1.15A. Basically, even though iCarrier is able to charge at a higher current at its Output 2, Moto X somehow allows only a modest 1.3A charging current, which is in alignment with its stock wall USB charger.

It is also obvious that charging becomes slower when the phone battery has more charge. The 4th 30 minutes charges only 16% while the first charges 28%. Nevertheless, iCarrier can charge the Moto X battery from 0% to 99% in 2 hours.

In the above test, after charging the phone to full level, the iCarrier’s charge indicator still shows high (60%-100% charge). iCarrier is rated at 12000mAh/3.7V, i.e., 44.4Wh. Moto X is 2300mAh (also Li-ion battery so 3.7V). Given some overheads, iCarrier should be able to charge Moto X to full level for 4 times or so. That’s not bad at all.

Posted in Home, Smart Phone | Tagged: , , , , , , , , , , | Leave a Comment »

Manual Installation of Foscam FI9821P and FI9816P

Posted by binglongx on July 30, 2015

The latest Foscam IP Wireless cameras, for example FI9821P and FI9816P, come with Foscam Remote Install service and Android/iOS Foscam App assisted QR scan via EZLink setup. These approaches shall make bringing the cameras online in a typical home network easier. I however do not like to call somebody over the phone or sign up an Foscam Cloud account when I just need to see the camera video initially. I think that is too involved. I still prefer traditional installation of the cameras, where I control every step.

The conventional setup of the Foscam wireless IP cameras starts with wired cable, just like installing Brother HL-2170W wireless laser printer. This is what I do:

  • Download Foscam Search Tool. Go to Foscam Support page. The page is quite cluttered at present, just search “Search Tool” in page. I use the Windows version Search Tool PC. Extract SearchTool.exe and run it. This tool can find Foscam IP cameras on your home network.
  • Power on FI9821p or FI9816p, and connect the camera to your home network with an Ethernet cable.
  • Now in the Search Tool window, you should see the camera appear. The most important information is the IP address and port where the camera listens. In my example, the port is 88. In fact my router is able to show the new camera’s IP address, but I would not know that I should use Port 88 without this Search Tool or referring to the user manual. Note that if your right click the camera entry in the Search Tool you can do quite a lot of other things with the camera.


  • Use a web browser to access the camera using the IP address and port number indicated by Search Tool. Here I use Internet Explorer. Google Chrome does not work for me because the camera wants to install an browser add-on, which Chrome would choke on. Click Allow to install the add-on.


  • The initial admin username and empty password would work out of factory when you click Login (Don’t worry about the stream at the moment). But it asks you to setup a new username and provide a corresponding password. After you do that, the default admin username is disabled, and you should use the new username and password to login.


  • Now you should be able to get into the camera! The Setup Wizard would welcome you. No worry, everything starting from here is straight forward.


  • The first two steps in Setup Wizard allow you to change camera name and date/time settings, very simple.
  • The third step in Setup Wizard is important if you intend to use it as wireless camera. Make sure you attached the Wi-Fi antenna to the camera, and click Scan. It should show your home Wi-Fi information. Fill in the SSID and encryption information and click Next. The last step of Setup Wizard should show that the camera get DHCP on your home router.


  • Once you get out of the Setup Wizard, you can finally see the video.


  • For me, I need to do a little bit more. Since I need to access the camera from the Internet while I am away from home, I will need to set up port forwarding on my router, and I need a fixed IP on camera instead of DHCP. I probably also need to change the port number as well since I will have multiple cameras on my home network. These can be changed in Settings | Network. Click Save.


  • Now you can disconnect the Ethernet cable from the camera. Wait for about 1 minute, the camera should automatically switch to use Wi-Fi. You should be able to access the camera using the IP address and port set previously.

After the camera is setup, there are a lot to be explored in settings. It would be better to refer to the official user manual if you find something unobvious.

Posted in Computer and Internet | Tagged: , , , , , , , , , , , , | Leave a Comment »

Antenna Impedance and Transmission Lines

Posted by binglongx on July 13, 2015



Posted in Amateur Radio | Tagged: , , , , , , | Leave a Comment »


Get every new post delivered to your Inbox.

Join 51 other followers