This demonstrates how to update the WiFi modules firmware using the WiConnect host library.

Dependencies:   WiConnect mbed

Committer:
dan_ackme
Date:
Thu Nov 27 09:14:05 2014 +0000
Revision:
0:3c12b186f186
Initial check-in

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dan_ackme 0:3c12b186f186 1 /**
dan_ackme 0:3c12b186f186 2 * ACKme WiConnect Host Library is licensed under the BSD licence:
dan_ackme 0:3c12b186f186 3 *
dan_ackme 0:3c12b186f186 4 * Copyright (c)2014 ACKme Networks.
dan_ackme 0:3c12b186f186 5 * All rights reserved.
dan_ackme 0:3c12b186f186 6 *
dan_ackme 0:3c12b186f186 7 * Redistribution and use in source and binary forms, with or without modification,
dan_ackme 0:3c12b186f186 8 * are permitted provided that the following conditions are met:
dan_ackme 0:3c12b186f186 9 *
dan_ackme 0:3c12b186f186 10 * 1. Redistributions of source code must retain the above copyright notice,
dan_ackme 0:3c12b186f186 11 * this list of conditions and the following disclaimer.
dan_ackme 0:3c12b186f186 12 * 2. Redistributions in binary form must reproduce the above copyright notice,
dan_ackme 0:3c12b186f186 13 * this list of conditions and the following disclaimer in the documentation
dan_ackme 0:3c12b186f186 14 * and/or other materials provided with the distribution.
dan_ackme 0:3c12b186f186 15 * 3. The name of the author may not be used to endorse or promote products
dan_ackme 0:3c12b186f186 16 * derived from this software without specific prior written permission.
dan_ackme 0:3c12b186f186 17 *
dan_ackme 0:3c12b186f186 18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS AND ANY EXPRESS OR IMPLIED
dan_ackme 0:3c12b186f186 19 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
dan_ackme 0:3c12b186f186 20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
dan_ackme 0:3c12b186f186 21 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
dan_ackme 0:3c12b186f186 22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
dan_ackme 0:3c12b186f186 23 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
dan_ackme 0:3c12b186f186 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
dan_ackme 0:3c12b186f186 25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
dan_ackme 0:3c12b186f186 26 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
dan_ackme 0:3c12b186f186 27 * OF SUCH DAMAGE.
dan_ackme 0:3c12b186f186 28 */
dan_ackme 0:3c12b186f186 29 #pragma once
dan_ackme 0:3c12b186f186 30
dan_ackme 0:3c12b186f186 31
dan_ackme 0:3c12b186f186 32 // The BAUD rate your PC/MAC/Linux terminal uses with the eval board
dan_ackme 0:3c12b186f186 33 #define CONSOLE_BAUD 115200
dan_ackme 0:3c12b186f186 34
dan_ackme 0:3c12b186f186 35
dan_ackme 0:3c12b186f186 36 // Uncomment this to enable WiConnect serial interface hardware flow control
dan_ackme 0:3c12b186f186 37 // NOTE: your platform must support the serial flow control api functions
dan_ackme 0:3c12b186f186 38 //#define ENABLE_FLOW_CONTROL
dan_ackme 0:3c12b186f186 39
dan_ackme 0:3c12b186f186 40
dan_ackme 0:3c12b186f186 41 #define WICONNECT_INTERNAL_BUFFER_SIZE (4*1024)
dan_ackme 0:3c12b186f186 42 #define WICONNECT_SERIAL_RX_BUFFER_SIZE (4*1024)
dan_ackme 0:3c12b186f186 43
dan_ackme 0:3c12b186f186 44 #define DEFAULT_CMD_GETCHAR_TIMEOUT 250
dan_ackme 0:3c12b186f186 45 #define DEFAULT_COMMAND_LINE_LENGTH_MAX 128
dan_ackme 0:3c12b186f186 46 #define DEFAULT_COMMAND_MAX_HISTORY 16
dan_ackme 0:3c12b186f186 47 #define DEFAULT_CMD_PROMPT_STR "> "
dan_ackme 0:3c12b186f186 48 #define DEFAULT_COMMAND_MAX_ARGV 16
dan_ackme 0:3c12b186f186 49
dan_ackme 0:3c12b186f186 50 #define TEST_NONBLOCKING_API false
dan_ackme 0:3c12b186f186 51 #define TEST_BUFFER_LENGTH 4*1024
dan_ackme 0:3c12b186f186 52
dan_ackme 0:3c12b186f186 53
dan_ackme 0:3c12b186f186 54 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dan_ackme 0:3c12b186f186 55 // Seabass Target Configuration
dan_ackme 0:3c12b186f186 56 #ifdef TARGET_SEABASS
dan_ackme 0:3c12b186f186 57
dan_ackme 0:3c12b186f186 58 #define WICONNECT_TX_PIN PA_9
dan_ackme 0:3c12b186f186 59 #define WICONNECT_RX_PIN PA_10
dan_ackme 0:3c12b186f186 60 #define WICONNECT_RESET_PIN PB_0
dan_ackme 0:3c12b186f186 61 #define WICONNECT_WAKE_PIN NC
dan_ackme 0:3c12b186f186 62
dan_ackme 0:3c12b186f186 63 #ifdef ENABLE_FLOW_CONTROL
dan_ackme 0:3c12b186f186 64 #define WICONNECT_CTS_PIN PA_11
dan_ackme 0:3c12b186f186 65 #define WICONNECT_RTS_PIN PA_12
dan_ackme 0:3c12b186f186 66 #else
dan_ackme 0:3c12b186f186 67 #define WICONNECT_CTS_PIN NC
dan_ackme 0:3c12b186f186 68 #define WICONNECT_RTS_PIN NC
dan_ackme 0:3c12b186f186 69 #endif
dan_ackme 0:3c12b186f186 70
dan_ackme 0:3c12b186f186 71 #endif
dan_ackme 0:3c12b186f186 72
dan_ackme 0:3c12b186f186 73
dan_ackme 0:3c12b186f186 74 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dan_ackme 0:3c12b186f186 75 // Nucleo F401RE Target Configuration
dan_ackme 0:3c12b186f186 76 #if defined(TARGET_NUCLEO_F401RE) || defined(TARGET_NUCLEO_F411RE)
dan_ackme 0:3c12b186f186 77
dan_ackme 0:3c12b186f186 78 #define WICONNECT_TX_PIN PA_9
dan_ackme 0:3c12b186f186 79 #define WICONNECT_RX_PIN PA_10
dan_ackme 0:3c12b186f186 80 #define WICONNECT_RESET_PIN PC_7
dan_ackme 0:3c12b186f186 81 #define WICONNECT_WAKE_PIN NC
dan_ackme 0:3c12b186f186 82
dan_ackme 0:3c12b186f186 83 #ifdef ENABLE_FLOW_CONTROL
dan_ackme 0:3c12b186f186 84 #define WICONNECT_CTS_PIN PA_11
dan_ackme 0:3c12b186f186 85 #define WICONNECT_RTS_PIN PA_12
dan_ackme 0:3c12b186f186 86 #else
dan_ackme 0:3c12b186f186 87 #define WICONNECT_CTS_PIN NC
dan_ackme 0:3c12b186f186 88 #define WICONNECT_RTS_PIN NC
dan_ackme 0:3c12b186f186 89 #endif
dan_ackme 0:3c12b186f186 90
dan_ackme 0:3c12b186f186 91 #endif
dan_ackme 0:3c12b186f186 92