bugGNU Octave - Bugs: bug #44393, Instrument Control Package on MXE...

 
 

bug #44393: Instrument Control Package on MXE Octave "bad file descriptor" error

Submitter:  None
Submitted:  Sun 01 Mar 2015 05:15:30 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.8.2
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 14 Mar 2015 02:02:27 AM UTC, comment #13: 

Marking as closed

John Donoghue <lostbard>
Group Member
Tue 10 Mar 2015 10:47:47 PM UTC, comment #12: 

s1 = serial("\\\\.\\COM15") does work. Thanks

Anonymous
Wed 04 Mar 2015 04:26:27 PM UTC, comment #11: 

So for COM15,

s1 = serial("\\\\.\\COM15")


Can you verify that it works for you?

John Donoghue <lostbard>
Group Member
Mon 02 Mar 2015 09:52:18 PM UTC, comment #10: 

Windows requires special naming for ports > COM9.

http://support.microsoft.com/kb/115831


John Donoghue <lostbard>
Group Member
Mon 02 Mar 2015 09:49:33 PM UTC, comment #9: 

I think I was able to get it working. It appears that it doesn't like high COM port numbers eg. COM1 works but COM18 does not. I will have to play with it a bit more to see if that was indeed the problem.

Anonymous
Mon 02 Mar 2015 12:53:27 AM UTC, comment #8: 

Can you verify in some other software that you can open/commuicate on them?

John Donoghue <lostbard>
Group Member
Sun 01 Mar 2015 10:58:53 PM UTC, comment #7: 

There are a couple bluetooth serial ports that are always open and then whatever is plugged in. One that I was testing with is labeled "Arduino Mega 2560 (COM1)".

I tried entering it as COM1, COM001, com1, and several other things. Always the same error.

Anonymous
Sun 01 Mar 2015 10:04:04 PM UTC, comment #6: 

What com ports does it report in control panel?

John Donoghue <lostbard>
Group Member
Sun 01 Mar 2015 09:25:52 PM UTC, comment #5: 

I have tried multiple COM ports and devices. I just did a fresh install and no change. It doesn't recognize the COM ports, but it still says "Serial: Supported"

Anonymous
Sun 01 Mar 2015 01:39:07 PM UTC, comment #4: 

ok after some more testing I saw in Windows as well - reported on https://savannah.gnu.org/bugs/?44397

John Donoghue <lostbard>
Group Member
Sun 01 Mar 2015 01:27:57 PM UTC, comment #3: 

The Ctrl-C issue seems to be a problem in GUI mode. octave --no-gui and octave-cli works. (Tested with linux)

Anonymous
Sun 01 Mar 2015 01:08:06 PM UTC, comment #2: 

Ctrl-C works in octave-3.8.2 (windows), but not the devel octave.

John Donoghue <lostbard>
Group Member
Sun 01 Mar 2015 12:30:10 PM UTC, comment #1: 

Works for me - make sure that you opening the correct COMXXX port.

I do notice (at least on  devel version of octave) that I can no longer Ctrl-C the read, but not sure yet whether that is a octave or instrument-control issue.

John Donoghue <lostbard>
Group Member
Sun 01 Mar 2015 05:15:30 AM UTC, original submission:  

I am running MXE Octave build 3.8.2-5 installed from http://mxeoctave.osuv.de/ on an Windows 7 64 bit machine. Specifically I am using the portable version. I have installed the instrument control package 0.2.1

When running sample code for instrument control toolbox I get the following error, "error: serial: Error opening the interface: Bad file descriptor"

I can see the serial ports in the device manager, but it doesn't seem to recognize them.



%Code taken from http://wiki.octave.org/Instrument_control_package#Serial

close all
clear all
clc

if (exist("serial") == 3)
    disp("Serial: Supported")
else
    disp("Serial: Unsupported")
endif


# Open default serial port ttyUSB0 in default configuration of 115200, 8-N-1
%s0 = serial()
# Opens serial port ttyUSB1 with baudrate of 115200 (config defaults to 8-N-1)
%s1 = serial("/dev/ttyUSB1", 115200)
s1 = serial("COM1", 115200)

# Flush input and output buffers
srl_flush(s1);
# Blocking write call, currently only accepts strings
srl_write(s1, "Hello world!")
# Blocking read call, returns uint8 array of exactly 12 bytes read
data = srl_read(s1, 12)
# Convert uint8 array to string,
char(data)



%Output of above code is copied below
%Serial: Supported
%error: serial: Error opening the interface: Bad file descriptor
%
%


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #33215:  serial_test.m added by None (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard
  • -email is unavailable- added by lostbard (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-03-14 lostbard StatusNeed Info Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2015-03-04 lostbard StatusNone Need Info
    2015-03-01 lostbard Carbon-Copy- Added dac922
    2015-03-01 None Attached File- Added serial_test.m, #33215

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code