[Solved] Chrome displays all text italic

A lot of text and links were displayed italic in Chrome on several webpages since a Windows 10 update. Firefox could display the text correctly. The problem occurred especially while on the WordPress administration pages, on the Chrome Web Store and the WhatsApp web interface.

A quick google learned that it could be caused by some extensions or a default font setting or even an experimental font setting in Chrome (DirectWire). Trying to change these options didn’t work for me. Then I started to inspect the code of those webpages. I found out that the text style wasn’t italic at all, meaning that it wasn’t changed incorrectly by extensions or default font settings or DirectWire.

I did notice however that all the italic text was the Google Font OpenSans font. It was included correctly in the web page but seemed corrupt in one way or the other. Then I searched for the font in my Windows Fonts directory and it seemed that the Open Sans font was installed locally as well, but only as an italic font.

It seems that Chrome uses locally installed fonts if they are available and completely ignores the included Google Fonts on the webpage. Even if a font variant is not available locally. Firefox handles this situation better by displaying the downloaded Google Font variant that is missing locally.

How to make the text appear normal in stead of italic

The solution is quite simple. Remove the locally installed OpenSans font. Make sure that you close Chrome first because it has the font in use and Windows won’t allow you to remove it

Font can't be deleted because it's in use

  1. Shut down Chrome (so that the font isn’t in use anymore)
  2. Go to Control Panel\Appearance and Personalisation\Fonts and remove the (italic-only) Open Sans font locally in your Windows Fonts directory
  3. Reopen Chrome.

I guess downloading all the Open Sans variants and install them locally would’ve helped as well.

Windows 10

While several people already have Windows 10 installed, my computer didn’t offer me that possibility yet. Searching on the Internet, I found several sites explaining how to force Windows update to download and install Windows 10 but none of these descriptions worked for me. I found out that one step was missing in my case: automatic installation of updates. My Windows Update was set up to automatically download updates but I chose the time of installation.

So in my case, the steps to perform were:

  1. Open Windows Update
  2. At the left, click “Change Settings”
  3. Make sure the selection menu under “Important Updates” says “Install updates automatically”, and make sure that under Recommended updates, the “Give me recommended updates the same way I receive important updates” option is checked.
  4. Remove all files in C:\Windows\SoftwareDistribution\Download
  5. Then, hit the windows key and type “cmd”. Right click the command prompt and choos for “Run as administrator”
  6. enter the command wuauclt.exe/updatenow. Don’t hit enter yet
  7. In the Windows Update window, click “Check for updates” on the left hand side.
  8. Immediately after that, hit enter in the command prompt, executing the command you previously entered

At this point, Windows Update started to download Windows 10.

However, after installation and preparing setup, the update failed and I ran into error 80240020 – which is quite known, so it seems. So I followed these steps to remove all downloaded files and re-downloaded everything.

Failed to import events: unable to process your ical/CSV file..

