How can I get Clients Ip connected at softap?

How can I get Clients Ip connected at softap???
Does “wlan_fetch_ipconfig(&ip_config);” do the job? (Checked 18-8-15…No It does not give clients ip)
How can I priny &ip_config.nw.aucIP; at serial? (done 18-8-15 using memcpy)

in your router that does the DHCP for the Particle client… use the router’s DHCP reservation capability. You can reserve a certain LAN IP address for that client (based on its MAC address). The LAN IP won’t then vary.

Thanks, but I wonder if client passes its ip (client connects directly to photon-SoftAp,
so I thing he does passes ip and some wifi’s variable keeps it),
and then how can I get this ip.

/** Returns the details( ip address and the source port) of the client

  • which is connected currently to a server
  • @param[in] socket : A pointer to a socket handle that has been previously created with @ref wiced_tcp_create_socket
  • @param[out] address: returned IP address of the connected client
  • @param[out] port : returned source port of the connected client
  • @return @ref wiced_result_t
    /
    wiced_result_t wiced_tcp_server_peer( wiced_tcp_socket_t
    socket, wiced_ip_address_t* address, uint16_t* port );

Interesting question! At present, I don’t think there is a straightforward way to do this from SoftAP. Can you tell me a bit more about how you would use this feature?

Cheers :smile:
mat

I imagine two (MY) softAPs sharing serving clients between each other.
I just imagine…
Of course clients can announce their Ip after connection established (at higher level) but I still wonder about the function above which seems doing the job(?).

Thanks…Yiannis, the sticker!!!

I think this is something we could add to the TCPClient class. This would be separate form softAP, but would mean that once AP mode is supported, the needed data is in place.

I am surprised from your readiness…are you working 24 hours per day?

Almost :stuck_out_tongue_winking_eye:

Issue posted https://github.com/spark/firmware/issues/551

So young and dreamer…I am jealous of you…thanks any way.

If you are building locally, you may want to check out this pull request that implements TCPClient.remoteIP() for retrieving the address of the remote peer.

1 Like

Many thanks!!!