VOGONS

Common searches


Serial Issues

Topic actions

First post, by caltrop

User metadata
Rank Newbie
Rank
Newbie

DOSbox serial has always been an issue with all my systems
back through Mint Mate 18.1

it is erratic at best, sometimes working, most times not

I use several programs that require serial interface through DOS:
HP48 PDL & HP version of Columbia University Kermit Transfer

Windows XP requiring serial works flawlessly in the virtual machine
only DOSbox has issues

then there is the MIDI issue...
which makes old DOS worthless

I even set the irq & port

serial1=directserial realport:ttyUSB0 irq:4 port:0x3f8
#serial2=directserial realport:ttyUSB1 irq:3 port:0x2f8
crw-rw----+ 1 root dialout 188, 0 2022-05-11 21:18 /dev/ttyUSB0

chmod to all read write

crw-rw-rw-+ 1 root dialout 188, 0 2022-05-11 21:18 /dev/ttyUSB0
serial status using various utilities:

Bus 001 Device 108: ID 2478:2008 Tripp-Lite U209-000-R Serial Port
/dev/ttyUSB0, UART: 16654, Port: 0x0000, IRQ: 0
crw-rw-rw-+ 1 root dialout 188, 0 2022-05-11 21:18 /dev/ttyUSB0

MAJOR 188
MINOR 0
ID_PCI_CLASS_FROM_DATABASE Serial bus controller
ID_PCI_SUBCLASS_FROM_DATABASE USB controller
ID_PCI_INTERFACE_FROM_DATABASE XHCI
ID_VENDOR_FROM_DATABASE Tripp-Lite
ID_MODEL_FROM_DATABASE U209-000-R Serial Port
ID_SERIAL 2478_2008
ID_USB_DRIVER pl2303

groups: caltrop adm dialout cdrom sudo dip plugdev lpadmin sambashare

dosbox log file I created
$ dosbox > dosbox.log &

================================================================================
2022-05-11 20:52:58 Wed
--------------------------------------------------------------------------------
DOSBox version 0.74-3
Copyright 2002-2019 DOSBox Team, published under GNU GPL.
---
CONFIG:Loading primary settings from config file /home/caltrop/.dosbox/dosbox-0.74-3.conf
MIXER:Got different values from SDL: freq 22050, blocksize 512
ALSA:Can't subscribe to MIDI port (65:0) nor (17:0)
MIDI:Opened device:none
Serial1: Opening ttyUSB0
One joystick reported, initializing with 4axis
Using joystick STD AxisPad with 4 axes, 20 buttons and 1 hat(s)
Serial1: Errors: Framing 0, Parity 0, Overrun RX:13 (IF0:0), TX:0, Break 0
Serial1: Errors: Framing 0, Parity 0, Overrun RX:21 (IF0:0), TX:0, Break 0
Serial1: Errors: Framing 0, Parity 0, Overrun RX:13 (IF0:0), TX:0, Break 0
Serial1: Errors: Framing 0, Parity 0, Overrun RX:21 (IF0:0), TX:0, Break 0
Serial1: Errors: Framing 0, Parity 0, Overrun RX:13 (IF0:0), TX:0, Break 0
Serial1: Errors: Framing 0, Parity 0, Overrun RX:21 (IF0:0), TX:0, Break 0
Serial1: Errors: Framing 0, Parity 0, Overrun RX:13 (IF0:0), TX:0, Break 0
Serial1: Errors: Framing 0, Parity 0, Overrun RX:21 (IF0:0), TX:0, Break 0
Serial1: Errors: Framing 0, Parity 0, Overrun RX:13 (IF0:0), TX:0, Break 0
Serial1: Errors: Framing 0, Parity 0, Overrun RX:21 (IF0:0), TX:0, Break 0
Serial1: Errors: Framing 0, Parity 0, Overrun RX:13 (IF0:0), TX:0, Break 0
Serial1: Errors: Framing 0, Parity 0, Overrun RX:14 (IF0:0), TX:0, Break 0
Serial1: Errors: Framing 0, Parity 0, Overrun RX:13 (IF0:0), TX:0, Break 0
Serial1: Errors: Framing 0, Parity 0, Overrun RX:21 (IF0:0), TX:0, Break 0

Reply 4 of 11, by caltrop

User metadata
Rank Newbie
Rank
Newbie

here we are in 2023 with a newer system & newer Mint Mate and the serial issues persist
it sometimes works, mostly not, something is causing serial communication to fail in DOSBox

    DOSBox   0.74-3
OS Linux Mint 20.1 ulyssa
Kernel GNU/Linux 5.4.0-153-generic x86_64
Kernel ver #170-Ubuntu SMP Fri Jun 16 13:43:31 UTC 2023
Desktop MATE Desktop Environment 1.24.0
Bash 5.0.17(1)-release x86_64-pc-linux-gnu
Mono Font DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

all TTY permissions are changed prior to starting DOSBox

