serialportlist is not working

조회 수: 16 (최근 30일)
sddfds sddfds
sddfds sddfds 2023년 8월 12일
이동: Walter Roberson 2023년 8월 12일
hello when i enter the command serialportlist i get the message ans=1x0 empty string error. can you please let me know how to fix it. thanks a lot.
  댓글 수: 2
Walter Roberson
Walter Roberson 2023년 8월 12일
That is the output I would expect if you do not have any serial port devices connected to your computer.
If you are using Windows, then does Device Manager show any serial USB devices? Or any bluetooth ?
sddfds sddfds
sddfds sddfds 2023년 8월 12일
이동: Walter Roberson 2023년 8월 12일
i have a usb mouse connected to my laptop. i tried serialportlist("all") and serialportlist("available") and i got the same message. i have attached an image of device manager.

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

채택된 답변

Walter Roberson
Walter Roberson 2023년 8월 12일
USB mice are not serialports.
Each USB physical device has one or more "endpoints" associated with it. For example a webcam might have a video data and an audio data endpoint associated with the same physical device, and quite possibly a video control endpoint as well.
Serial (COM) over USB data is associated with USB class 0x0A (CDC-DATA)
Mice on the other hand are USB class 0x03 (HID) -- Human Interface Device
Mice use a different packet protocol than serial ports do. it is sort of like how network PING packets have a different packet protocol than TCP packets. They are not intended to do the same thing, and they talk different ways.
  댓글 수: 1
sddfds sddfds
sddfds sddfds 2023년 8월 12일
이동: Walter Roberson 2023년 8월 12일
thanks a lot for your help.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Serial and USB Communication에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by