RC
Dependents: WizFi250_AP_HelloWorld
Fork of WizFi250Interface by
Diff: WizFi250/WizFi250.cpp
- Revision:
- 18:2a20f54f2929
- Parent:
- 13:0b8e51d3c0e8
- Child:
- 15:8044670e2995
diff -r 8c69e246be54 -r 2a20f54f2929 WizFi250/WizFi250.cpp --- a/WizFi250/WizFi250.cpp Thu Jul 30 08:13:57 2015 +0000 +++ b/WizFi250/WizFi250.cpp Thu Jul 30 11:12:06 2015 +0000 @@ -52,12 +52,18 @@ cmdAT(); } -int WizFi250::join() +int WizFi250::join(WiFiMode mode) { char sec[10]; - _state.wm = WM_STATION; if( cmdMMAC() ) return -1; + + if(mode == WM_AP) + _state.wm = WM_AP; + else + _state.wm = WM_STATION; + + if ( cmdWNET(_state.dhcp) ) return -1; if ( cmdWSET(_state.wm, _state.ssid) ) return -1; switch (_state.sec)