HP-UX do not work with the same options for the stty command as on other POSIX systems. It is not possible to specify the specific tty to get stty info from. There is however a specific HP-UX command that returns some info called ttytype. A typical output from ttytype -s would be:
Æsh needs to detect HP-UX, and have specific logic to get the info needed.