<div dir="ltr">If modem control is turned on you have to go into clocal mode to drain commands, otherwise its waiting for a carrier. That's one possibility.<div><br></div><div>-Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 25, 2019 at 3:14 PM Jeffrey Walton <<a href="mailto:noloader@gmail.com">noloader@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Everyone,<br>
<br>
I'm testing some software on DragonFly. There's not much to it. It<br>
talks to the modem, and sends an ATZ and then reads the response.<br>
Linux, FreeBSD, NetBSD, OpenBSD and OS X are OK.<br>
<br>
My test rig is DragonFly 5.6-RELEASE x86_64 (fully patched) with a<br>
USR5637 modem, <a href="https://www.amazon.com/gp/product/B0013FDLM0" rel="noreferrer" target="_blank">https://www.amazon.com/gp/product/B0013FDLM0</a>. The modem<br>
is located at /dev/cuaU0.<br>
<br>
DragonFly hangs on the call to tcdrain(3). Looking at the man page I<br>
don't see any special handling. Cf.,<br>
<a href="http://man.dragonflybsd.org/?command=tcdrain" rel="noreferrer" target="_blank">http://man.dragonflybsd.org/?command=tcdrain</a>.<br>
<br>
Attached is the reproducer. The trace is:<br>
<br>
% ./test.exe<br>
Setting TIOCEXCL<br>
Getting tty<br>
Setting tty options<br>
Flushing tty<br>
Setting tty<br>
Writing ATZ<br>
Waiting for write <<-- call to tcdrain(fd)<br>
<br>
Thanks.<br>
</blockquote></div>