How to access COM Port with Octave?

classic Classic list List threaded Threaded
13 messages Options
GMX
Reply | Threaded
Open this post in threaded view
|

How to access COM Port with Octave?

GMX
  Hey folks,

I have a question to Octave.
Is there a possibility to access the COM port in Octave? I'm using a
winXP maschine. I searched the web but still found no informations about
successful solutions.
Matlab offers a serial.m but I found nothing similar for Octave.

Thanks for your reply.
André
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to access COM Port with Octave?

tmacchant
Hello

Unfortunately at the moment, the serial com port have not been supported octave on windows.

Some volunteer persons need to write serial device functions using the win32 api libraries.

Regards

Tatsuro
 

--- GMX  wrote:

>   Hey folks,
>
> I have a question to Octave.
> Is there a possibility to access the COM port in Octave? I'm using a
> winXP maschine. I searched the web but still found no informations about
> successful solutions.
> Matlab offers a serial.m but I found nothing similar for Octave.
>
> Thanks for your reply.
> Andr将ア
> _______________________________________________
> Help-octave mailing list
> [hidden email]
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>


--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to access COM Port with Octave?

CdeMills
In reply to this post by GMX
GMX wrote
  Hey folks,

I have a question to Octave.
Is there a possibility to access the COM port in Octave? I'm using a
winXP maschine. I searched the web but still found no informations about
successful solutions.
Matlab offers a serial.m but I found nothing similar for Octave.
I wrote a similar program in C, performing the buffering and avoiding being blocked during write to file, it is used as an external command using popen. It runs on Linux using the termios interface. Under Windows, cygwin doesn't have this kind of lib. So the first point is to either work with the Win32 API, either find an open source serial lib.

Regards

Pascal
Reply | Threaded
Open this post in threaded view
|

Re: How to access COM Port with Octave?

Wolfgang Schechinger
A free C++ serial communications library for windows is here:

https://iftools.com/opensource/wxterm.en.php

HTH

Wo

-------- Original-Nachricht --------
> Datum: Wed, 22 Sep 2010 01:34:44 -0700 (PDT)
> Von: CdeMills <[hidden email]>
> An: [hidden email]
> Betreff: Re: How to access COM Port with Octave?

>
>
> GMX wrote:
> >
> >   Hey folks,
> >
> > I have a question to Octave.
> > Is there a possibility to access the COM port in Octave? I'm using a
> > winXP maschine. I searched the web but still found no informations about
> > successful solutions.
> > Matlab offers a serial.m but I found nothing similar for Octave.
> >
> >
>
> I wrote a similar program in C, performing the buffering and avoiding
> being
> blocked during write to file, it is used as an external command using
> popen.
> It runs on Linux using the termios interface. Under Windows, cygwin
> doesn't
> have this kind of lib. So the first point is to either work with the Win32
> API, either find an open source serial lib.
>
> Regards
>
> Pascal
> --
> View this message in context:
> http://octave.1599824.n4.nabble.com/How-to-access-COM-Port-with-Octave-tp2549270p2549915.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> [hidden email]
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

--
GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für nur 19,99 Euro/mtl.!*
http://portal.gmx.net/de/go/dsl
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to access COM Port with Octave?

andy buckle
On Wed, Sep 22, 2010 at 9:51 AM, Wolfgang Schechinger <[hidden email]> wrote:

> A free C++ serial communications library for windows is here:
>
> https://iftools.com/opensource/wxterm.en.php
>
> HTH
>
> Wo
>
> -------- Original-Nachricht --------
>> Datum: Wed, 22 Sep 2010 01:34:44 -0700 (PDT)
>> Von: CdeMills <[hidden email]>
>> An: [hidden email]
>> Betreff: Re: How to access COM Port with Octave?
>
>>
>>
>> GMX wrote:
>> >
>> >   Hey folks,
>> >
>> > I have a question to Octave.
>> > Is there a possibility to access the COM port in Octave? I'm using a
>> > winXP maschine. I searched the web but still found no informations about
>> > successful solutions.
>> > Matlab offers a serial.m but I found nothing similar for Octave.
>> >
>> >
>>
>> I wrote a similar program in C, performing the buffering and avoiding
>> being
>> blocked during write to file, it is used as an external command using
>> popen.
>> It runs on Linux using the termios interface. Under Windows, cygwin
>> doesn't
>> have this kind of lib. So the first point is to either work with the Win32
>> API, either find an open source serial lib.
>>
>> Regards
>>
>> Pascal

