Clear Filters
Clear Filters

serialportlist is not working

19 views (last 30 days)
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.
Walter Roberson
Walter Roberson on 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 on 12 Aug 2023
Moved: Walter Roberson on 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.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 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.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!