Difference between revisions of "RS232"

From vice-emu
Jump to: navigation, search
m (rs232 over ip)
m (connect two VICE instances on the same host)
Line 28: Line 28:
 
=== connect two VICE instances on the same host ===
 
=== connect two VICE instances on the same host ===
  
  socat tcp-listen:25232 tcp-listen:25231
+
  $ socat tcp-listen:25232 tcp-listen:25231
  
 
config instance #1
 
config instance #1
  
  127.0.0.1:25232
+
  RsUserEnable = 1
 +
RsUserBaud = 2400
 +
RsUserDev = 2
 +
 
 +
RsDevice2 = 127.0.0.1:25232
 +
RsDevice2Baud = 2400
  
 
config instance #2
 
config instance #2
  
  127.0.0.1:25231
+
  RsUserEnable = 1
 +
RsUserBaud = 2400
 +
RsUserDev = 2
 +
 
 +
RsDevice2 = 127.0.0.1:25231
 +
RsDevice2Baud = 2400
  
 
==== linux ====
 
==== linux ====

Revision as of 21:38, 25 July 2019

here i will track some things regarding rs232 emulation, and perhaps fix things while at it Gpz (talk) 19:29, 25 July 2019 (CEST)

using a real RS232 port

This works by using the device name of your OS, VICE uses physical RS232 ports.

linux

/dev/ttyUSB0

status: working out of the box

windows

  • the windows driver understands various options passed in the so called "mode string" after a colon after the ports name
COMx[:][baud=b][parity=p][data=d][stop=s][to={on|off}][xon={on|off}][odsr={on|off}][octs={on|off}][dtr={on|off|hs}][rts={on|off|hs|tg}][idsr={on|off}]
  • finding out what COM port the usb adapter ended up might be tricky, you can use a tool like "Keyspan Serial Assistant"

status: working after some massaging of the code

rs232 over ip

This works by using the IP and port you are connecting to, VICE will use a TCP socket.

connect two VICE instances on the same host

$ socat tcp-listen:25232 tcp-listen:25231

config instance #1

RsUserEnable = 1
RsUserBaud = 2400
RsUserDev = 2
RsDevice2 = 127.0.0.1:25232
RsDevice2Baud = 2400

config instance #2

RsUserEnable = 1
RsUserBaud = 2400
RsUserDev = 2
RsDevice2 = 127.0.0.1:25231
RsDevice2Baud = 2400

linux

status: works

windows

status: works

connect two VICE instances on different hosts

piping to an external program

linux

status: untested

windows

status: untested

TODO

  • whether the "UP9600" (daniel dallmann) hack is being used seems to depend on the baudrate(?). this should be a seperate option

driver issues

  • handling of DTR and RTS seems to be completely missing. rs232dev_set_status, rs232dev_get_status, rs232dev_set_bps apparently are not called by the layer above

user interface

  • a couple of typical rs232 settings should probably be configurable for at least "real rs232 port at host". (behavior of DTR, RTS...)

links