
rtyud
Dependencies: WizFi310Interface_Legacynew mbed
Fork of WizFi310_Station by
main.cpp
00001 /* 00002 * Copyright (C) 2015 Wiznet, MIT License 00003 * 00004 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 00005 * and associated documentation files (the "Software"), to deal in the Software without restriction, 00006 * including without limitation the rights to use, copy, modify, merge, publish, distribute, 00007 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 00008 * furnished to do so, subject to the following conditions: 00009 * 00010 * The above copyright notice and this permission notice shall be included in all copies or 00011 * substantial portions of the Software. 00012 * 00013 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 00014 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00015 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 00016 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00017 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00018 */ 00019 00020 #include <stdio.h> 00021 #include "mbed.h" 00022 #include "WizFi310Interface.h" 00023 00024 00025 #define SECURE WizFi310::SEC_WPA2_MIXED 00026 #define SSID "CDI" 00027 #define PASS "Cdi*1717" 00028 /*#define SSID "CDIWIZFI310TEST" 00029 #define PASS "1234567890"*/ 00030 00031 #if defined(TARGET_WIZwiki_W7500) 00032 WizFi310Interface wizfi310(D1, D0, D7, D6, D8, NC, 115200); 00033 Serial pc(USBTX, USBRX); 00034 #endif 00035 00036 00037 /** 00038 * \brief Hello World 00039 * \param none 00040 * \return int 00041 */ 00042 int main() 00043 { 00044 pc.baud(115200); 00045 00046 printf("WizFi310 STATION. \r\n"); 00047 wizfi310.init(); 00048 printf("After Initialisation. \r\n"); 00049 00050 printf("After Set Address. \r\n"); 00051 if ( wizfi310.connect(SECURE, SSID, PASS, WizFi310::WM_STATION)) return -1; 00052 printf("After Connect. \r\n"); 00053 printf("IP Address is %s\r\n", wizfi310.getIPAddress()); 00054 //wizfi310.test_weathermap(); 00055 00056 //wizfi310.disconnect(); 00057 }
Generated on Sun Aug 7 2022 20:26:57 by
