Modbus TCP using Wiznet W6100
This is looking like it might be easy...
Have working over serial port already (Modbus RTU):
https://forums.parallax.com/discussion/176224/modbus-rtu-slave
Using a wiznet driver from @ke4pjw
https://forums.parallax.com/discussion/177801/wiznet-w6100-spin2-driver-usage#latest
Just changed port from 80 to 502.
Tried just now to connect with Open Modscan's scanner and seeing data that makes sense.
Found a document that describes what getting from scanner:
https://www.prosoft-technology.com/kb/assets/intro_modbustcp.pdf
Comments
In the above, first pinged it with function #3 (Read holding regs) and then function #17 (Report Slave ID).
Had the code debug out all the bytes.
Was unsure at first why the packet started with a few zeros, but seeing that now in the above document.
Was thinking that was going to be exactly the same format as RTU, just without CRC.
Guess it somewhat is, but not exactly...
Next up is to work on sending a response...