I need to communicate with devices connected through USB ports. I can communicate through COM ports, through TCPports but USB ports seems to be unreachables with TD. I tried to use USB ports as files and open for read with SalFileOpen and so on, without success. Any hint? Even using a third party tool should be a good thing.
- Founder/Site Admin
- Posts: 1292
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
The 'usual' way to communicate with an USB device is to call 'CreateFile()' to obtain a handle to the USB driver and send commands using 'DeviceIoControl()' (see e.g. http://www.delcom-eng.com/downloads/USBPRGMNL.pdf) - the rest is specific to the device that you want to communicate with.
So, if SAL functions fail, it could be that using WinAPI file functions must be used to get it working.treat the port as file
do create file() readfile() write file() it will work....
Who is online
Users browsing this forum: [Ccbot] and 3 guests