energia / Energia

Fork of Arduino for the Texas Instruments LaunchPad's
http://energia.nu
Other
795 stars 672 forks source link

CC3200: Provide AP example #414

Closed rei-vilo closed 9 years ago

rei-vilo commented 10 years ago

Provide an example for the CC3200 access point mode.

kingofl337 commented 10 years ago

I'm also looking for this example.

robertinant commented 10 years ago

For anybody that is interested, I checked in AP mode into the repository. 2 new API's have been added: For open an open network use int beginNetwork(char *ssid); and for a secure network with WPA/WPA2 use int beginNetwork(char *ssid, char *passphrase); I do not plan to add support for WEP.

robertinant commented 10 years ago

The files you want to take and place in hardware/cc3200/libraries/WiFi/ are: https://raw.githubusercontent.com/energia/Energia/master/hardware/cc3200/libraries/WiFi/WiFi.cpp https://raw.githubusercontent.com/energia/Energia/master/hardware/cc3200/libraries/WiFi/WiFi.h

spirilis commented 10 years ago

That's freaking awesome! What can you do with it BTW? I tried it out earlier and all I could do is add profiles to the mysimplelink.net site which didn't seem to stick (profiles disappeared after a refresh). Is it supposed to let you provision the device in conjunction with SmartConfig?

kingofl337 commented 10 years ago

I'll check it out today!

robertinant commented 10 years ago

AP mode can be used for a couple different things. One is to use the AP mode in combination with a website running on the CC3200 to select an access point you want the CC3200 to connect to ones it switches to station mode. The other is to leave it in AP mode and connect to it using your smart phone or tablet to control it for example a rover. I am sure that people can come up with some other awesome and creative ways to use this mode.

spirilis commented 10 years ago

Ahh ok. In AP mode it seems WiFi.status() always shows WL_DISCONNECTED, so I wasn't sure ... are you basically at the mercy of using the sl_NetApp* webserver API for doing useful stuff in AP mode?

kingofl337 commented 10 years ago

I'm getting an error WL_AP_MODE in not defined. I added it to Wifi.h setting the definition to 1. I was able to connect with my user and pass. I was also able to load the webpage.

spirilis commented 10 years ago

There was an updated "utility/wl_definitions.h" file you need to get WL_AP_MODE.

Direct link: https://raw.githubusercontent.com/energia/Energia/master/hardware/cc3200/libraries/WiFi/utility/wl_definitions.h

robertinant commented 10 years ago

As @spirilis mentioned, I forgot about the utility/wl_definitions.h. The WL_AP_MODE define is only used when calling WiFi.status() so no big deal to define it to 1 if you never call WiFi.status().

Happy to hear that you got the AP mode working. I will commit an example later today to conclude this issue so that we can close it.

aruncheela commented 10 years ago

Can you please compile an example on how to use smart config with mobile app

shatruddha commented 10 years ago

Can you provide an example of AP mode for MSP430f5529? I tried copying all the modified code(all the classes and functions) from cc3200 to msp430 library, My code compiles, it comes out of beginNetwork(), but I do not see any access point created when I check from my cellphone

rei-vilo commented 8 years ago

See CreateAPModeWebServer

huyrua291996 commented 7 years ago

can you have example in provisioning ap in energia

rei-vilo commented 7 years ago

Follow the link in https://github.com/energia/Energia/issues/414#issuecomment-194741431

Agam-aviconn commented 7 years ago

Hi all,

I am new to CC3200. I am using Energia as the IDE. I want that my Cc3200 should switch from Access point mode to Station mode.

I want a user to enter network ssid and password in AP mode so that cc3200 can connect to that network in station mode.

How can I do this in Energia.

There is no such example in Energia regarding this.

Kindly provide some guidance.Kindly post the energia code here.

rei-vilo commented 7 years ago

@Agam-aviconn

See CreateAPModeWebServer

robertinant commented 7 years ago

Please see this thread on TI's e2e: http://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/p/560192/2051511#2051511