cancel
Showing results for 
Search instead for 
Did you mean: 

How does any user know initial Ip address of STM chip?

nur
Associate II

Hi, I kindly need your help. I have a STM32F769 and TCP server application . I am using LWIP stack . In my application server is arm and PC is client. When client tries to send something to arm, arm binds client’s ip address. So the connection is ok for reception and transmission. Client can change Ip address (if client wants) or another Network parameters also. But what if client forgot arm’s ip address ? I tried cmd arp -a command to list mac and ip address (bcs I know mac address) but it did not work. But when I ping to arm or send another data form pc to arm then arp -a gives me correct ip and mac address for arm. So is there any code or application or gui that we use to get ip address ? I am not sure that tcp server application is appropriate for this. Also Our client (pc) is not only one . It can be changed. So maybe we need a connection between client and server even their ip address cannot be known. I am not good at network protocols and network applications . So your help would be much appreciated. Thanks.

2 REPLIES 2
Piranha
Chief II

Static configuration, DHCP provided server addresses, DNS names, broadcasts/multicasts, discovery protocols and other approaches... To be capable of solving problems, one has to learn things. There is no other way around.

nur
Associate II

Thank you ! I use cubemx static configuration but user wants network parameters of device to change anytime user needs. It works in my code. But if the changed ip address is forgotten , the problem exists. I do not know how to avoid that.

1) Which one is the easiest way ? I need to use another protocol right ? Because now I am using tcp.

2) Also Someone told me that server must be pc. But why? if I used stm as client and pc as server the problem would not be solved, i think. Because if needed , computer will be changed ( another computer will be used) So ip address of server will not be same ( we wont get server ip address)

3)Is there any demo or sample code for broadcast message ? (I can use UDP instead of TCP )

4) Is there any source or example code for Lwip ? Or TCP client or server C code ? Because I could not find any embedded C code about simple TCP client, broadcast or ICMP .

Big thanks.