Hi, Charlie,
Regarding the hardware connection, You have to connect a 4.7K ohm pull-up resistors for the SCL and SDA pins, they are open drain pins.
If you hook a oscilloscope to the SCL and SDA pins, can you see the IIC waveform? If you can not, you have to enable the IIC module gated clock and configure the IIC pin as IIC function.
If you develop IIC code based on MQX, as Mr David pointed out, you can modify the example MQX provides.
Hope it can help you.
BR
XiangJun Rong