Jump to content
43oh

WIFI Remote IP during MODBUS communication


Recommended Posts

Hi I am trying to do a MC to MC communication using modbus.

I assigned static IP's to both my MC's.


WiFiServer MbServer(MB_PORT);
WiFiClient client = MbServer.available();

if(client.available())
    {
        ///Do something//////
     }

My question here is, Is there are way I can check the senders IP address before reading modbus packed data in the loop.

Because the receiver MC can be jammed with high data throughput as its a open connection (i.e anyone can send data to the MC by knowing its IP address). I want to read the senders IP before doing any data processing.

I know using UDP protocol we can use RemoteIP(). Is there anything similar in this case.

For sending and receiving MODBUS, im using the attached libraries.

MgsModbus.cpp

MgsModbus.h

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...