ID_VENDOR_FROM_DATABASE Future Technology Devices International, Ltd
ID_MODEL_FROM_DATABASE FT2232C/D/H Dual UART/FIFO IC
/dev/ttyUSB0, UART: unknown, Port: 0x0000, IRQ: 0
crw-rw-rw-+ 1 caltrop caltrop 188, 0 2023-08-05 09:10 /dev/ttyUSB0
/dev/ttyUSB1, UART: unknown, Port: 0x0000, IRQ: 0
crw-rw-rw-+ 1 caltrop caltrop 188, 1 2023-08-05 09:10 /dev/ttyUSB1

ID_VENDOR_FROM_DATABASE Tripp-Lite
ID_MODEL_FROM_DATABASE U209-000-R Serial Port
/dev/ttyUSB2, UART: 16654, Port: 0x0000, IRQ: 0
crw-rw-rw-+ 1 caltrop caltrop 188, 2 2023-08-05 09:10 /dev/ttyUSB2

DOSBox Config

serial1=directserial realport:ttyUSB0 irq:4 port:0x3f8 # COM1 Future Tech
serial2=directserial realport:ttyUSB1 irq:3 port:0x2f8 # COM2 Future Tech
serial3=disabled
serial4=disabled

Reply 5 of 11, by caltrop

User metadata
Rank Newbie
Rank
Newbie

LINUX UPDATE - 2023 quickly ending

currently using the Future Technology (no WinXP drivers) device for DOSBox
the Tripp-Lite (has WinXP drivers) device is dedicated to a virtual WinXP
but the device should not matter...

I've tried EVERYTHING and SERIAL still is intermittent at best

I now have EVERYTHING set to READ/WRITE

no more sudo chmod... now that I have rules.d

$ cat /etc/udev/rules.d/50-udev.rules
KERNEL=="ttyUSB[0-9]*", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2478", ATTRS{idProduct}=="2008", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="4102", ATTRS{idProduct}=="1007", MODE="0666"
$ lsusb-s.sh
┌──────────────────────────────────────────────────────────────────────────────┐
│ List Select USB │
└──────────────────────────────────────────────────────────────────────────────┘
Bus 001 Device 015: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC
001 015 0403 6010
crw-rw-rw- 1 root root 189, 14 2023-09-17 11:28 /dev/bus/usb/001/015

Bus 001 Device 016: ID 2478:2008 Tripp-Lite U209-000-R Serial Port
001 016 2478 2008
crw-rw-rw- 1 root root 189, 15 2023-09-17 11:28 /dev/bus/usb/001/016
$ ll /dev/ttyUSB*
crw-rw-rw-+ 1 root dialout 188, 0 2023-09-17 11:36 /dev/ttyUSB0
crw-rw-rw-+ 1 root dialout 188, 1 2023-09-17 11:29 /dev/ttyUSB1
crw-rw-rw-+ 1 root dialout 188, 2 2023-09-17 11:29 /dev/ttyUSB2

Reply 6 of 11, by davidrg

User metadata
Rank Member
Rank
Member
caltrop wrote on 2022-05-21, 14:29:

I use several programs that require serial interface through DOS:
HP48 PDL & HP version of Columbia University Kermit Transfer

If you're still trying to run MS-DOS Kermit in DOSbox, have you considered not using DOSbox? Kermit is available for practically every platform under the sun so there is possibly no need to run the DOS version under an emulator.

On UNIX/Linux/MacOS X there is C-Kermit. Its available from the Debian/Ubuntu/Rasbian repositories and pretty trivial to build from source. And on Windows (nearly all 32bit and 64bit versions) and OS/2 there is C-Kermit for Windows, the successor to Kermit 95, which I maintain.

Instructions for using C-Kermit with HP48 calculators is available on The Kermit Project website here: https://www.kermitproject.org/hp48filetransfer.html. These instructions should work fine on the Windows version too as its based on the Linux/UNIX version.

Reply 7 of 11, by caltrop

User metadata
Rank Newbie
Rank
Newbie

here's the latest...

start dosbox
run program that uses serial
exit that program
run another program that uses serial
serial has QUIT working

so it's a one-off using serial communication in dosbox
why...?

EVERYTHING is read write

Serial bus controller|USB controller|XHCI|Future Technology Devices International, Ltd|FT2232C/D/H Dual UART/FIFO IC|
crw-rw-rw- /dev/ttyUSB0

Serial bus controller|USB controller|XHCI|Future Technology Devices International, Ltd|FT2232C/D/H Dual UART/FIFO IC|
crw-rw-rw- /dev/ttyUSB1

Serial bus controller|USB controller|XHCI|Tripp-Lite|U209-000-R Serial Port|
crw-rw-rw- /dev/ttyUSB2

Reply 8 of 11, by caltrop

User metadata
Rank Newbie
Rank
Newbie

got serial working in DOSBox... sort of...

Linux script runs DOSBox with a DOS batch command that then exits DOSBox
pld.sh -> dosbox -c pdl.bat & -> exit dosbox
repeat for more serial communication

