LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   trouble with serial ports and wine (https://www.linuxquestions.org/questions/linux-newbie-8/trouble-with-serial-ports-and-wine-115382/)

supradrvr 11-12-2003 06:49 PM

trouble with serial ports and wine
 
I am trying to run a program under wine that needs read and write access to com1. When I try and comunicate with the serial port the app thinks that the port is in use. in the terminal wine says to check my permisions. I have ownership of ttyS0 and read and write access. I can use a serial mouse with no problems. Is there anyway to get full read and write access to the com port safely. I dont want to run wine as root. I am trying to switch over fully to linux. I am using Mandrake 9.1. My system is twice as fast in linux and I love the stability, but I need this app to work. I have enabled the read and write in the wine config file and set the speed of the com port. Would be greatfull for suggestions.

Thanks:D

xode 11-12-2003 09:16 PM

Is the mouse attached to COM1? You might try to get the app to access COM2.

supradrvr 11-12-2003 09:19 PM

I only used the mouse to see if the port was working properly. I have tried with no device attatched to the port and it still says its in use.

xode 11-12-2003 11:57 PM

My understanding: (1) when you do run wine as root, you can get the app to access COM1 and work; (2) any purely Linux program that uses COM1 can access the port; (3) the app can't access COM1 if you don't run wine as root.

Is this correct?

mhearn 11-13-2003 03:12 AM

Try running it as root and see if that's fixed.

supradrvr 11-13-2003 07:17 AM

ran as root, no change. here is my screen dump.

fixme:win32:SetCriticalSectionSpinCount critsection=0x653cf7a0: spincount=1000 not supported
fixme:win32:SetCriticalSectionSpinCount critsection=0x653cf810: spincount=1000 not supported
fixme:font:WineEngCreateFontInstance Untranslated charset 255
fixme:font:WineEngCreateFontInstance Untranslated charset 255
fixme:win32:GetCalendarInfoA (00000409,00000001,20000030,(nil),0,0x407f1d2c): quarter-stub
fixme:win32:GetCalendarInfoW (00000409,00000001,20000030,(nil),0,0x407f1d2c): quarter-stub
err:dosfs:DOSFS_CreateCommPort Couldn't open device '/dev/ttyS0, 9600' ! (check permissions)
fixme:dosfs:DOSFS_OpenDevice device open L"COM1" not supported (yet)
err:file:CreateFileW Couldn't open device L"COM1"!

Here is my config file.

WINE REGISTRY Version 2
;; All keys relative to \\Machine\\Software\\Wine\\Wine\\Config

;;
;; MS-DOS drives configuration
;;
;; Each section has the following format:
;; [Drive X]
;; "Path"="xxx" (Unix path for drive root)
;; "Type"="xxx" (supported types are 'floppy', 'hd', 'cdrom' and 'network')
;; "Label"="xxx" (drive label, at most 11 characters)
;; "Serial"="xxx" (serial number, 8 characters hexadecimal number)
;; "Filesystem"="xxx" (supported types are 'msdos'/'dos'/'fat', 'win95'/'vfat', 'unix')
;; This is the FS Wine is supposed to emulate on a certain
;; directory structure.
;; Recommended:
;; - "win95" for ext2fs, VFAT and FAT32
;; - "msdos" for FAT16 (ugly, upgrading to VFAT driver strongly recommended)
;; DON'T use "unix" unless you intend to port programs using Winelib !
;; "Device"="/dev/xx" (only if you want to allow raw device access)
;;

[Drive A]
"Type" = "floppy"
"Path" = "/mnt/floppy"
"Label" = "/mnt/floppy"
"Device" = "/dev/floppy/0"

[Drive C]
"Path" = "/home/chris/mswin/"
"Type" = "hd"
"Label" = "/home/chris/C/"
"Filesystem" = "win95"

[Drive D]


[Drive E]
"Type" = "cdrom"
"Path" = "/mnt/cdrom"
"Label" = "/mnt/cdrom"
"FileSystem" = "win95"
"Device" = "/dev/scsi/host0/bus0/target0/lun0/cd"

[Drive F]
"Type" = "cdrom"
"Path" = "/mnt/cdrom2"
"Label" = "/mnt/cdrom2"
"FileSystem" = "win95"
"Device" = "/dev/scsi/host0/bus0/target1/lun0/cd"

[Drive X]
"Type" = "hd"
"Path" = "/tmp"
"Label" = "Tmp Drive"
"FileSystem" = "win95"

[Drive Y]


[Drive Z]
"Type" = "network"
"Path" = "/"
"Label" = "Root"
"FileSystem" = "win95"

[wine]
"Windows" = "C:\\Windows"
"System" = "C:\\Windows\\System"
"Temp" = "X:\\"
"Path" = "C:\\Windows;C:\\Windows\\System;X:\\"
"GraphicsDriver" = "x11drv"
; Wine doesn't pass directory symlinks to Windows programs by default.
; Enabling this may crash some programs that do recursive lookups of a whole
; subdir tree in case of a symlink pointing back to itself.
;"ShowDirSymlinks" = "1"
"ShellLinker" = "wineshelllink"

# <wineconf>

[DllOverrides]
"commdlg" = "builtin, native"
"comdlg32" = "builtin, native"
"ver" = "builtin, native"
"version" = "builtin, native"
"shell" = "builtin, native"
"shell32" = "builtin, native"
"shfolder" = "builtin, native"
"shlwapi" = "builtin, native"
"lzexpand" = "builtin, native"
"lz32" = "builtin, native"
"comctl32" = "builtin, native"
"commctrl" = "builtin, native"
"advapi32" = "builtin, native"
"crtdll" = "builtin, native"
"mpr" = "builtin, native"
"winspool.drv" = "builtin, native"
"ddraw" = "builtin, native"
"dinput" = "builtin, native"
"dsound" = "builtin, native"
"opengl32" = "builtin, native"
"msvcrt" = "native, builtin"
"rpcrt4" = "native, builtin"
"msvideo" = "builtin, native"
"msvfw32" = "builtin, native"
"mcicda.drv" = "builtin, native"
"mciseq.drv" = "builtin, native"
"mciwave.drv" = "builtin, native"
"mciavi.drv" = "native, builtin"
"mcianim.drv" = "native, builtin"
"msacm.drv" = "builtin, native"
"msacm" = "builtin, native"
"msacm32" = "builtin, native"
"midimap.drv" = "builtin, native"
; default for all other dlls
"*" = "native, builtin, so"

[x11drv]
; Number of colors to allocate from the system palette
"AllocSystemColors" = "100"
; Use a private color map
"PrivateColorMap" = "N"
; Favor correctness over speed in some graphics operations
"PerfectGraphics" = "N"
; Color depth to use on multi-depth screens
;;"ScreenDepth" = "16"
; Name of X11 display to use
;;"Display" = ":0.0"
; Allow the window manager to manage created windows
"Managed" = "Y"
; Use a desktop window of 640x480 for Wine
"Desktop" = "N"
; Use XFree86 DGA extension if present
; (make sure /dev/mem is accessible by you !)
"UseDGA" = "Y"
; Use XShm extension if present
"UseXShm" = "Y"
; Enable DirectX mouse grab
"DXGrab" = "N"
; Create the desktop window with a double-buffered visual
; (useful to play OpenGL games)
"DesktopDoubleBuffered" = "N"
; Code page used for captions in managed mode
; 0 means default ANSI code page (CP_ACP == 0)
"TextCP" = "0"
; Use this if you have more than one port for video on your setup
; (Wine uses for now the first 'input image' it finds).
;; "XVideoPort" = "43"
; Run in synchronous mode (useful for debugging X11 problems)
;;"Synchronous" = "Y"

[fonts]
;Read documentation/fonts before adding aliases
;See a couple of examples for russian users below
"Resolution" = "96"
"Default" = "-adobe-helvetica-"
"DefaultFixed" = "fixed"
"DefaultSerif" = "-adobe-times-"
"DefaultSansSerif" = "-adobe-helvetica-"

;; default TrueType fonts with russian koi8-r encoding
;"Default" = "-monotype-arial-*-*-*--*-*-*-*-*-*-koi8-r"
;"DefaultFixed" = "-monotype-courier new-*-*-*--*-*-*-*-*-*-koi8-r"
;"DefaultSerif" = "-monotype-times new roman-*-*-*--*-*-*-*-*-*-koi8-r"
;"DefaultSansSerif" = "-monotype-arial-*-*-*--*-*-*-*-*-*-koi8-r"
;; default cyrillic bitmap X fonts
;"Default" = "-cronyx-helvetica-"
;"DefaultFixed" = "fixed"
;"DefaultSerif" = "-cronyx-times-"
;"DefaultSansSerif" = "-cronyx-helvetica-"

[serialports]
"Com1" = "/dev/ttyS0, 9600"
"Com2" = "/dev/ttyS1, 9600"

[parallelports]
"Lpt1" = "/dev/lp0"

[spooler]
"LPT1:" = "|lpr"
"LPT2:" = "|gs -sDEVICE=bj200 -sOutputFile=/tmp/fred -q -"
"LPT3:" = "/dev/lp3"

[ports]
"read" = "0x779,0x379,0x280-0x2a0"
"write" = "0x779,0x379,0x280-0x2a0"

[spy]
"Exclude" = "WM_SIZE;WM_TIMER;"

[registry]
;These are all booleans. Y/y/T/t/1 are true, N/n/F/f/0 are false.
;Defaults are read all, write to Home
; Global registries (stored in /etc)
"LoadGlobalRegistryFiles" = "Y"
; Home registries (stored in ~user/.wine/)
"LoadHomeRegistryFiles" = "Y"
; Load Windows registries from the Windows directory
"LoadWindowsRegistryFiles" = "Y"
; TRY to write all changes to home registries
"WritetoHomeRegistryFiles" = "Y"
; Registry periodic save timeout in seconds
; "PeriodicSave" = "600"
; Save only modified keys
"SaveOnlyUpdatedKeys" = "Y"

[Tweak.Layout]
;; supported styles are 'Win31'(default), 'Win95', 'Win98'
"WineLook" = "Win98"

[Console]
;"Drivers" = "tty"
;"XtermProg" = "nxterm"
;"InitialRows" = "25"
;"InitialColumns" = "80"
;"TerminalType" = "nxterm"

[Clipboard]
"ClearAllSelections" = "0"
"PersistentSelection" = "1"

; List of all directories directly contain .AFM files

[afmdirs]
"1" = "/usr/share/ghostscript/fonts"
"2" = "/usr/share/a2ps/afm"
"3" = "/usr/share/enscript"
"4" = "/usr/X11R6/lib/X11/fonts/Type1"

[WinMM]
"Drivers" = "wineoss.drv"
"WaveMapper" = "msacm.drv"
"MidiMapper" = "midimap.drv"

# </wineconf>

#########################################
# Application dependent sections follow #
#########################################

[AppDefaults\\iexplore.exe\\DllOverrides]
"shell" = "native, builtin"
"shell32" = "native, builtin"
"shfolder" = "native, builtin"
"shlwapi" = "native, builtin"
"comctl32" = "native, builtin"
"commctrl" = "native, builtin"

[AppDefaults\\notes.exe\\DllOverrides]
"shlwapi" = "native"
"msvcrt" = "native"
"crtdll" = "native"
"ole32" = "builtin"
"oleaut32" = "builtin"
"olepro32" = "builtin"

[AppDefaults\\nlnotes.exe\\DllOverrides]
"shlwapi" = "native"
"msvcrt" = "native"
"crtdll" = "native"
"ole32" = "builtin"
"oleaut32" = "builtin"
"olepro32" = "builtin"
"netbios" = "builtin"

[AppDefaults\\nhldaemn.exe\\DllOverrides]
"shlwapi" = "native"
"msvcrt" = "native"
"crtdll" = "native"
"ole32" = "builtin"
"oleaut32" = "builtin"
"olepro32" = "builtin"

[AppDefaults\\_INS5576._MP\\x11drv]
; Lotus Notes R5 installer
; I'm quite not sure this will run on some other machine than mine, but it
; can't hurt
"Managed" = "N"
"Desktop" = "N"

[AppDefaults\\nlnotes.exe\\x11drv]
"Desktop" = "800x600"

Thanks for all the help.

mhearn 11-15-2003 06:53 AM

I'm not sure why it'd fail to open. Can you access those devices normally?

supradrvr 11-15-2003 08:58 AM

Yes. I can connect a mouse or a modem and use it fine within linux. In my app under wine it even tells me the serial port is ready, but when I try to access it, the program thinks its in use.


All times are GMT -5. The time now is 09:01 PM.