Other Parts Discussed in Thread: CC3100
Hi,
What should be the simplelink API flow/sequence to enable/disable the HTTP-server when toggling between AP/STA?
My application boots to AP, waits for PROFILE configuration via HTTP-server and is triggered to change to STA.
If it fails to connect to AP (timeout) - it toggles between AP and STA, retrying the PROFILE, but giving a chance for the user to reconfigure.
I need to disable the HTTP-server in STA.
My code runs well, as long as I don't disable the HTTP-server. If I disable it - I can't get it running again when in AP.
Description of my application:
- Power-up:
- Initialize CC3100 HW (nHIB, nRESET, 3-25-250 ms, according to spec)
- sl_Start() (wait for callback)
- sl_WlanPolicySet(AUTO)
- Configure HTTP-server <- ENABLE, here it should be disabled!!!
- Check for existing PROFILE (to jump directly to STA)
- AP:
- sl_WlanSetMode(ROLE_AP)
- sl_WlanSet(SSID/SECURITY_TYPE/PASSWORD
- sl_Stop() and sl_Start() (wait for callback)
- Wait for acquiring IP
- Radio in AP, waiting for PROFILE configuration and trigger to toggle to STA
- STA:
- sl_WlanSetMode(ROLE_STA)
- sl_Stop() and sl_Start() (wait for callback)
- Wait for connection and acquiring IP (till timeout and back to AP flow)
- Radio in STA
I've tried almost every possibility of enable/disable of the HTTP-server in the AP and STA flow, can disable the HTTP-server, but can't get it running again.
I'm using:
+ SDK 1.1.0
+ ServicePack 1.0.0.10.0
+ SPI interface
+ No-OS (main loop with state-machine)
Thanks