I have installed the FTDI libftd2xx.so following the FTDI installation guide. I also has the libMPSSE.so downloaded. I am writing a python wrapper to use the I2C functions in the libMPSSE.so
However, I got the following error when trying to run my code:
../../TopLayer/I2C/src/ftdi_i2c.c:239:I2C_InitChannel(): NULL expression encountered
According to https://stackoverflow.com/a/22994703/8406938, looks like it cannot find the libftd2xx.so
Here is my python wrapper:
filepath = 'my path to the libMPSSE.so'
mpsse = CDLL(os.path.join(filepath, 'libMPSSE.so')
ChannelConf = ChannelConfig()
ChannelConf.clock_rate = 100000
ChannelConf.LatencyTimer = 3
ChannelConf.Options = 0
status = mpsse.I2C_InitChannel(c_void_p()), byref(ChannelConf))
The exact same code work in my Windows machine with libMPSSE.dll with the windows driver. Any suggestion how to solve this?