2017-03-10 02:16 AM
Hi,
The communication between single microcontroller and pc is works fine through ethernet tcp/ip . problem occurs only when i connect two microcontroller to a single pc via ethenet cable,Here d-link 5-port 10/100 desktop is used for multiple connection.when connection made for multiple microcontroller ,the communication doesn't work properly.Either one connection will be in active condition other will be inactive.
I need solution to overcome this issue.My requirment is from pc it sends query to microcontroller-1 after receiving response from microcontroller-1 .It has send next query to Microcontroller-2.Process should be repeat.
Is it possible? If yes please please guide me. Please anyone reply as soon as possible......
Thanking You....
Solved! Go to Solution.
2017-03-13 03:26 AM
Thank you so much for helping...
resolved issue by assigning unique mac address for two boards.Problem solved.......
2017-03-10 03:11 AM
Please anyone reply as soon as possible......
What ???
The communication between single microcontroller and pc is works fine through ethernet tcp/ip . problem occurs only when i connect two microcontroller to a single pc via ethenet cable,
Make sure you do not assign the same IP address statically.
Or, when using DHCP, make sure you do not assign the same MAC addresses.
A familiarity with ethernet and TCP/IP is most helpful in this case.
2017-03-10 09:20 PM
Thanks for reply avatar.
I gave different ip address for microcontroller.
I have two microcontroller boars ie stm32f107 arm microcontrollers.
1.First controller having ip address for one microcontroller to 192.168.1.252, port number 23 and modbus communication slave id 1.
2.Second microcontroller having an ip address 192.168.1.251, port number 22
and modbus communication slave id 2.
Pc ip address 192.168.1.154.
My question is, communication between Single pc and multiple microcontroller is possible?.
Thank you....
2017-03-10 10:36 PM
Assigning two IP addreses will not work if the physical MAC address of each ethernet controller is the same. There is an underlying IP protocol called ARP (Address Resolution Protocol) which converts between logical IP and physical MAC address. If two devices on the same subnet (hub or switch in your case) have the same MAC address the ARP protocol will fail, resulting in exactly the fault you describe.
Yes it is possible to communicate between several controllers and a PC on Ethernet, but only if each connection can be uniquely identified by the MAC address. Duplicate MAC addresses cannot exist on the same subnet.
2017-03-10 11:54 PM
Thanks for reply jack,
Yes it is possible to communicate between several controllers and a PC on Ethernet, but only if each connection can be uniquely identified by the MAC address. Duplicate MAC addresses cannot exist on the same subnet.
...
when i checked mac address of both devices have the same mac address.
Then how do i assign unique address to multiple microcontroller .Please help me.
Thank you..
2017-03-11 08:55 AM
Then how do i assign unique address to multiple microcontroller .Please help me.
By changing the MAC address in the source.
If it's urgent, you might need to pick up pace.
2017-03-11 08:56 AM
If two devices on the same subnet (hub or switch in your case) have the same MAC address the ARP protocol will fail, resulting in exactly the fault you describe.
Right, of course. Forgot that ...
2017-03-12 10:49 PM
hi avatar,
can you please explain in detailed.How do i change source ip address.As i mentioned above ,im using d-link 5 port switch.
5 ports are there:
First port is connected between pc and d-link.
second port is connected between d-link and microcontroller-1.
Thirt port is connected between d-link and microcontroller-2.
The software used to check communication is kepware opc client software.In this software im able to connect multiple devices.
so,please tell me now .How do i change source address.
Thank you....
2017-03-13 01:28 AM
Honestly ?
There are plenty of resources about the basics of ethernet and TCP/IP on the internet, read it through carefully. You need to get a general understanding of what is the problem, and what you want to achieve here.
And than get the project/sources for your MCU board, change, and rebuild.
I don't have the time to do it for you.
2017-03-13 03:26 AM
Thank you so much for helping...
resolved issue by assigning unique mac address for two boards.Problem solved.......