IRIX Comport TTYD -
PierreDR - 04-04-2021
Hi Everyone,
Great to find this forum!
I have software that runs with a config file pointing to /dev/ttyd1 for serial port 1 on an INDY box running IRIX5.3.
Serial port 1 physically may be damaged. Serial port 2 is available.
Is there a relatively simple way to swap comports between 1 and 2 making physical port 2 "ttyd1" and physical port 1 "ttyd2"?
I have looked in /etc/inittab am considering changing it there.
Any help greatly appreciated.
RE: IRIX Comport TTYD -
robespierre - 04-04-2021
It's good you mention the version of Irix, as that is significant. Irix 5.3 is prior to hwgfs, so the mapping of device names to devices is by number only. The device files are just placeholders: all their functionality is actually located in the kernel, tied to the major and minor device numbers. The script /dev/MAKEDEV generates all the device files.
You can list the major,minor device numbers of a node using
Quote:ls -l /dev/ttyd1
, for example.
The mkdev command creates nodes with specified major & minor numbers.
So just swap the minor numbers associated with the ttyd1 and ttyd2 files and the ports will swap places.
RE: IRIX Comport TTYD -
PierreDR - 04-05-2021
Hi Robespierre.
Had a look at the two devices with ls -l /dev/ttyd1 and ls -l /dev/ttyd2.
Removed the two devices and made new ones with mknod /dev/ttyd1 c 0 1 and mknod /dev/ttyd1 c 0 2.
Ran chmod 666 /dev/ttyd1.
System running again seeing /dev/ttyd1 physically using port 2...
Thanks for your help it is much appreciated.
RE: IRIX Comport TTYD -
robespierre - 04-05-2021
Great, and I'm happy you were able to read around my mistakes (I typoed "mkdev" for "mknod" heh)