Filter löschen
Filter löschen

serialportlist is not working

16 Ansichten (letzte 30 Tage)
sddfds sddfds
sddfds sddfds am 12 Aug. 2023
Verschoben: Walter Roberson am 12 Aug. 2023
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 Kommentare
Walter Roberson
Walter Roberson am 12 Aug. 2023
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 am 12 Aug. 2023
Verschoben: Walter Roberson am 12 Aug. 2023
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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 12 Aug. 2023
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 Kommentar
sddfds sddfds
sddfds sddfds am 12 Aug. 2023
Verschoben: Walter Roberson am 12 Aug. 2023
thanks a lot for your help.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by