I want to limit the number of terminals that can be connected to the Web server (SoftAP interface)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AkKo_4458241
Level 2
Level 2

Hello.


The web server is started after starting the softAP interface.
How can I limit the number of terminals that can be connected to the Web server to one? (Prefer the first connected terminal.)

I use bellow function:
    wiced_network_up () (WICED_AP_INTERFACE)
    wiced_http_server_start ()

Thank you.

0 Likes
1 Solution

I tried another alternative other than my first response.

In /43xxx_Wi-Fi/WICED/WWD/WWD.mk could you try removing the comment at line 217 and changing it to

GLOBAL_DEFINES += WWD_WIFI_CONFIG_AP_MAX_ASSOC=2

This should allow only a single connection top the AP and reject all further connection requests.

Thanks

View solution in original post

5 Replies
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

Hi

Could you try limiting the number of sockets to one. This should allow only one connection to the webserver.

For example if you are using the apsta example available at /43xxx_Wi-Fi/apps/snip/apsta; could you try modifying the max_sockets definition in apsta.c to 1. This should allow only one connection to the webserver.

Thanks

Hello,
Thank you very much for your advice

I have tried it once,

With the iPhone device connected to the web server and displaying the homepage,
When I connected to a web server on an Android device, the home page was displayed.
After connecting to the web server with an Android device and displaying the homepage,
The home page was not displayed on iPhone devices.
I want to give priority to the terminal that I connected first.

0 Likes

Is it possible for you to share your project? This would make it easier for me to debug the issue.

0 Likes

I tried another alternative other than my first response.

In /43xxx_Wi-Fi/WICED/WWD/WWD.mk could you try removing the comment at line 217 and changing it to

GLOBAL_DEFINES += WWD_WIFI_CONFIG_AP_MAX_ASSOC=2

This should allow only a single connection top the AP and reject all further connection requests.

Thanks

A happy new year!

Thank you very much for your answer.

I'll try.

 

thank you.

0 Likes