first post so feel free to rip into me.
Trying to use FT_Open() for an FTDI device. This function is used in the FTDI driver's example 'read' program, and is currently failing there. I am running this on a raspberry pi 4, but am also trying on Ubuntu with the same error.
On both devices, the FTDI is found in the results of lsusb, showing the serial number I need to connect to. I have tried to use FT_Open() opening by port number, but this does not work, returning an ftStatus code of FT_DEVICE_NOT_FOUND.
I have tried to use sudo to correct this when running the example 'read' program however this does not work, but is mentioned as a fix for previous questions.
Here is the code and the error message being printed. This is the same code as on my laptop and the raspberry pi, they both result in the same issue.
if(ftStatus != FT_OK) {
/*
This can fail if the ftdi_sio driver is loaded
use lsmod to check this and rmmod ftdi_sio to remove
also rmmod usbserial
*/
printf("FT_Open(%d): %d failed\n", iport, ftStatus);
return 1;
}
I am expecting this to not even print, however currently I am getting
FT_Open(6): 2 failed.
Any ideas on what to do? The productId is different for this FTDI device as it is actually for a Nistune Consult Cable sold by PLMS Developments. I am trying to connect to it over Linux, there is only support for Windows at the moment.
Edit: Ok so I did end up getting this to work after reprogramming the EEPROM on the FT232R chip I am working with to default settings.
However I am trying to do this without needing to do that. I want to use the default vendorID with a different productID for the chip. Before, every time I unplugged the device it would reload ftdi_sio and usbserial modules. This would result in it never connecting properly. That can be fixed as I’ve seen in other questions.
Now I need to find a way to accept custom productIDs in the Linux driver software. I tried changing all information that seemed relevant but it was again not able to recognise the device.