help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Serial communication on octave for windows


From: Tatsuro MATSUOKA
Subject: Re: Serial communication on octave for windows
Date: Tue, 15 Apr 2008 13:42:38 +0900 (JST)

Hello

This is an addition of what I thought about.
Open('COM1') does perhaps  work well on MS-DOS.
However now is windows era.
Have to we need to use win32 api like the below ?
If so, should he need to write a C++ wrapper function to use it ? 

http://www.ee.fukui-nct.ac.jp/~yoneda/text/other/C/A_06.htm
(Sorry this page is written in Japanese but C codes can be readable.)

Oh I found in octave-forge windows package, 'COM Interface'.
Can he use it?

Regards
Tatsuro



--- Tatsuro MATSUOKA <address@hidden> wrote:

> Hello
> 
> On one of the Octave threads in Japan, topic of the serial comminucation 
> octave are posted.
> I do not know serial commucation on windows because I usually use vb6+OCX.
> 
> I found the below from the Nabble search,
> http://www.nabble.com/RS232-Serial-Comms-to7009561.html#a7009561
> 
> However the topic is rather old.  Have the situation been changed ?
> 
> The below is the translataion from questioner (translated Japanese by me)
> 
> ***********************************************************************
> 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. 
> ***************************************
> 
> Any suggestion?
> 
> Regards
> 
> Tatsuro
> 
> --------------------------------------
> GANBARE! NIPPON! Win your ticket to Olympic Games 2008.
> http://pr.mail.yahoo.co.jp/ganbare-nippon/
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
> 


--------------------------------------
GANBARE! NIPPON! Win your ticket to Olympic Games 2008.
http://pr.mail.yahoo.co.jp/ganbare-nippon/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]