cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Nucleo boards, Modbus TCP/IP, Server (Slave) and Client (Master) Examples

data_cracker
Associate II

Hi all, 

Is there a Modbus tcp/ip Server (Slave) and client (Master) examples for STM32 Nucleo F429ZI board or any other similar boards?  

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
ST-800
ST Employee

Hello, 

Currently, we do not have any examples implementing MODBUS protocol over TCP/IP. After doing a quick search, I found the links below that I think could help you. You could try and salvage what you can and adapt it to the board you are using.

I also suggest you take a look at LWIP TCP client/server examples for other boards from our STM32Cube FW package (for example LwIP_TCP_Echo_Client, LwIP_TCP_Echo_Server) as you could use them to extract a template code for client/server communication.

Best regards,

View solution in original post

3 REPLIES 3
ST-800
ST Employee

Hello, 

Currently, we do not have any examples implementing MODBUS protocol over TCP/IP. After doing a quick search, I found the links below that I think could help you. You could try and salvage what you can and adapt it to the board you are using.

I also suggest you take a look at LWIP TCP client/server examples for other boards from our STM32Cube FW package (for example LwIP_TCP_Echo_Client, LwIP_TCP_Echo_Server) as you could use them to extract a template code for client/server communication.

Best regards,

AllTheGearNoIdea
Associate

Hi data_cracker

I've just come across your question - I'm trying exactly the same thing, did you make any progress on your project with Modbus TCP on Nucleo?

Thanks

avstudio1
Associate

I am also going to try this out. I need to establish a ModbusTCP connection between the STM32H7 NUCLEO board with an RJ-45 ethernet port. Has anyone had any success getting it to work with the HAL & FreeRTOS option above? I was looking for a native option using just code. 

I was watching this video: Mastering Modbus TCP: STM32 as a Slave - Read & Write Registers - YouTube

where he is using the Mongoose library.

 

I'm just starting here. First time using an STM32 and hoping to have some success.