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.

CC3120MOD: Getting IP address of a AP.

Part Number: CC3120MOD
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

  • Hi Ilian,

    Why you need this feature?

    It is possible to get IP address of AP, but it depends on type of your AP.

    • In case use used router + access point at one package (consumer grade routers) in this case is IP address of gateway same as IP address of AP
    • In case is used AP only, in this case you will need to send reverse ARP request. RARP is not supported by sl_ APIs at CC3120 and you will need implement this by network bypass mode.

    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

  • Hi Jan,

    Thank you for your answer!

    Best regards,

    Ilian