make a shortcut & a click is all it takes
I can live with this one-off automated scripting system

SOMETHING LOCKS UP AFTER USING SERIAL COMMUNICATION ONCE
THEN DOSBOX NEEDS RESRARTING

/etc/udev/rules.d/50-udev.rules

KERNEL=="ttyUSB[0-9]*", MODE="0666", GROUP="dialout"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0666", GROUP="dialout"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2478", ATTRS{idProduct}=="2008", MODE="0666", GROUP="dialout"
SUBSYSTEM=="usb", ATTRS{idVendor}=="4102", ATTRS{idProduct}=="1007", MODE="0666"

current configuration

$ sudo chgrp dialout /usr/bin/dosbox
-rwxr-xr-x 1 root dialout 2.6M 2020-03-22 10:38 /usr/bin/dosbox

Bus 001 Device 015: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC
crw-rw-rw- 1 root dialout 189, 14 2023-09-23 08:40 /dev/bus/usb/001/015

crw-rw-rw-+ 1 root dialout 188, 0 2023-09-23 08:40 /dev/ttyUSB0
crw-rw-rw-+ 1 root dialout 188, 1 2023-09-23 08:40 /dev/ttyUSB1

Reply 9 of 11, by caltrop

User metadata
Rank Newbie
Rank
Newbie

well... this is it for me posting about DOSBox Serial issues
got it to an acceptable level but it is still NOT right!

UPDATE 2023-10-16

it is truly a ONE-OFF SERIAL EXPERIENCE!

more than one instance of DOSBox running - serial quits!!!

recap:
run DOSBox once, use serial, then exit
do not run more than one instance of DOSBox
have all the permissions set to read/write

running Linux

Get Your Codes: there will be a long list...

$ lsusb
...
Bus 001 Device 015: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC
... 2478:2008 Tripp-Lite U209-000-R Serial Port
... 4102:1007 iRiver, Ltd. iFP-700 series mp3/ogg vorbis player
...

Set Your Rules - root access: /etc/udev/rules.d/50-udev.rules

KERNEL=="ttyUSB[0-9]*", MODE="0666", GROUP="dialout"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0666", GROUP="dialout"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2478", ATTRS{idProduct}=="2008", MODE="0666", GROUP="dialout"
SUBSYSTEM=="usb", ATTRS{idVendor}=="4102", ATTRS{idProduct}=="1007", MODE="0666"

REBOOT!

Check Permissions - if you want...
crw-rw-rw-+ what's that '+' ???

$ ls -l /dev/ttyUSB*
crw-rw-rw-+ 1 root dialout 188, 0 2023-10-15 17:27 /dev/ttyUSB0
crw-rw-rw-+ 1 root dialout 188, 1 2023-10-13 15:11 /dev/ttyUSB1
$ ls -l /dev/bus/usb/001/015
crw-rw-rw- 1 root dialout 189, 14 2023-10-13 15:11 /dev/bus/usb/001/015

Start DOSBox - with a command

#!/usr/bin/bash
dosbox -c pdl &

DOSBox - batch command
drive I: needs mounting in dosbox-0.74-3.conf
this happens to match my virtual Windows XP
which has no issue with serial communication
but is a pain to run & backup

rem PDL.BAT
@echo off
cls
i:
cd \pdl
rem pdl.exe
pdl
exit

yes I still use OLD serial stuff:
my old Garmin GPS's
my old HP48 SX(died)/G(auction find)/GX(college days)
the HP48 series is the BEST calculator ever made

the iRiver MP3 player is not really serial
but the program just would not work until I tried 'sudo ifp'
then I discovered '/etc/udev/rules.d/50-udev.rules'
I learned about system permissions in this SERIAL adventure
which allowed me to fix other stuff

but DOSBox is still ONE-OFF for SERIAL COMMUNICATION

Reply 10 of 11, by thp

User metadata
Rank Member
Rank
Member

Why do the chmod shenanigans and not just add your user to the “dialout” group? The device nodes are already group-read-writable by default.

Docs: https://wiki.debian.org/SystemGroups

Reply 11 of 11, by caltrop

User metadata
Rank Newbie
Rank
Newbie

USER is already in the DIALOUT group!

$ groups user
user : user adm dialout cdrom sudo dip plugdev lpadmin sambashare vboxusers

what I have done is the only thing that works
and it is still a ONE-OFF
anyway I quit chmod & use /system/etc/udev/rules.d/50-udev.rules to enable full access

KERNEL=="ttyUSB[0-9]*", MODE="0666", GROUP="dialout"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0666", GROUP="dialout"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2478", ATTRS{idProduct}=="2008", MODE="0666", GROUP="dialout"
SUBSYSTEM=="usb", ATTRS{idVendor}=="4102", ATTRS{idProduct}=="1007", MODE="0666"

start DOSBox
run a serial program
end that program
SERIAL COMMUNICATION QUITS
have to restart DOSBox
ONE-OFF SERIAL COMMUNICATION