08/04/15 06:01:34
***********************************************************************
In octave on cygwin
octave>f=fopen('/dev/ttyS0','r+');
makes open com1
octave>fprintf(f,'ATI\n');
sometime reliarize the writting commamds, however read from device fails
octave>id=fscanf(f,'%s')
make octave hangup.
Thefore just after fopen it is required to execute
octave>fcntl(f,F_SETFL,O_NONBLOCK)
(Modem in Note PCs' are almost software modem and then AT codes sometimes is failed)
In MSVC and Mingw octave
octave>fcntl(f,F_SETFL,O_NONBLOCK)
cannot work.
So I do not execute fcntl and execute f=fopen('COM1','r+') wihout fcntl does not give an error and
file handle =3 returns.
However, fscanf gets junk data from buffer somewhere else but not COM1.
>>485 続きです。
***************************************
Any suggestion?