I am a 62 year old beginner in Ubuntu. Thanks for any help, guidance, suggestions on this problem! I have used commands like the following to be certain that I have an active com port: dmesg | grep ttyS rm com1 ln -s /dev/ttyS0 com1 So I suspect the solution lies somewhere in WINE. If all else fails I will get a USB to SERIAL converter cable and try that. My wife has an Abbott Labs Freestyle Lite Glucose meter which uploads to a program called COPILOT via RS232. I was only able to get it to work on ONE of our three Windows XP machines. I tried all day to get it to work on a Dell XP converted to Ubuntu (Gnu/Linux) which d...oes have an RS232 and TERMINAL commands indicate that the system recognizes that COM port. I am running COPILOT with WINE (which lets Windows programs run under Ubuntu). I have yet to master the secrets of Wine REGEDIT: WINE Regedit If I navigate to .wine and then to drive_c and then to windows I can issued the REGEDIT command and edit the wine registry and navigate to the HKEY_LOCAL_MACHINE -> HARDWARE -> DESCRIPTION -> SERIALCOMM I have tried to add "COM1"="COM1" to that SERIALCOMM, and the add shows but then it disappears the next time I run REGEDIT. I found THIS excerpt which seems pertinent: BEGINNING OF EXCERPT I have COM1 on wine apps. I symlinked ttyS0 and added these keys Code: [HARDWARE\\DEVICEMAP\\SERIALCOMM] "COM1"="COM1" "COM2"="COM2" But regedit deletes them. If I do this Code: wine regedit serial.reg wine regedit I see the keys. I open my program with regedit opened and I see com1 and com2 But If I close regedit, then keys disappears... The EXPERT explains: It's not regedit, they are never saved. [HKLM\HARDWARE] is a volatile registry branch - it exists in memory only and is not being saved to disk. Just add it to ~/.wine/system.reg. Be careful editing that file, if you break it whole registry can get corrupt. END OF EXCERPT I DID TRY THIS: BEGINNING OF EXCERPT: Usually with a com port it is a permissions issue. Some programs need further fixes in wine, but often if you cannot see it, it is a permissions issue. Previously you needed to add a link to the port under dos devices, but more recently it seems to auto detect ports. If desperate check that your bios has the serial port enabled, and try loging as a super user and changing the permissions to read and write for anyone on all of the serial ports (it usually reverts when you reboot): chmod 775 /dev/ttyS* If this fixes your problem then you know it is a permission issue and then can research how set it up with a more delicate touch. END OF EXCERPT In wine's system.reg way at the bottom of the file I find: [System\\CurrentControlSet\\Control\\Class\\ .... lots of numbers @="Ports (Com & Lpt)" "Class"="Image" AND I SUSPECT that if I add something here e.g. "COM1"="COM1" "COM2"="COM2" then possibly my application might work and read the com port BUT I am not certain exactly what to add. This may be another place to add COM1 lines win.ini http://www.sdconsult.no/linux/wine-doc/pkg-implementation.html e.g. Com1=/dev/ttyS0 Com2=/dev/ttyS1 Com3=/dev/modem,38400 Com4=/dev/modem I am saving COPIES of each file that I tamper with in case it becomes corrupted. Today I will walk up the street to J&R Computers and purchase a USB to Serial converter cable and give that a try. The glucose meter is Abbot Labs FreeStyle Lite The program in question is COPILOT HEALTH MANAGEMENT SYSTEMS 1: AbbottHandler.HA Ver: 2.1.1.538 Importer Version: 3.1.0.504 Product name: Version: US Internal version: <info not available>.<info not available>.<info no
On Fri, 2011-11-11 at 12:42 -0600, williambuell wrote:> I am a 62 year old beginner in Ubuntu. Thanks for any help, guidance, suggestions on this problem! > > I have used commands like the following to be certain that I have an active com port: > dmesg | grep ttyS > rm com1 > ln -s /dev/ttyS0 com1 > > So I suspect the solution lies somewhere in WINE. > > If all else fails I will get a USB to SERIAL converter cable and try that. > > My wife has an Abbott Labs Freestyle Lite Glucose meter which uploads to a program called COPILOT via RS232. I was only able to get it to work on ONE of our three Windows XP machines. I tried all day to get it to work on a Dell XP converted to Ubuntu (Gnu/Linux) which d...oes have an RS232 and TERMINAL commands indicate that the system recognizes that COM port. I am running COPILOT with WINE (which lets Windows programs run under Ubuntu). > > I have yet to master the secrets of Wine REGEDIT: > > WINE Regedit > > If I navigate to .wine and then to drive_c and then to windows I can issued the REGEDIT command and edit the wine registry and navigate to the HKEY_LOCAL_MACHINE -> HARDWARE -> DESCRIPTION -> SERIALCOMM > > I have tried to add "COM1"="COM1" to that SERIALCOMM, and the add shows but then it disappears the next time I run REGEDIT. > > I found THIS excerpt which seems pertinent: > > BEGINNING OF EXCERPT > > I have COM1 on wine apps. I symlinked ttyS0 and added these keys > > Code: > [HARDWARE\\DEVICEMAP\\SERIALCOMM] > "COM1"="COM1" > "COM2"="COM2" > > But regedit deletes them. > > If I do this > > Code: > wine regedit serial.reg > wine regedit > > I see the keys. > I open my program with regedit opened and I see com1 and com2 > > But If I close regedit, then keys disappears... > > The EXPERT explains: It's not regedit, they are never saved. > > [HKLM\HARDWARE] is a volatile registry branch - it exists in memory only and is not being saved to disk. > > Just add it to ~/.wine/system.reg. Be careful editing that file, if you break it whole registry can get corrupt. > > END OF EXCERPT > > I DID TRY THIS: > > BEGINNING OF EXCERPT: > Usually with a com port it is a permissions issue. Some programs need further fixes in wine, but often if you cannot see it, it is a permissions issue. Previously you needed to add a link to the port under dos devices, but more recently it seems to auto detect ports. If desperate check that your bios has the serial port enabled, and try loging as a super user and changing the permissions to read and write for anyone on all of the serial ports (it usually reverts when you reboot): > chmod 775 /dev/ttyS* > If this fixes your problem then you know it is a permission issue and then can research how set it up with a more delicate touch. > END OF EXCERPT > > In wine's system.reg way at the bottom of the file I find: > > [System\\CurrentControlSet\\Control\\Class\\ .... lots of numbers > @="Ports (Com & Lpt)" > "Class"="Image" > > AND I SUSPECT that if I add something here e.g. "COM1"="COM1" > "COM2"="COM2" > then possibly my application might work and read the com port > > BUT I am not certain exactly what to add. > > This may be another place to add COM1 lines > > win.ini > > http://www.sdconsult.no/linux/wine-doc/pkg-implementation.html > > e.g. > > Com1=/dev/ttyS0 > Com2=/dev/ttyS1 > Com3=/dev/modem,38400 > Com4=/dev/modem > > I am saving COPIES of each file that I tamper with in case it becomes corrupted. > > Today I will walk up the street to J&R Computers and purchase a USB to Serial converter cable and give that a try. > > The glucose meter is Abbot Labs FreeStyle Lite > The program in question is > COPILOT HEALTH MANAGEMENT SYSTEMS > 1: AbbottHandler.HA Ver: 2.1.1.538 > > Importer Version: 3.1.0.504 > > Product name: > Version: US > Internal version: <info not available>.<info not available>.<info no > > > >
On Fri, 2011-11-11 at 12:42 -0600, williambuell wrote:> I am a 62 year old beginner in Ubuntu. Thanks for any help, guidance, suggestions on this problem! > > I have used commands like the following to be certain that I have an active com port: > dmesg | grep ttyS >This won't necessarily tell you anything useful for several reasons. The prime one is that the default kernel parameters always create /dev/ttyS[0-3] regardless of whether your computer has any serial ports or not. The secondary reason is that, some time back you were right and reading through /var/log/messages showed serial ports (referred to as UARTS and normally with a hardware type of 16550) but more recent kernels don't do this - probably since UDEV device management became the norm. Neither of my systems (a laptop with serial ports, the other with 6 serial ports installed) give any grep hits for ttyS, UART or 16550 regardless of whether I use dmesg to feed grep or simply run grep ttyS /var/log/messages* The best way I know to find real serial ports is to use setserial with the -a option, which tells it to report on the state of the port without doing anything else. Here are a couple of examples: The first is on the machine with serial ports installed: # setserial -a /dev/ttyS0 /dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4 Baud_base: 115200, close_delay: 50, divisor: 0 closing_wait: 3000 Flags: spd_normal skip_test The second is on the laptop, which has no serial ports: # setserial -a /dev/ttyS0 /dev/ttyS0, Line 0, UART: unknown, Port: 0x03f8, IRQ: 4 Baud_base: 115200, close_delay: 50, divisor: 0 closing_wait: 3000 Flags: spd_normal skip_test The clue is the on the first line of setserial output: if it says "UART: unknown" then you're looking at one of the kernel's imaginary serial ports while if it says "UART: 16550A" or similar, you've found one which is mapped onto actual physical hardware and which, hopefully, has an accessible D-9 connector attached to it. I'm able to use any of my serial ports (/dev/ttyS[0-5]) from a Wine application without needing any symlinks: the application can find them directly, but the same application has never been able to find a known good USB serial adapter (supplied by pfranc some time back and used successfully with the Linux programs kermit and minicom) but, of course, ymmv. Martin
williambuell wrote:> HKEY_LOCAL_MACHINE -> HARDWARE -> DESCRIPTION -> SERIALCOMM > > I have tried to add "COM1"="COM1" to that SERIALCOMM, and the add shows but then it disappears the next time I run REGEDIT. >Correct. That branch (LOCAL_MACHINE\Hardware) is a volatile branch - it's not persistent and exists in wineserver's memory only. This also means it's not being saved to disk. williambuell wrote:> [System\\CurrentControlSet\\Control\\Class\\ .... lots of numbers > @="Ports (Com & Lpt)" > "Class"="Image" > > AND I SUSPECT that if I add something here e.g. "COM1"="COM1" > "COM2"="COM2" > then possibly my application might work and read the com port > > BUT I am not certain exactly what to add. >Modifying registry files directly on disk without using regedit is highly discouraged. Basically you break it you own it. The mandatory warning aside, you are on the right track. Wineserver won't turn regular registry branch into a volatile if it already exists. Numbers mean last time modified. You can copy them from any other branch. williambuell wrote:> This may be another place to add COM1 lines > win.ini >Doubt it's your problem.