[clug] USB to RS232 DB9 Adapter
George at Clug
Clug at goproject.info
Wed Aug 7 14:34:31 UTC 2019
Bryan,
To answer your question "But the polar software expects COM1 or COM2. How can I get /dev/ttyUSB0 to appear as COM1?"
>From what I can determine you have everything set up correctly.
Have you tried DOS's 'mode' command to see if you can set COM1 ? (that is if DOSBox has a 'mode' command like DOS does.
And previously you said;
" That command reports thus.
{
/dev/ttyUSB0
} "
To me this indicates that the name of your serial port is indeed "ttyUSB0"
On my computer when I used hwinfo;
# hwinfo --short
...
/dev/ttyS0 16550A
/dev/ttyS1 16550A
...
so I expect that the DOSBox settings should be;
...
[serial]
serial1=directserial realport:ttyS0
serial2=disabled
serial3=disabled
serial4=disabled
...
Which means that your settings should be correct from what I can determine (except I would suggest setting serial2 also to 'disabled').
...
serial1=directserial realport:ttyUSB0
serial2=dummy
serial3=disabled
serial4=disabled
...
At this point I would suggest 1) testing DOSBox using a different Serial device if you have one and DOS software to test it with, and/or 2) try a physical DOS computer that has a serial port.
I am starting to wonder if there is a flat battery or a fault with your Polar Heart rate hardware.
If you read below I have added some of the results of my Internet searching, all of which indicates you have your file correctly configured (except for "serial2=dummy").
George.
On Wednesday, 07-08-2019 at 22:47 Bryan Kilgallin via linux wrote:
> Thanks, Steve:
>
> >> I've installed DOSBox on my PC. And I've copied the Polar heart rate
> >> analysis software to a directory that DOSBox sees as C: drive.
> >>
> >> But the polar software expects COM1 or COM2. How can I get
> >> /dev/ttyUSB0 to appear as COM1?
> >
> >
> > DOSBox is more for old DOS games than running DOS programs, you might
> > have more luck with DOSEmu.
>
> Neither Ubuntu Software nor Synaptic Package Manager list that.
>
> > A quick google for "DOSBOX Linux Serial" points me to
> >
> > https://www.scivision.dev/ubuntulinux-dosbox-setting-up-usb-to-serial-rs232-port-convertor/
> >
> > Which has some steps for you to try.
> I've made the suggested tweaks.
>
> The DOSBox config file has these sections:
> * sdl;
> * dosbox;
> * render;
> * cpu;
> * mixer;
> * midi;
> * sblaster;
> * gus;
> * speaker;
> * joystick;
> * serial;
> * dos;
> * ipx; and
> * autoexec.
>
> I have posted a query on whether serial1 should be set to modem. Might I
> try some other serial setting tweak?
Doing a google search for; "debian" "how to" DOSBox "usb serial port" "serial1=directserial realport"
Returned;
http://sense.net/~egan/virtual82240b/
Linux Users:
Change/Verify serial port permissions. E.g., my :Linux server has a physical serial port (/dev/ttyS0), but it is not available for non-root and non-uucp users. To avoid any problems type:
chmod 666 /dev/device name
E.g. for my system:
chmod 666 /dev/ttyS0
NOTE: Your Linux serial port device may be different, e.g. if connecting your 50g with USB and if you have USB Serial setup (http://hptalx.sourceforge.net/hp49gplus.shtml#AEN35) then you would use /dev/ttyUSB*. Check your documentation.
Create a dosbox directory in your home directory (or anyplace else you like).
Create a new DOSBox config file in your ~/dosbox directory, with the following lines:
[serial]
serial1=directserial realport:serialport
serial2=disabled
serial3=disabled
serial4=disabled
[autoexec]
mount c path to dosbox directory
c:
Where serialport is your Linux serial port without the leading /dev/, e.g. my config file:
[serial]
serial1=directserial realport:ttyS0
serial2=disabled
serial3=disabled
serial4=disabled
[autoexec]
mount c /home/egan/dosbox
c:
After saving your configuration startup DOSBox. NOTE: Linux users don't get an easy to use icon to launch, so just type this:
cd ~/dosbox
dosbox -conf config
https://askubuntu.com/questions/1108267/usb-virtual-com-port
if the laptop is running ubuntu try typing "hwinfo --short" It will output a list of all devices with names and ports connected. The end of my list gives "/dev/ttyUSB0 Prolific PL2303 Serial port" and that is the device i have connected.
DOSBOX So running your app in a DOSBox i would need to type "serial1 directserial realport:ttyUSB0" in the dosbox terminal to make the app able to connect to COM1.
https://ubuntuforums.org/showthread.php?t=1871853
I know this is an old topic, but I ran into the same problem, and for the sake of clarity, my COM1 port is /dev/ttyUSB0 (usb to 9 pin serial) and my line for Dosbox is:
Code:
serial1=directserial realport:ttyUSB0
> --
> members.iinet.net.au/~kilgallin/
>
> --
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux
>
More information about the linux
mailing list