… that is what I get when I try to import a freshly exported ics file from my Google Calendar.
The problem is a quote (") in one of the ATTENDEE sections of an event, a section that is not even re-imported when adding it to a fresh calendar… Removing those quotes made Google import the events.

It took me quite some time to accomplish since I had to find out which one of the 1470+ events would be the culprit, but it was worth the work. Exporting and re-importing the same calendar events without removing the originals made my Android Calendar sync all my events so that I now have not only the events of the last 60 days on my phone, but all events since the first time I started using Google Calendar.

Progress bar while booting iMac

Ever since I bought the mid 2011 iMac running Lion, the problem occurred. While booting, a gray progressbar appears and when the device is finally booted, performance is really bad while no sound nor camera is available. And I’m not the only one, but I found that out only after searching quite some time and after the computer was sent to my service center…

How to reproduce

  1. The Bluetooth keyboard and mouse are switched off
  2. Switch on the Bluetooth keyboard. The led will light continuously, then starts flashing,
  3. Within two to three seconds, switch on the iMac
  4. The keyboard led will stop flashing and the iMac and keyboard are connected
  5. The progress bar appears
  6. When the device is booted, video performance is bad, in- and output sound devices are not found and camera cannot be started
  7. When the iMac is rebooted, everything works as smoothly as you expect from a Mac


Just leave your keyboard on, don’t switch it off when you shut down the iMac. It won’t use (a lot of) battery as long as you don’t use it. After one month, my battery level indication still displays 100%… Moreover, it’ll probably use more battery when you switch it off then on, because it’s going to search for other devices every time. When you don’t switch it off, it’ll stay paired with one device.

When you need to use some startup key combinations, the keyboard will act and connect before booting and the key sequence is processed. When you don’t need to enter such a sequence, the keyboard will connect right before the login screen appears. In both situations, the progress bar won’t appear.

Only when you’re not going to use the keyboard for a couple of days/weeks, you might want to switch it off. When you return from vacation and want to use your computer again, first switch on the iMac, wait for the grey Apple logo and spinner to appear, then switch on your keyboard and mouse. This is a work-around which in my opinion shouldn’t be necessary, but now that I know it and my solution will save me time (turning off the keyboard takes about three seconds every time, so that’s three seconds to do something else 😉 ), I can live with it.

How the keyboard works

It probably has something to do with the fact that when you shut down the keyboard, then switch it on again, it’ll be open to pair with another device. Probably the iMac has a problem with that. When you don’t switch the keyboard off and you shut down the iMac, the keyboard will go in some kind of power-efficient sleep mode. So this gives you the option to just keep the keyboard on. You’ll use rechargeable batteries anyway. When you’re still not sure and want to be the most energy-efficient, you’d better go with option two to start up the iMac, wait for the logo, then switch on the keyboard…


Send GPS data over tcp

A time ago, I wrote about how you could only read GPS data from a USB GPS device from one COM port and how I managed to handle GPS data on different virtual COM ports so that the GPS data could be used in different applications.

One of these applications is one in Java that I develop myself. However, the RxTx driver I’m using is a little unstable, especially when the connection is lost and you try to re-establish the connection to the Serial Port. So I tried to find a solution and hub4com actually offers one as well. You can actually route the GPS data, read from a physical COM port, to a tcp port so that you can create a network connection to the machine and fetch the GPS data from there.

You can enable filters in hub4com and one of these filters is the telnet filter over a tcp driver. I modified the command so that it looks like this:

    --route=0:All \\.\COM6
    --baud=9600 \\.\CNCA0
    --baud=9600 \\.\CNCA1
    --baud=9600 \\.\CNCA2
    --use-driver=tcp *10110 *10110 *10110 *10110"

This now means the following:
Start hub4com,
read at speed 9600 baud,

route the first specified COM port to all the others

the first specified COM port, which is the one that we’ll be reading from

--baud=9600 \\.\CNCAx
write to these virtual COM ports with speed 9600 (the –baud parameter on these three lines might be omitted since you have specified hub4com to read at that speed)

Create a telnet-filter so that hub4com can answer telnet-like

redirect the input from the first specified COM port (COM6 in our case) to the telnet session

--use-driver tcp *10110 *10110 *10110 *10110
this will use tcp for communication and will listen on port 10110. Four concurrent telnet sessions on port 10110 are possible. If you only specify one *10110, only one connection at the same time will be allowed.

This now allows me to create a tcp connection on port 10110 and read the NMEA data from there. Much more stable.
Now, to wrap this all up into a windows service, I run the following bat file (everything on one line) to install that service:

    --displayname "hub4com" 
    --description "Routes the GPS data from COM6 to virtual COM14, COM15 and COM16 and allows 4 telnet connections to the raw NMEA data" 
    --exe "C:\com0com\hub4com.exe" 
    --params "--baud=9600 --route=0:All \\.\COM6 --baud=9600 \\.\CNCA0 --baud=9600 \\.\CNCA1 --baud=9600 \\.\CNCA2 --create-filter=telnet --add-filters=0:telnet --use-driver=tcp *10110 *10110 *10110 *10110" 
    --workingdir "C:\com0com"

The service now launches on system startup and I can use multiple COM ports as well as 4 concurrent telnet sessions to the host on which the GPS is connected. telnet localhost is more stable to use in Java than RxTx (at the moment of writing)

maven and UTF-8

When you want to compile your source code – Java in this case – on multiple machines, you might get into troubles when special characters are coming in. I mean, when you just type plain English, nothing’s wrong. However, when you start typing characters other than in the ASCII128 specification, you get into troubles. On the Internet, it is a known problem and thus, most websites are specifying charset=”UTF-8″ in their metadata, so that every character you see or insert, is the same on all platforms.

Now, when you create a text file on Windows, by default it’ll be in the Cp1252 encoding. When that is a Java source file that you want to build on a Ubuntu server, you come into troubles when these source files contain characters like á or è and especially Æ. Ubuntu uses UTF-8 as default encoding and you’ll end up in compile errors because the characters are converted wrongly.

This writing describes a solution to be able to build your project using maven on different platforms (Windows and Ubuntu).

To make your project platform-independent, you can choose to create UTF-8 encoded sourcefiles all the time. In Eclipse, you can find the option in the Preferences panel (Window > Preferences) under General > Workspace. Here, you can modify the Text file encoding to UTF-8.

Now, maven will build the project correctly on Ubuntu. However, it won’t build on your Windows machine anymore – since it doesn’t interpret the UTF-8 characters correctly. So we have to make sure maven starts building in UTF-8. It’s giving you a hint by displaying a warning message while building:

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

To get rid of that, we have to add some properties in the pom files, preferably the master-pom file so that you only have to specify it once. It’s described on the maven website and even more on codehouse.org. However, both solutions were not enough to solve the problem on my machine. You have to specify the encoding that will be used for the project and configure it for all plugins that matter. In fact, that would cut down to the “build” and the “resources” plugin. If you could speak of “plugin” in these cases anyway…

When only specifying project.build.sourceEncoding, maven would still display the warning, so it wasn’t sufficient:

[INFO] Building project
[INFO]    task-segment: [deploy]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

As you can see, we’re in the resources:resources section, not in a “build” section, so that made me add a project.resources.sourceEncoding property. My adjusted master pom file thus contains:

<?xml version="1.0" encoding="us-ascii"?>
<project xmlns="...">

And that works. The project is now building on a windows as well as on an ubuntu server and interprets the source files as UTF-8 encoded text files.

Ubuntu 10.04 networking

I had a hard time getting the Intel Wifi 5100 AGN, which is displayed using lspci as “Intel Corporation PRO/Wireless 5300 AGN [Shiloh] Network Connection“. A lot of people are complaining about it. It would be a bug in the kernel, in Ubuntu 10.04, whatever. Nobody seems to get a clear view why it isn’t working. And more, some people state that it “suddenly just works” after reboot. Well, it doesn’t. It’s just because of the modifications that they tried.

I myself tried a lot of those things – first the ones that didn’t require hacking some configuration files that weren’t supposed to be modified. When they didn’t work, I reverted them.
I tried several things, even reconfiguring the wireless router. I tried an open and even a WEP secured network, and it was stunning that those networks didn’t give any problem. Then, I switched back to WPA2 and the connection was lost again after a few seconds.

Accidentally came across this forum post which said to use ndiswrapper (which wasn’t installed so I had to apt-get install ndiswrapper-common).
Of course, I’m not entirely sure this was the fix, but it is stunning that after installing ndiswrapper, the wireless connection works. Even after reboot.

Besides, FYI, during my trials, I connected an old USB wireless adapter. A DLink DWL-122, rev A1. It is an obsolete piece of hardware. DLink doesn’t create drivers for Windows 7 or vista, so it only works in XP. They’re not even mentioning drivers for Linux. They state it is plug and play in Windows 7, but that is only for revision B and C, not the A I have. Besides, it only works with WEP protection, the hardware doesn’t support WPA.
Anyway, when I connected the USB adapter to the ubuntu installation, it was picked up and ready to use instantly. Another plus for Ubuntu and obsolete hardware.

Ubuntu @ Work

Sometimes I take some serious risks. Like, suddenly, I get the urge to install Ubuntu on my office’s laptop. A Dell Latitude E6500. But, there’s a Windows 7 installed, consuming the entire disk.
So, what I have to use, is the gparted disk resize functionality – something I never trust. But hey, who cares 🙂 So I downloaded the live CD of Ubuntu 10.04 netbook edition (two days before Ubuntu 10.10 should be released – I tend to download ubuntu releases a couple of days before a new version is released), I put in on a USB Flash drive (so that I don’t have to install it on the harddisk) but not much success. The first time it boots great, but then I want to configure some things, install other software (not to do on a live distribution) the OS starts complaining about not enough diskspace, wireless problems and on reboot, no live os was found.

So I took the chance and installed it on the hard drive – resizing the existing NTFS partition. Installation of Ubuntu is painless – as always – and on reboot, except for the check disk that was triggered when booting back into Windows, everything went smooth and Windows 7 just kept working fine. Only with 4GB less hard drive.

In Ubuntu, I installed the NVidia drivers for the screen and after that, the boot screen (ubuntu logo) and the terminal (you know, tty1 to 6, ctrl+alt+f1) didn’t have the 1920×1200 resolution anymore, just a 640×480.
Me not want.
So I kept searching and trying, even adjusting some grub scripts (one hint said to change the “linux” and “initrd” in /etc/grub.d/10_linux to “linux16” and “initrd16” but that didn’t work out and besides, it’s a dirty hack.
You can configure it nicely the way it should be: adjusting /etc/default/grub. Add the lines


and you’re all done. Not using the (deprecated) vga= method, just that. And run update-grub2 afterwards.
This is my working grub.cfg:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX="quiet splash"

# Uncomment to disable graphical terminal (grub-pc only)

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

# Uncomment to disable generation of recovery mode menu entries

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

Almost perfect. However, the splash screen is there for just a short amount of time. The console’s are at full resolution, so that’s ok with me, but it would of course be nice that the splash screen and moving dot’s are viewable. I stumbled on on another solution/work-around in which the author states he hates the set gfxpayload=keep solution and gives a better solution… In short, execute these commands

sudo apt-get install v86d hwinfo
sudo hwinfo --framebuffer

Then, edit /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1920x1200-24,mtrr=3,scroll=ywrap"

and additionally, thanks to a comment in the article, I added


Edit /etc/initramfs-tools/modules to include uvesafb by adding uvesafb mode_option=1366x768-24 mtrr=3 scroll=ywrap, then execute commands

echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
sudo update-grub2
sudo update-initramfs -u

Then reboot.

Ok, almost perfect. Only, this textual Grub menu… Ok, boring and not anno 2010. So, After a little search, I stumbled upon Burg.
In short

sudo add-apt-repository ppa:bean123ch/burg
sudo apt-get update
sudo apt-get install burg burg-themes

During installation, it’s installed in the MBR automatically, only, on reboot, my high-res grub menu and tty’s is gone again. Luckily, while the boot screen is displaying, you can hit ‘r’ and choose the wanted resolution (1920×1200 in my case). The tty’s are – sadly, 640 all over again, so I opened /etc/default/burg and noticed the GRUB_GFXMODE is set to “saved” (= the last chosen one in the boot screen) and GRUB_GFXPAYLOAD_LINUX is gone. Now, suppose for one reason or the other I choose another resolution in the boot screen, I want the same resolution in the tty’s, so I added the option GRUB_GFXPAYLOAD_LINUX=keep again. Sorry 🙂

And, since it is nice if, on reboot, the last selected OS is selected by default, I changed GRUB_DEFAULT=0 to GRUB_DEFAULT=saved so that when I have to reboot my Windows installation during the day, I can just reboot the pc, take a break and see that Windows is fully started when I return.

So, my final result is

# If you change this file, run 'update-burg' afterwards to update
# /boot/burg/burg.cfg.

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodesetvideo=uvesafb:mode_option=1920x1200-24,mtrr=3,scroll=ywrap"

# Uncomment to disable graphical terminal (grub-pc only)

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
# In the boot menu, use hotkey 'r' to popup a resolution selection menu.

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

# Uncomment to disable generation of recovery mode menu entries

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

# GRUB_THEME's value can be 'saved' or a specific BURG theme name, you can also
# set it to the pathname of a GRUB2 theme file.
# In the boot menu, use hotkey 't' to popup a theme selection menu

# GRUB_FOLD's value can be 'saved', 'true' or 'false'.
# In the boot menu, use hotkey 'F7' to show the full list, 'f' to toggle
# between folding modes.

# Add user with burg-adduser, then use GRUB_USERS to config authentication.
# The following example means user1 can boot Ubuntu, no password is needed to
# boot Windows, user1 amd user2 can boot other OS. Superusers can boot any OS
# and use hotkeys like `c' to enter console mode.

# For a complete list of supported variables, refer to this wiki page:
# http://code.google.com/p/burg/wiki/ConfigurationVariables

GRUB_FOLD=true will make the “recovery” mode being folded into the menu option to boot normal ubuntu. So it’s available if you need it, but it’s hidden by default.

update-burg and you’re done.
Reboot and choose your theme by pressing ‘t’

And I’m done.

Handle GPS data by two GPS Apps simultaneously

Given this situation: You have a GPS device that is connected to your computer (not handheld) via physical COM1. Now you want to use this data in two different applications, say: a Route Navigator and a GPS logger. You launch the Route Navigator, it’ll connect to the COM1 port and it’ll show you your position. Now, launch your GPS logger and try to connect on COM1. It’s not happening: that COM port is in use. You can connect to a COM port with only one application.

On a portable device, this is solved by installing a virtual COM port, which can be read by multiple applications simultaneously. Often, this is COM8 (so it is on my Windows Mobile 5 system). But what to do when you want this functionality on a normal pc?


Well, there is a very cool application that actually makes this possible. It’s called XPort. Just launch the application, hit “Find GPS”, select a virtual COM port in the right column and hit “Enable ports”. Now, you can connect with both applications to that selected virtual COM port. Or, you can select two virtual COM ports and have both applications connected on a different port.

There’s a little drawback. The application needs Administrative rights, so on your own computer at home it’ll work, but if you have to set this thing up on a terminal build in a truck and running Windows XP on which the GPS logger starts up silently and the Route Navigator launches in full screen, all automatically while a very limited user is logged on, XPort will be denied to launch the virtual COM ports since it should be run with administrative rights.


So we need an application that makes it possible to install the virtual COM ports as an administrator, then launch the mapping as a windows service.
I found com0com.
Using the application com0com, you can create virtual COM port pairs, each representing a virtual NULL Modem Cable. You can use the graphical interface, setupg or the commandline interface setupc. This last one can be used in scripts. I created three pairs, one for the Route Navigator, one for my software and one for later usage supposing that I might want to debug one day while the other apps are running. So my script looks like this:

setupc install 0 - PortName=COM14,EmuBR=yes
setupc change CNCA0 EmuBR=yes
setupc install 1 - PortName=COM15,EmuBR=yes
setupc change CNCA1 EmuBR=yes
setupc install 2 - PortName=COM16,EmuBR=yes
setupc change CNCA2 EmuBR=yes

This will create the following pairs:

CNCA0 <-> COM14
CNCA1 <-> COM15
CNCA2 <-> COM16


Part of the project is hub4com that makes it possible to get the input from one COM port an route it to several others. The first example they give, is exactly that what I need.

You have a GPS device that connected to your computer via a phisical COM1 port and you’d like to handle its data by two GPS applications. You can do it this way:[..]

Following the rest of the example, while using COM6 as GPS COM port, CNCAx as virtual input, COM1x as virtual output, it showed me this on the commandline:

C:\com0com\>hub4com \\.\COM6 \\.\CNCA0 \\.\CNCA1 \\.\CNCA2
Open("\\.\COM6", baud=19200, data=8, parity=no, stop=1, octs=on, odsr=off, ox=off, ix=off, idsr=off, ito=0) - OK
Open("\\.\CNCA0", baud=19200, data=8, parity=no, stop=1, octs=on, odsr=off, ox=off, ix=off, idsr=off, ito=0) - OK
Open("\\.\CNCA1", baud=19200, data=8, parity=no, stop=1, octs=on, odsr=off, ox=off, ix=off, idsr=off, ito=0) - OK
Open("\\.\CNCA2", baud=19200, data=8, parity=no, stop=1, octs=on, odsr=off, ox=off, ix=off, idsr=off, ito=0) - OK
Route data COM6(0) --> CNCA0(1) CNCA1(2) CNCA2(2)
Route data CNCA0(1) --> COM6(0)
Route flow control COM6(0) --> CNCA0(1)
Route flow control CNCA0(1) --> COM6(0)
Started COM7(0)
Started CNCA0(1)
Started CNCA1(2)

When I now connect the GPS logger on COM5, I see a lot of trash appearing. The reason is that the baud rate doesn’t match. It’s very important to read from the COM port at the same rate as the device produces it’s data. The GPS receiver in my case has a speed of 9600 Bd, but as you can see in the console log, hub4com is reading it at 19200 Bd. Too fast, thus the trash.

Of course, hub4com provides a way to set the baud rate, option --baud=9600 is bringing it down and the output is now

C:\com0com>hub4com --baud=9600 \\.\COM6 \\.\CNCA0 \\.\CNCA1 \\.\CNCA2
Open("\\.\COM6", baud=9600, data=8, parity=no, stop=1, octs=on, odsr=off, ox=off, ix=off, idsr=off, ito=0) - OK
Open("\\.\CNCA0", baud=9600, data=8, parity=no, stop=1, octs=on, odsr=off, ox=off, ix=off, idsr=off, ito=0) - OK
Open("\\.\CNCA1", baud=9600, data=8, parity=no, stop=1, octs=on, odsr=off, ox=off, ix=off, idsr=off, ito=0) - OK
Open("\\.\CNCA2", baud=9600, data=8, parity=no, stop=1, octs=on, odsr=off, ox=off, ix=off, idsr=off, ito=0) - OK
Route data COM6(0) --> CNCA0(1) CNCA1(2) CNCA2(3)
Route data CNCA0(1) --> COM6(0)
Route flow control COM6(0) --> CNCA0(1)
Route flow control CNCA0(1) --> COM6(0)
Started COM6(0)
Started CNCA0(1)
Started CNCA1(2)
Started CNCA2(3)

Maybe it’s just me, but it took me a full day to understand what is happening now after reading and re-reading all information I could find. Launching the Route Navigator on COM14 will give you a GPS signal and launching the GPS logger on COM15 or COM16 will give you a signal as well. So far so good. Until you close the application on COM14. It doesn’t matter which one that is, Route Navigator or GPS logger, it all gives the same result. When the application on COM14 is closed, the signal is lost on COM14 and COM15. Although the configuration of all 3 ports are identically, the hub4com ReadMe states (adjusted to fit my example) that

It will send data received from COM6 port to CNCA0, CNCA1 and CNCA2 ports
and it will send data received from CNCA0 port to COM6 port.

As seen on the commandline:

Route data COM6(0) --> CNCA0(1) CNCA1(2) CNCA2(3)
Route data CNCA0(1) --> COM6(0)
Route flow control COM6(0) --> CNCA0(1)
Route flow control CNCA0(1) --> COM6(0)

The data is routed to all three COM ports, the “flow control” is applied from COM6 to CNCA0 and CNCA0 to COM6 (with CNCA0 the input for COM14). No flow control for the others is configured. So my only guess was to create a flow control to all others as well. One of the extended examples (got by issuing hub4com --help) stated this

  hub4com --route=All:All \\.\CNCB0 \\.\CNCB1 \\.\CNCB2
    - receive data from CNCB0 and send it to CNCB1 and CNCB2,
      receive data from CNCB1 and send it to CNCB0 and CNCB2,
      receive data from CNCB2 and send it to CNCB0 and CNCB1.

So that’s almost what I wanted to do. Assuming the syntax is consistent with, say, connect:

      handle data sent to any port listed in <LstR>
      as data received by all ports listed in <LstL>.

(where I would have switched R and L by the way) and where --route=All:All says that "ports can talk to each other", I added the parameter --route=0:All to route all data always from 0 to the others, so from COM6 to COM14, COM15 and COM16:

C:\com0com>hub4com --baud=9600 --route=0:All \\.\COM6 \\.\CNCA0 \\.\CNCA1 \\.\CNCA2
Open("\\.\COM6", baud=9600, data=8, parity=no, stop=1, octs=on, odsr=off, ox=off, ix=off, idsr=off, ito=0) - OK
Open("\\.\CNCA0", baud=9600, data=8, parity=no, stop=1, octs=on, odsr=off, ox=off, ix=off, idsr=off, ito=0) - OK
Open("\\.\CNCA1", baud=9600, data=8, parity=no, stop=1, octs=on, odsr=off, ox=off, ix=off, idsr=off, ito=0) - OK
Open("\\.\CNCA2", baud=9600, data=8, parity=no, stop=1, octs=on, odsr=off, ox=off, ix=off, idsr=off, ito=0) - OK
Route data COM6(0) --> CNCA0(1) CNCA1(2) CNCA2(3)
No route for flow control
Started COM6(0)
Started CNCA0(1)
Started CNCA1(2)
Started CNCA2(3)

With this setup the data always flows from COM6 to the others no matter which port is read or left unread.
It took me about four days to find out how com0com and hub4com work, mainly because there’s not much information about it. There are quite a few examples, but none of them are explained in detail.

I sure hope the developers are still maintaining this application, since it really does what it has to and works like a charm. I hope the lack of updates since December 2009 is just because the application works perfectly 🙂

My final command is this:

   --baud=9600 --route=0:All \\.\COM11
   --baud=9600 \\.\CNCA0
   --baud=9600 \\.\CNCA1
   --baud=9600 \\.\CNCA2

I added the --baud=9600 to all other Null cable entrances, but that’s more a leftover from my tests. I think it’s sufficient to add the parameter before the list of com ports.

Install as Windows Service

Once configured, the Virtual COM ports stay active until you remove them. However, you have to launch hub4com every time you have rebooted the computer. To solve that, I’ve used runassvc, which allows a silent install as well. Without parameters, the application launches a GUI in which you can enter the required values. With parameters, like opened through a bat file, it launches and enters the parameters you have defined. Then, when you use --quiet as parameter, the GUI doesn’t launch, but the service is installed and started. My command looks like this

   --displayname "hub4com"
   --description "Routes the GPS data from COM6 to virtual COM14, COM15 and COM16"
   --exe "C:\com0com\hub4com.exe"
   --params "--baud=9600 --route=0:All \\.\COM6 --baud=9600 \\.\CNCA0 --baud=9600 \\.\CNCA1 --baud=9600 \\.\CNCA2" 
   --workingdir "C:\com0com"

Now, even when the computer is rebooted, as soon as it has started and before any user has logged on, the system is running so every application is able to read one GPS device even if another is already accessing it. It was tested successfully on a Windows XP and even on a Windows 7 machine, although on the last one you have to boot the machine in Test configuration (bcdedit -set TESTSIGNING ON) otherwise the com0com drivers won’t load.

Used applications

The applications I used to set up this environment, are

Further reading

It is also possible to reroute the GPS data to a tcp port. Read Send GPS data over TCP how to do this.

Oracle 10g and W2K8R2

At the office, a lot of people are using MS Excel. And they’re using the ability to fetch external data into Excel. This external data is read from an Oracle 10g database. Now, given the fact that we recently changed to a new Citrix environment, using Windows 2008 R2 (thus x64) servers, you can already guess: Reloading the data in Excel just won’t work.

After a little search on the Internet, I found a question about the exact same problem I have: the question for a “Solution for ORA-6413 error showing connection not open

There’s just one answer.

Are you running a 32 bit Oracle client software on a 64 bit OS ?

It seems that this error is caused by a bug. The networking layer is unable to parse program locations that contain parenthesis in the path to the executable which is attempting to connect to Oracle, and 32 bit applications are installed in locations similar to “C:\Program Files (x86)\…” on 64 bit versions of Windows.

If that is the case, there are two solutions for this:

1) Use a version of the Oracle software that contains the fix for the bug (i.e. apply the latest available patch for the Oracle software)
2) Find the location of the application that is generating the error and relocate it to a directory without any parenthesis in the path.

Since it is a bug in the Oracle client, relocating the application to a folder without parenthesis is just a work-around. I’d go for solution 1: use a new version of the software. Luckily I still have that download from my previous Oracle troubles, on my x64 Windows 7 machine, and remembering the download took more than 30 minutes, I’m glad I can start installing immediately… Just to find out that the installer crashes as soon as it get launched.

Then I remembered.

Only a couple of days after finding a solution for my Oracle 10g troubles on Windows 7, a colleague of mine couldn’t start the installer either. What I couldn’t remember, is what the solution was. Luckily, there’s Google to show me that there’s a simple solution. Just moving the installer files to C:\ solves it and the installer works fine.

I said it before and I’ll repeat it. It IS still Windows after all…
Edit: As mentioned in the comments, it’s indeed not fair to blame the guys from Redmond. Totally agree.
And I forgot to mention that not only the installer just works after copying it to the root, the solution mentioned above did indeed work on the servers so Excel is now able to connect to the Oracle database.