Other Parts Discussed in Thread: CC3120
Hi,
CC3120MOD is in role STA.
Is it possible to get IP address of a AP to which is connected?
Best regards,
Ilian
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Ilian,
Why you need this feature?
It is possible to get IP address of AP, but it depends on type of your AP.
Jan
Hi Jan,
thank you for your answer!
I would like to connect to previously known AP and exchange information about AP profiles (using add profile API).
I can connect with a CC3120MOD to the phone (custom App)and acquire a IP address from DHCP.
To have a possibility to send a messages (sl_SendTo) I should know destination IP.
The correct question is:
1. How can I see the IP address acquired form DHCP?
2. The mask.
3. The default gateway for this connection. (to which I should send messages)
Best regards,
Ilian
Hi Ilian,
To have a possibility to send a messages (sl_SendTo) I should know destination IP.
For unicast this is correct statement. But why you not use UDP broadcast? You will not need to deal with IP address. Delivery UDP broadcast is generally less reliable at the Wifi networks. But together some resending algorithm this can be pretty bulletproof solution which can be easily implemented.
Network parameter of CC3120 assigned by DHCP server you can get from asynchronous handler SimpleLinkNetAppEventHandler and event SL_NETAPP_EVENT_IPV4_ACQUIRED.
Jan