cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX LwIP initial Ip problem

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.(users need to use another PC ) 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 (demo or sample code) would be much appreciated. Thanks.

4 REPLIES 4

Hello @nur​ ,

Unfortunately, there's no clear answer to your question as it isn't really clear what's required.

If it is not possible to display the IP address of the device on an LCD for example, or through a serial connection, as you've already figured out if you know the MAC address you can use ARP to identify the IP address.

The issue seems more like a provisioning and logistical issue more than a technical one.

Could you please provide the exact use case in order to be able to help you.

BeST Regards,

Walid

Hi Walid,

This is Nur. Thanks for reply.

But in windows, arp -a command is used only to show the current ARP cache table. If the windows pc has never communicated with TCP server side(stm32f7), the IP-to-MAC address translation/mapping is not shown or available in my ARP cache table. When User forgot ip address, I couldnt communicate with windows.

So I need to use stm as a client. And send Ping to fix ip address like 192.168.1.1. After that I can see mac address and ip address in Arp cache table i think. I wrote a TCP client source file but I do not know what the Ping command is .

Hello @nur​ ,

I think that arping can solve your issue. Take a look at this reference : arping - Wikipedia

nur
Associate II

Thanks Walid. I see that Arping tool is for Linux not Windows.

I need an embed c code about ICMP or sending ping request/any data to fixed ip address to follow its steps .Anyone have that ?