Hello everybody,
I am trying to establish a "communication-stream" with a device that is connected to my computer via a USB cable. The driver for the device seems to work, as I can establish this stream via a molex uart cable. But this connection also has to work for a microusb(plugged into device) to USB cable.
Now, what does "communication-stream" mean?
I am working in a C# development environment on Visual Code IDE. In the code I access the port name list via Directory.GetFiles("/dev/", "tty*");
Then I initialize a SerialPort with: stream = new SerialPort("portName",<baud rate>, Parity.None, <databits>, StopBits.None).
After that I want to open the stream, so that I can receive ACK's and send commands from and to the device with: stream.Open();
With the uart cable this works fine and I can work with the device. But when using the USB cable, an exception is thrown, stating that the IOCTL is inappropriate for the device.
What exactly is the ioctl (input output control)? Why can it be "inappropriate" for my device, when using a specific cable (or with it a different port?)?
Is there a solution to my problem?
No knowledge about the device is needed here I think, as the ioctl seems to be a Linux-specific feature.
I would be really happy to receive an answer to my questions, thanks in advance