I used http://www.rxtx.org/ a few years back to do some COM port
interfacing from Java on MS Windows. It worked well for me. This may
be overcomplicating things (Octave->Java->C++)!

--
/* andy buckle */

_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to access COM Port with Octave?

John Swensen
In reply to this post by GMX

On Sep 21, 2010, at 2:55 PM, GMX wrote:

> Hey folks,
>
> I have a question to Octave.
> Is there a possibility to access the COM port in Octave? I'm using a
> winXP maschine. I searched the web but still found no informations about
> successful solutions.
> Matlab offers a serial.m but I found nothing similar for Octave.
>
> Thanks for your reply.
> André
>

Another option involve(s) using the ser2net library.  Octave already has a sockets package and the ser2net server allows you to connect over a socket and then send and receive over the serial port.  I know that this package used to be available on Cygwin (I haven't used cygwin in 5-6 years so don't know whether it is still available).  I also know of one lab that had a very old PC that they put a tiny Linux distribution on whose sole purpose was to run ser2net and connect to their device over serial.  Then they could control the device from any networked machine.

John Swensen
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to access COM Port with Octave?

CdeMills
John Swensen wrote

Another option involve(s) using the ser2net library.  Octave already has a sockets package and the ser2net server allows you to connect over a socket and then send and receive over the serial port.  I know that this package used to be available on Cygwin (I haven't used cygwin in 5-6 years so don't know whether it is still available).  I also know of one lab that had a very old PC that they put a tiny Linux distribution on whose sole purpose was to run ser2net and connect to their device over serial.  Then they could control the device from any networked machine.
Another option is to use the Win32 API which doesn't seem too complicated:
http://msdn.microsoft.com/en-us/library/aa363258%28v=VS.85%29.aspx

look for GetCommModemStatus. But could those functions be used under cygwin ?

Pascal
Reply | Threaded
Open this post in threaded view
|

Re: How to access COM Port with Octave?

John Swensen

On Sep 22, 2010, at 9:03 AM, CdeMills wrote:

