Pages: [1]   Go Down
Author Topic: Arduino wifi shield - Server mode - Get the client's remote port?  (Read 414 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I have an application using the arduino wifi shield as a server. Is there function to get the connect client's remote port in the Arduino wifi library?

I would suspect  that this information would be held in uint16_t WiFiClient::_srcport = 1024;(in WiFiClient.cpp), but it never updates when the client connects(stays 1024). I looked around the library for a command, but couldn't find anything. It appears that it would be listed in the enum in  wifi_spi.h(see enum exert below), but I don't see anything. 

enum {
   SET_NET_CMD       = 0x10,
   SET_PASSPHRASE_CMD   = 0x11,
   SET_KEY_CMD           = 0x12,
   TEST_CMD           = 0x13,

   GET_CONN_STATUS_CMD   = 0x20,
   GET_IPADDR_CMD      = 0x21,
   GET_MACADDR_CMD      = 0x22,
   GET_CURR_SSID_CMD   = 0x23,
......

Thanks,

-diesel
Logged

Pages: [1]   Go Up
Jump to: