I am using an MCP23017 (which shouldn't matter tho) to extend the number of GPIO pins of an arm based linux computer using i2c-dev bitbanging. It all works fine with wires of a few centimetres.
The problem is that i would need 2*~3m wire in between clusters of 3 such MCP23017 based modules. Now, if i use a 3m wire (0.75mm diameter) for SCL and SDA i do get an ack for setting the address but polling the IC for the pin states results in confusing replies.
Sidenote: The MCP23017 has 2 banks of 8 pins each, with the 3 metre wire only 1 bank seems to work and B turns into A... Not sure what happens to the signal there, i guess the address in the request is being corrupted on a regular basis.
So i figured to increase the signal strength i would add an external pullup (the gpio pins used for bitbanging already have an internal one), which again works nice for some 10cm wires but kills even the address ACK for the 3m wire.
I tried 2k2, 4k7 and 10k ohms, all with the (exact) same result from my low resolution perspective.
Unforunately i don't have an oscilloscope to look at the whole thing and i'm not too knowledgeable about all the details to figure this out by just staring at it, therefore trying this route.
I hope someone has an idea what is happening here, what i could try or where i could learn enough to understand this on a level that helps me fix this. Let me know if you need any more info.
UPDATE: 3m wire now works with 850 ohms external pullups. going down to 150 ohms it also works with 6m but isn't a great thing to do since one easily uses more power (to pull the line low) than most gpio pins are rated for.