Read serial input from /dev/tty in linux

조회 수: 2 (최근 30일)
Christian Wittpahl
Christian Wittpahl 2016년 10월 28일
댓글: Christian Wittpahl 2016년 10월 28일
I'm trying to visualize the input of a serial device. The device lies in "/dev/ttyACM0". I already found out, that MATLAB doesn't read this kind of device, so I made a link to it called "/dev/ttyS101". I can perfectly read the output of the device using "cat" in the console, but if I try using fopen() in MATLAB I always get this response:
Error using serial/fopen (line 72)
Open failed: Port: ttyS101 is not available. No ports are
available.
Use INSTRFIND to determine if other instrument objects are
connected to the requested device.
I don't have the "Instrument Control Toolbox" installed, is that the problem?

채택된 답변

Walter Roberson
Walter Roberson 2016년 10월 28일
instrfind() is part of MATLAB these days.
Check the ownership and permissions on /dev/ttyS101 . It would not be uncommon for it to have been configured without "other" access.
  댓글 수: 1
Christian Wittpahl
Christian Wittpahl 2016년 10월 28일
You were half right! the ownership of /dev/ttyS101 was alright, but the /var/lock folder was owned by root, while matlab was trying to create a file/folder there.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by