>
>
> John Swensen wrote:
>>
>>
>>
>> Another option involve(s) using the ser2net library.  Octave already has a
>> sockets package and the ser2net server allows you to connect over a socket
>> and then send and receive over the serial port.  I know that this package
>> used to be available on Cygwin (I haven't used cygwin in 5-6 years so
>> don't know whether it is still available).  I also know of one lab that
>> had a very old PC that they put a tiny Linux distribution on whose sole
>> purpose was to run ser2net and connect to their device over serial.  Then
>> they could control the device from any networked machine.
>>
>>
>
> Another option is to use the Win32 API which doesn't seem too complicated:
> http://msdn.microsoft.com/en-us/library/aa363258%28v=VS.85%29.aspx
>
> look for GetCommModemStatus. But could those functions be used under cygwin
> ?
>
> Pascal
> -

I should have qualified my response as being a solution if they don't feel comfortable writing MEX/OCT files and programming in C.  The ser2net + sockets package is a solution that may be amenable for such a user.

John Swensen


_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to access COM Port with Octave?

tmacchant
Hello

The ser2net 2.3 working also on windows seems to be free only for trial
http://linux.wareseeker.com/download/ser2net-2.3.rar/334152

The ser2net on the sourceforge seem to be only on unix
http://sourceforge.net/projects/ser2net/

Regards

Tatsuro

--- John Swensen  wrote:

>
> On Sep 22, 2010, at 9:03 AM, CdeMills wrote:
>
> >
> >
> > John Swensen wrote:
> >>
> >>
> >>
> >> Another option involve(s) using the ser2net library.  Octave already has a
> >> sockets package and the ser2net server allows you to connect over a socket
> >> and then send and receive over the serial port.  I know that this package
> >> used to be available on Cygwin (I haven't used cygwin in 5-6 years so
> >> don't know whether it is still available).  I also know of one lab that
> >> had a very old PC that they put a tiny Linux distribution on whose sole
> >> purpose was to run ser2net and connect to their device over serial.  Then
> >> they could control the device from any networked machine.
> >>
> >>
> >
> > Another option is to use the Win32 API which doesn't seem too complicated:
> > http://msdn.microsoft.com/en-us/library/aa363258%28v=VS.85%29.aspx
> >
> > look for GetCommModemStatus. But could those functions be used under cygwin
> > ?
> >
> > Pascal
> > -
>
> I should have qualified my response as being a solution if they don't feel comfortable writing
> MEX/OCT files and programming in C.  The ser2net + sockets package is a solution that may be
> amenable for such a user.
>
> John Swensen
>
>
> _______________________________________________
> Help-octave mailing list
> [hidden email]
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>


--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
GMX
Reply | Threaded
Open this post in threaded view
|

Re: How to access COM Port with Octave?

GMX
In reply to this post by John Swensen
  I found this page today. Is it possible to implement its function into
octave?

http://libertadhack.blogspot.com/2010/08/puerto-serie-para-octave-serial-port.html?showComment=1285261679189_AIe9_BHPVlFe__ktI4HUn_QBP3ioJ2PqhL_4C16YJcQ1Zd8PjkVXz6m1Cla9OHEjqt6fG_Gui9UHSS6YOYvPPo-zB2tFdUQlvLctCSzqNP5YXfRZHgxulDLeG5ONyBJS0Ftm4nFLheAhGKNbPlC8jV-FGuwCzu8xlO8VadOqHkm8UvNluT1NkCuRzab5XuGt9jOsevKuJd3dtksSBGUOBvGDeMBa5xxvzrHoe45qALbGex07wS4GV500Cz4cvGrEsJyxRFM3y2ZlDMEs6Q9NUpO7BPTFNc52NT1hyuCI7Du0UwJg0mScPfulRHkG-pdLKehKWz-UVRXoErKDEl403cI-cU1-gFfuCg35bPwyOYi3IkYQEWauS1b9SJrHz8odRMRSziQvV4yc6wJRPcVg0RqT1jtVTf7C3gT2J3lJqi2l_s6rHrdxtJHQ9Qr6GjI5WJ5AlwSBrCpNhh6N9gsubL86tf54NafyF0nRLJHxJXcoTfr76oJ72jSI1TsclLJaD5K3YrAp5CPsDDsllHUSpcHWRutW9xHLSkLKNToVCteZZvkXtBXxPvmGYjKp-0EiuqsFUGbIXcVrPvnI__oF3x57cmnBXfm0xCjsmyLSfI910n7VyJSoc7g8OhEB-8OlzDJ1opkQ2ha2LtGjy-Qup_O8GZYrrM6cWdp5NtumInzvMUJEiFzInXk#c1693255940804691753

Maybe it is possible to get it run with windows?

branadic

Am 22.09.2010 12:47, schrieb John Swensen:

> On Sep 21, 2010, at 2:55 PM, GMX wrote:
>
>> Hey folks,
>>
>> I have a question to Octave.
>> Is there a possibility to access the COM port in Octave? I'm using a
>> winXP maschine. I searched the web but still found no informations about
>> successful solutions.
>> Matlab offers a serial.m but I found nothing similar for Octave.
>>
>> Thanks for your reply.
>> André
>>
> Another option involve(s) using the ser2net library.  Octave already has a sockets package and the ser2net server allows you to connect over a socket and then send and receive over the serial port.  I know that this package used to be available on Cygwin (I haven't used cygwin in 5-6 years so don't know whether it is still available).  I also know of one lab that had a very old PC that they put a tiny Linux distribution on whose sole purpose was to run ser2net and connect to their device over serial.  Then they could control the device from any networked machine.
>
> John Swensen
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to access COM Port with Octave?

tmacchant
Hello

--- GMX wrote:

>   I found this page today. Is it possible to implement its function into
> octave?
>
>
http://libertadhack.blogspot.com/2010/08/puerto-serie-para-octave-serial-port.html?showComment=1285261679189_AIe9_BHPVlFe__ktI4HUn_QBP3ioJ2PqhL_4C16YJcQ1Zd8PjkVXz6m1Cla9OHEjqt6fG_Gui9UHSS6YOYvPPo-zB2tFdUQlvLctCSzqNP5YXfRZHgxulDLeG5ONyBJS0Ftm4nFLheAhGKNbPlC8jV-FGuwCzu8xlO8VadOqHkm8UvNluT1NkCuRzab5X
uGt9jOsevKuJd3dtksSBGUOBvGDeMBa5xxvzrHoe45qALbGex07wS4GV500Cz4cvGrEsJyxRFM3y2ZlDMEs6Q9NUpO7BPTFNc52NT1hyuCI7Du0UwJg0mScPfulRHkG-pdLKehKWz-UVRXoErKDEl403cI-cU1-gFfuCg35bPwyOYi3IkYQEWauS1b9SJrHz8odRMRSziQvV4yc6wJRPcVg0RqT1jtVTf7C3gT2J3lJqi2l_s6rHrdxtJHQ9Qr6GjI5WJ5AlwSBrCpNhh6N9gsubL86tf54NafyF0nRLJH
xJXcoTfr76oJ72jSI1TsclLJaD5K3YrAp5CPsDDsllHUSpcHWRutW9xHLSkLKNToVCteZZvkXtBXxPvmGYjKp-0EiuqsFUGbIXcVrPvnI__oF3x57cmnBXfm0xCjsmyLSfI910n7VyJSoc7g8OhEB-8OlzDJ1opkQ2ha2LtGjy-Qup_O8GZYrrM6cWdp5NtumInzvMUJEiFzInXk#c1693255940804691753
>
> Maybe it is possible to get it run with windows?

Perhaps not, I have  downloaded the above and see the contents.  It uses unix device like
/dev/ttyUSB0.
There is no such a device on windows.

Of course I did not  really try it so that what I say is not always correct.

Regards

Tatsuro  

--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to access COM Port with Octave?

tmacchant
In reply to this post by GMX
Hello Wolfgang

What you pointed out seems to be right

http://bytes.com/topic/c/answers/850941-createfile-windows-com1

********************
Hello GMX

In the serial.m in octave-serialport-0.0.1

I found in serial.m
 
"serial('/dev/ttyS0','BaudRate',9600,'DataBits',8,'Parity','N','StopBits',1,'timeout','None','xonxoff',0,'rtscts',0)");

Please try to modify
'/dev/ttyS0'
by 'COM1' or 'COM2'.

I do not know whether it works or not.

Good luck!!

Regards

Tatsuro
--- Wolfgang Schechinger  wrote:

> Hi Tatsuro,
>
> in windows, usually there is a driver that maps the device to a COM port (usually COM3 and
> higher). /dev/ttyUSBi are (at lease on my machine :) serial port adapters that are plugged into
> a usb slot.
>
> Wolfgang
>
> -------- Original-Nachricht --------
> > Datum: Fri, 24 Sep 2010 07:32:15 +0900 (JST)
> > Von: Tatsuro MATSUOKA <[hidden email]>
> > An: GMX <[hidden email]>, [hidden email]
> > Betreff: Re: How to access COM Port with Octave?
>
> > Hello
> >
> > --- GMX wrote:
> >
> > >   I found this page today. Is it possible to implement its function into
> > > octave?
> > >
> > >
> >
>
http://libertadhack.blogspot.com/2010/08/puerto-serie-para-octave-serial-port.html?showComment=1285261679189_AIe9_BHPVlFe__ktI4HUn_QBP3ioJ2PqhL_4C16YJcQ1Zd8PjkVXz6m1Cla9OHEjqt6fG_Gui9UHSS6YOYvPPo-zB2tFdUQlvLctCSzqNP5YXfRZHgxulDLeG5ONyBJS0Ftm4nFLheAhGKNbPlC8jV-FGuwCzu8xlO8VadOqHkm8UvNluT1NkCuRzab5X
> >
>
uGt9jOsevKuJd3dtksSBGUOBvGDeMBa5xxvzrHoe45qALbGex07wS4GV500Cz4cvGrEsJyxRFM3y2ZlDMEs6Q9NUpO7BPTFNc52NT1hyuCI7Du0UwJg0mScPfulRHkG-pdLKehKWz-UVRXoErKDEl403cI-cU1-gFfuCg35bPwyOYi3IkYQEWauS1b9SJrHz8odRMRSziQvV4yc6wJRPcVg0RqT1jtVTf7C3gT2J3lJqi2l_s6rHrdxtJHQ9Qr6GjI5WJ5AlwSBrCpNhh6N9gsubL86tf54NafyF0nRLJH
> >
>
xJXcoTfr76oJ72jSI1TsclLJaD5K3YrAp5CPsDDsllHUSpcHWRutW9xHLSkLKNToVCteZZvkXtBXxPvmGYjKp-0EiuqsFUGbIXcVrPvnI__oF3x57cmnBXfm0xCjsmyLSfI910n7VyJSoc7g8OhEB-8OlzDJ1opkQ2ha2LtGjy-Qup_O8GZYrrM6cWdp5NtumInzvMUJEiFzInXk#c1693255940804691753

> > >
> > > Maybe it is possible to get it run with windows?
> >
> > Perhaps not, I have  downloaded the above and see the contents.  It uses
> > unix device like
> > /dev/ttyUSB0.
> > There is no such a device on windows.
> >
> > Of course I did not  really try it so that what I say is not always
> > correct.
> >
> > Regards
> >
> > Tatsuro  
> >
> > --------------------------------------
> > Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
> > http://pr.mail.yahoo.co.jp/ie8/
> > _______________________________________________
> > Help-octave mailing list
> > [hidden email]
> > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
> --
> GRATIS: Spider-Man 1-3 sowie 300 weitere Videos!
> Jetzt freischalten! http://portal.gmx.net/de/go/maxdome
>



--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
GMX
Reply | Threaded
Open this post in threaded view
|

Re: How to access COM Port with Octave?

GMX
In reply to this post by tmacchant
Some modification is needed, but basically it should be possible to get it run on windows os, after installing Python and PySerial packages, I guess.
I'm not good in programming, but my gut instinct tells me, that this octave socket and python based script is the best solution until now.

Regards, André

-------- Original-Nachricht --------
> Datum: Fri, 24 Sep 2010 07:32:15 +0900 (JST)
> Von: Tatsuro MATSUOKA <[hidden email]>
> An: GMX <[hidden email]>, [hidden email]
> Betreff: Re: How to access COM Port with Octave?

> Hello
>
> --- GMX wrote:
>
> >   I found this page today. Is it possible to implement its function into
> > octave?
> >
> >
> http://libertadhack.blogspot.com/2010/08/puerto-serie-para-octave-serial-port.html?showComment=1285261679189_AIe9_BHPVlFe__ktI4HUn_QBP3ioJ2PqhL_4C16YJcQ1Zd8PjkVXz6m1Cla9OHEjqt6fG_Gui9UHSS6YOYvPPo-zB2tFdUQlvLctCSzqNP5YXfRZHgxulDLeG5ONyBJS0Ftm4nFLheAhGKNbPlC8jV-FGuwCzu8xlO8VadOqHkm8UvNluT1NkCuRzab5X
> uGt9jOsevKuJd3dtksSBGUOBvGDeMBa5xxvzrHoe45qALbGex07wS4GV500Cz4cvGrEsJyxRFM3y2ZlDMEs6Q9NUpO7BPTFNc52NT1hyuCI7Du0UwJg0mScPfulRHkG-pdLKehKWz-UVRXoErKDEl403cI-cU1-gFfuCg35bPwyOYi3IkYQEWauS1b9SJrHz8odRMRSziQvV4yc6wJRPcVg0RqT1jtVTf7C3gT2J3lJqi2l_s6rHrdxtJHQ9Qr6GjI5WJ5AlwSBrCpNhh6N9gsubL86tf54NafyF0nRLJH
> xJXcoTfr76oJ72jSI1TsclLJaD5K3YrAp5CPsDDsllHUSpcHWRutW9xHLSkLKNToVCteZZvkXtBXxPvmGYjKp-0EiuqsFUGbIXcVrPvnI__oF3x57cmnBXfm0xCjsmyLSfI910n7VyJSoc7g8OhEB-8OlzDJ1opkQ2ha2LtGjy-Qup_O8GZYrrM6cWdp5NtumInzvMUJEiFzInXk#c1693255940804691753
> >
> > Maybe it is possible to get it run with windows?
>
> Perhaps not, I have  downloaded the above and see the contents.  It uses
> unix device like
> /dev/ttyUSB0.
> There is no such a device on windows.
>
> Of course I did not  really try it so that what I say is not always
> correct.
>
> Regards
>
> Tatsuro  
>
> --------------------------------------
> Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
> http://pr.mail.yahoo.co.jp/ie8/

--
GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für nur 19,99 Euro/mtl.!*
http://portal.gmx.net/de/go/dsl
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave