wutka@gitpyr.UUCP (The Urbane Cowboy) (06/23/86)
I am having some strange problems with a terminal program I have written. For some reason, when it receives a NULL over the serial port, the window kinda dies. The program will continue to receive input through the serial port and print it, but I can't type anything nor close the window. Both of these are done with the window message stuff. I made sure that NULLs didn't get printed and that didn't make any difference...so the problem is that for some odd reason, a NULL received through the serial port is locking up the window. Has anyone had any trouble like this ?? Mark -- Mark Wutka Office of Computing Services Georgia Institute of Technology Atlanta, Ga. ...!{akgua,allegra,amd,hplabs,ihnp4,masscomp,ut-ngp}!gatech!gitpyr!wutka ...!{rlgvax,sb1,uf-cgrl,unmvax,ut-sally}!gatech!gitpyr!wutka Official member of NERDS (NERDS Existing in a Recursively Defined System)
higgin@cbmvax.cbm.UUCP (Paul Higginbottom) (06/23/86)
In article <1887@gitpyr.UUCP> wutka@gitpyr.UUCP (The Urbane Cowboy) writes: > I am having some strange problems with a terminal program I have written. >For some reason, when it receives a NULL over the serial port, the window >kinda dies. The program will continue to receive input through the serial >port and print it, but I can't type anything nor close the window. Both >of these are done with the window message stuff. I made sure that NULLs >didn't get printed and that didn't make any difference...so the problem is >that for some odd reason, a NULL received through the serial port is locking >up the window. Has anyone had any trouble like this ?? >Mark Wutka >Office of Computing Services >Georgia Institute of Technology >Atlanta, Ga. > >...!{akgua,allegra,amd,hplabs,ihnp4,masscomp,ut-ngp}!gatech!gitpyr!wutka >...!{rlgvax,sb1,uf-cgrl,unmvax,ut-sally}!gatech!gitpyr!wutka Dear Mark: It might be comforting for you to know that I have seen this behavior exhibited in other terminal programs I have seen. I personally believe it's a bug in the serial.device; i.e., if it receives a NULL it kinda goes weird. For example, turning on a Hayes Smartmodem 1200 seems to make it send a NULL to whatever it is connected to. This will HANG a terminal program I use. Solution: turn on modem before either connecting it to the Amiga, or turning on the Amiga. Sorry if this is bad news; however, it is just a theory, but I wanted you to know that you're not alone in seeing this. Regards, Paul Higginbottom Disclaimer: I do not work for Commodore and opinions expressed are my own.
dillon@PAVEPAWS.BERKELEY.EDU (Matt Dillon) (06/24/86)
Sounds like you didn't initialize your XON-XOFF characters. One of them is probably zero. This would cause the symptoms you described ( being able to receive characters but not being able to send characters!&Fgte t`at qgu eust be sure tg re%set t`e SERFWPDASABDED bat setaf t`e seraad fdags befgre t`e gpef afd mikm({}zm(i|/s the bit is set everytime you do a SDCMD_SETPARAMS to. Check the return code for SDCMD_SETPARAMS to make sure it actually set the parameters. If it gives an error, you did not initialize one of the parameters correctly. -Matt
dillon@PAVEPAWS.BERKELEY.EDU (Matt Dillon) (06/24/86)
>(Paul Higginbottom) >Dear Mark: > It might be comforting for you to know that I have seen this behavior >exhibited in other terminal programs I have seen. I personally believe it's >a bug in the serial.device; i.e., if it receives a NULL it kinda goes weird. > For example, turning on a Hayes Smartmodem 1200 seems to make it >send a NULL to whatever it is connected to. This will HANG a terminal program >I use. I very much doubt it's a problem with the serial device... My modem program has no trouble handling NULL's or any other character, neither does the console device. Additionaly, the protocols I use send NULL's all the time so there is some basis to my reasoning. (Still, if somebody can find a bug with the serial.device, come forward! I think, however, that it's mainly improperly setup iorequest fields for SDCMD_SETPARAMS). -Matt
papa@bacall.UUCP (Marco Papa) (06/27/86)
> > Sounds like you didn't initialize your XON-XOFF characters. One > of them is probably zero. This would cause the symptoms you described ( > being able to receive characters but not being able to send characters). > > Note that you must be sure to re-set the SERF_XDISABLED bit set > in the serial flags before the open (and make sure it's the bit is set > everytime you do a SDCMD_SETPARAMS to. > > Check the return code for SDCMD_SETPARAMS to make sure it actually > set the parameters. If it gives an error, you did not initialize one of > the parameters correctly. > > -Matt Sorry, Matt, but I believe the original report was right. I reported the bug with the serial device a while ago. Anybody that has more info can refer to my report number when contacting Commodore-Amiga: Serial device problem: # B2926 I have seen this with my own terminal program, A-Talk, with Maxicomm, and with Online!. The problem appears only when using X-on/X-off. I believe that all three programs set up correctly the X-on/X-off characters: 11130000 I could not easily reproduce the problem. One way is to connect to noisy lines, or to a switch (like a micom). While in the initial connection, the host does not know the baud rate, and garbage appears. A short burst of data, possibly containing a NULL (but I am not sure about it), will lock the program. Note that I (and I believe the other programs also) do not do any busy wait. Just SendIO, which should always return. Instead the serial device locks the program, and if one tries to access menus, all the messages are queued, but not serviced. If one then connects the cable to an IBM PC in the same room where the Amiga is, and then types a ^Q (CTRL-Q), all of a sudden everything comes alive, and all the queued messages are serviced in short sequence. Of course, if you do not have a way to send a ^Q (and few people have two machines in the same room), the only solution is to reboot. All other programs will still work properly. There is no problem if X-on/X-off is not active. The bug is also present in WB 1.2 Beta2. This bug is very annoying for terminal program writers and users, so if you have any more insights on this, please send your bug report to Commodore- -Amiga and refer to the above bug report number. Marco Papa Felsina Software