WiFi DipCortex USB CDC
Dependencies: HTTPClient NTPClient USBDevice WebSocketClient cc3000_hostdriver_mbedsocket mbed
Fork of WiFiDip-UsbKitchenSink by
http://www.soldersplash.co.uk/products/wifi-dipcortex/
Demo shows you how to implement the CC3000 library with the WiFi DipCortex.
The demo shows :
- USB CDC ( Serial ) Menu system allow control of the module and starting each example
- Smart Connect
- Manual connect
- Connection status
- Ping
- TCP Client
- TCP Server
- Web Socket read/write to sockets.mbed.org
- HTTP Client test Post, Put, Delete
- Posting ADC data to Xively every 1 second
- UDP Client
- UDP Server
- NTP Example, contacts time server to get the current time
You will need a Driver for the USB CDC port which can be found here : http://www.soldersplash.co.uk/docs/DipCortex-USB-CDC.zip
Please refer to : http://mbed.org/users/SolderSplashLabs/notebook/dipcortex---getting-started-with-mbed/ as well as the SolderSplash Forum for support http://forum.soldersplash.co.uk/viewforum.php?f=15
Diff: wifi.h
- Revision:
- 0:0bce3a738bcb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wifi.h Mon Nov 04 19:55:00 2013 +0000 @@ -0,0 +1,46 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef WIFI_H +#define WIFI_H + +#include "cc3000.h" + +#define WIGO 1 +#define WIFI_DIPCORTEX 2 +#define UNDEFINED 3 + +#define MY_BOARD WIFI_DIPCORTEX + +// use this defines in AP_SECURITY +#define NONE 0 +#define WEP 1 +#define WPA 2 +#define WPA2 3 + +// use smart config +#define USE_SMART_CONFIG 0 + + // Default SSID Settings +#define SSID "soldersplash" +#define AP_KEY "wifidipcortex" +#define AP_SECURITY WPA2 + +void init(); +void connect_to_ssid(uint8_t *ssid); +void connect_to_ssid(char *ssid, char *key, unsigned char sec_mode); +void print_cc3000_info(); + +#endif