how we can send data to USB port
Show older comments
how we can send data to USB port
Answers (1)
Walter Roberson
on 31 Mar 2014
0 votes
That is not possible. USB consists of a controller device, and devices plugged into it. Only the controller can directly access any particular physical connector. How to send data to a device connected by USB depends on what class of device the plugged-in device tells the USB controller it is.
4 Comments
Ebrahim Parcham
on 31 Mar 2014
Friedrich
on 1 Apr 2014
Walter Roberson
on 1 Apr 2014
You cannot send data to a USB port. The USB controller does not allow it. The port is under the complete control of the controller.
I suspect that what you want to do is send data to a virtual serial port that is connected by USB. If so then you use serial() to designate the name of the USB port you want to work with, and you use fopen() on the virtual serial port, and then you use fprintf() or fwrite() to send data to the virtual serial port.
Salaheddin Hosseinzadeh
on 1 Apr 2014
Edited: Salaheddin Hosseinzadeh
on 1 Apr 2014
@ Walter
LOL! You should write in Chines! Like I do
داداش، ب حضرت عباس نمیشه
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!