November 13, 2015

USB Serial Port Converter for Wine

I installed a Windows program on my Debian laptop that interfaced with a radio receiver. The purpose of this program was to allow for the reading & writing of the radio's memories. The connection to the radio was through a USB to Serial converter.

First, I installed Wine (originally an acronym for "Wine Is Not an Emulator"), from the Debian Repository. Then, I could install the Windows program from its CD. When the program is first run, it asks for the COM port number. Because there are no COM ports, this is where the challenge began.

I did some searching with Google and found that the first step was to add a link in the Wine subdirectories for the USB to Serial Port device. There were several suggestions on how to locate & identify the device. The simplest method was in a Terminal window and issue the dmesg command right after plugging the device into a USB port.


jerry> dmesg | tail
[  108.678576] usb 2-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
[  108.679609] usbcore: registered new interface driver ftdi_sio
[  108.678613] ftdi_sio: v1.6.0:USB FTDI USB Serial Converters Driver

Note the line that indicates the USB device is "ttyUSB0".

With this device name, I added a link in the Wine subdirectory identifying this device as "COM1"


jerry> ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1

When I attempted to run the program, it was not able to connect to COM1.

I did some more searching and the answers were of two opinions. Either "it worked for me" or "it doesn't work" with only one person actually noticing what was wrong. The permissions for ttyUSB0 were wrong and the solution involved writing a short script to run which would set ttyUSB0 permissions to allow access.

When I examined ttyUSB0, this is what I saw:


jerry> ls -l /dev/ttyUSB0
crw-rw---T  1 root dialout   4,   6 Nov 18 20:34 ttyUSB0

The device is accessible to only root, the owner and to the "dialout" group, but has no world access. This explained why the one solution required a script to grant access to the device.

However, I realized there was a simpler solution that did not involve running a script every time I wanted to run my program. All I had to do was add my username to the dialout group.

Using a text editor, like vi, you will have to edit the group file, but since it is owned by the root user you will need superuser permission.


jerry> su
Password:
root> vi /etc/group

Locate the line that begins with "dialout":


dialout:x:20:

Add your username to the dialout group:


dialout:x:20:jerry

Save the group file and exit your text editor.

Now, when I run the Windows program and select COM1: I could finally say "this works for me".

October 23, 2015

A Cause of Seizures With My Greyhounds

Two of my greyhounds, Cole and Rowdy, suffer from seizures.

From the beginning I have been tracking all seizures, medicines, dosages and blood tests in journals for each dog.

I also have been charting the seizures since I noticed that Cole was having seizures when I took him on I-75. You can read about it here.

Rowdy has had so many seizures this year that I began to notice something unusual in his chart.

First, to describe this chart. The vertical axis represents the number of seizures and the horizontal axis is counting down the number of hours until the next administration of his medicine that he get every 12 hours.

You can see that most of Rowdy's seizures happen either right before or right after the time of his next dose because there may not be enough medicine in his system to control the seizures. The previous dose is running out and the new dose has not been absorbed by his system.

Now for the interesting discovery. You will notice that there is also a "blip" in the graph at the point that is 4 hours until the next dosage.

I realized that this "blip' was one to two hours after I fed Rowdy his daily meal.

Cole also has this "blip" in his chart, but Cole has seizures less frequently than Rowdy so it was not as noticeable.

Now I have to determine if there is something in the food that is triggering seizures or if the act of digesting food changes something in theirs blood chemistry that reduces the amount of medicine available to control seizures.

October 16, 2015

Friends of Greyhounds' Collar Chain

This is a video from Friends of Greyhounds celebration of the 1,000th dog adopted which took place on October 10, 2010 (10/10/10, 10*10*10=1,000).

By the time Friends of Greyhounds was evicted from the kennels that were being provided by the dog tracks of South Florida, over 1,900 ex-racer greyhounds had been adopted out.

Since then Friends of Greyhounds has had to down-size because of the lack of kennel space, but their rescue and adoption of these wonderful dogs continues.

When a greyhound is adopted, its kennel collar is added to the chain, in chronological order. On special occasions the chains are hung for all to admire.

This chain of 1,000 collars represents the 1,000 dogs that had been adopted out up to October 10, 2010.

Some of the original collars were lost or dogs came in with no collar at all and we use a wooden bone with the dog's name on it. 

Most of the collars hang open but a few are buckled closed.  Those are the dogs who have passed away and are waiting for us at the Rainbow Bridge.