In order to allow DOSBox to use the serial ports of the computer you need to change the settings.
I do this in the conf file to have it in one location
[serial] # serial1-4 -- set type of device connected to com port. # Can be disabled, dummy, modem, nullmodem, directserial. # for directserial: realport (required), rxdelay (optional). serial1=directserial realport:com1 serial2=disabled serial3=directserial realport:com34 serial4=disabled
So this example setting means that com1 of my computer (Windows) is com1 in DOSBox and com34 of my computer is com 3 in DOSBox