group电脑ip查询

电脑ip查询  时间:2021-05-05  阅读:()
IP-TO-WIFIAPPLICATIONPROGRAMMINGGUIDEReference:GS-IP2WF-APGVersion:SP-1.
0Date:19-Jul-11IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE2OF49VersionDateRemarks1.
024Nov2010Initialrelease.
1.
1May2011Updatedforrelease2.
3.
1Copyright2010-2011byGainSpanCorporation.
Allrightsreserved.
GainSpanCorporation125SouthMarketStreet,Suite400SanJose,CA95113U.
S.
A.
+1(408)673-2900info@GainSpan.
comwww.
GainSpan.
comGainSpanandGainSpanlogoaretrademarksorregisteredtrademarksofGainSpanCorporation.
Specifications,features,andavailabilityaresubjecttochangewithoutnotice.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE3OF49TableofContents1SYSTEMOVERVIEW61.
1PURPOSE61.
2SCOPE61.
3OVERVIEW61.
4TERMINOLOGY.
71.
5STANDARDS72INTERFACEARCHITECTURE83ADAPTERDESCRIPTION103.
1SERIALINTERFACEDETECTION.
103.
2SYSTEMINITIALIZATION103.
2.
1ExternalPAAutoDetection.
103.
2.
2ProfileDefinition103.
3COMMANDPROCESSINGMODE.
123.
4DATAHANDLING.
123.
4.
1UnsolicitedDataHandling133.
4.
2SoftwareFlowControl.
143.
4.
3HardwareFlowControl.
143.
5SERIALDATAHANDLING143.
6WIRELESSNETWORKMANAGEMENT.
153.
6.
1Scanning.
153.
6.
2Association.
153.
6.
3ResponseCodes.
153.
6.
4EnhancedAsynchronousMessages.
163.
6.
5ExceptionMessages173.
6.
6BootMessages.
183.
6.
7SSIDandPassPhrase.
184COMMANDSFORCOMMANDPROCESSINGMODE.
204.
1COMMANDINTERFACE204.
1.
1InterfaceVerification204.
1.
2Echo.
204.
1.
3Verbose.
204.
2UARTINTERFACECONFIGURATION214.
2.
1UARTParameters.
214.
2.
2SoftwareFlowControl.
214.
2.
3HardwareFlowControl.
214.
3SPIINTERFACECONFIGURATION224.
3.
1SPIParameters224.
4IDENTIFICATIONINFORMATION.
224.
5IPTOWI-FICONFIGURATIONPROFILES.
23IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE4OF494.
5.
1SaveProfile.
234.
5.
2LoadProfile234.
5.
3SelectionofDefaultProfile.
244.
5.
4RestoretoFactoryDefaults244.
5.
5Outputcurrentconfiguration244.
6WI-FIINTERFACECONFIGURATION244.
6.
1MACAddressConfiguration.
244.
6.
2OutputMACAddress254.
6.
3RegulatoryDomainConfiguration.
254.
6.
4RegulatoryDomainInformation.
264.
6.
5Scanning.
264.
6.
6Mode.
264.
6.
7AssociatewithaNetwork,orStartanAdHocorInfrastructure(AP)Network.
274.
6.
8Disassociation.
274.
6.
9WPS.
274.
6.
10Status.
284.
6.
11GetRSSI284.
6.
12GetTransmitRate294.
6.
13SetRetrycount294.
7WI-FISECURITYCONFIGURATION294.
7.
1AuthenticationMode294.
7.
2SecurityConfiguration.
294.
7.
3WEPKeys.
304.
7.
4WPA-PSKandWPA2-PSKPassphrase.
304.
7.
5WPA-PSKandWPA2-PSKKEYCALCULATION.
304.
7.
6WPA-PSKandWPA2-PSKKEY314.
7.
7EAP-Configuration314.
7.
8EAP324.
7.
9CertificateDeletion.
324.
7.
10Upondeploymentofthiscommand,theinterfacereturnsthestandardcommandresponse(section4)orERROR,1(verbosedisabled),iftheoperationfailedEnable/Disable802.
11Radio.
.
.
.
344.
7.
11Enable/Disable802.
11PowerSaveMode.
344.
7.
12Enable/DisableMulticastReception.
344.
7.
13Transmitpower354.
7.
14SyncLossInterval354.
7.
15ExternalPA.
354.
7.
16.
AssociationKeepAliveTimer354.
7.
17UnsolicitedDataTransmission.
364.
8BATTERYCHECK364.
8.
1BatteryCheckStart364.
8.
2BatteryWarning/StandbyLevelSet.
374.
8.
3BatteryCheckSet.
374.
8.
4BatteryCheckstop374.
8.
5BatteryValueGet.
384.
9POWERSTATEMANAGEMENT.
384.
9.
1Enable/DisableSOCDeepSleep384.
9.
2RequestStandbyMode38IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE5OF494.
10PROVISIONING.
394.
10.
1WebProvisioning.
394.
10.
2WebProvisioning(Logo)404.
11RFTESTS.
414.
11.
1AsynchronousFrameTransmission.
414.
11.
2AsynchronousFrameReception.
424.
11.
3Modulated/Un-ModulatedWaveTransmission.
424.
11.
4FrameTransmission/ReceptionStop434.
12MISCELLANEOUS444.
12.
1EnhancedAsynchronousNotification.
444.
12.
2NodeStartUpHandling.
444.
12.
3SPIinterfacehandling.
454.
12.
4PinconnectionforSPIInterface.
464.
12.
5FactoryDefaults.
464.
12.
6FirmwareUpgrade.
464.
12.
7SetSystemTime.
474.
12.
8GetSystemTime.
474.
12.
9GPIOOutHIGH/LOW.
474.
12.
10ErrorCounts.
484.
12.
11Version.
485REFERENCES49FiguresFigure1:OverallArchitectureoftheAdapter.
8TablesTable1:GlossaryofTerms.
7Table2:ProfileParameters.
11IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE6OF491SystemOverview1.
1PurposeThisdocumentdescribestheoperationandserialcommandinterfacefortheGainSpanSystem-On-Chip(SOC)IP2WiFiAdapter.
TheIP2WiFiAdapterenablesembeddeddeviceswithaUART/SPIinterfacetogainaccessan802.
11-compliant(Wi-Fi)wirelessnetworkconnectionusingonlyserialcommands.
1.
2ScopeThisdocumentreviewsthearchitectureoftheIP2WiFisoftwareandprovidestheprogrammerwithnecessarycommandsyntaxrequiredtomanagetheWi-Fiinterfaceandtosendandreceivenetworkmessages.
ThisdocumentassumesthatthereaderisgenerallyfamiliarwithGainSpanproductsandtheoperationandmanagementof802.
11wirelessdevices.
1.
3OverviewTheIP2WiFistackisusedtoprovideWi-Ficapabilitytoanydeviceshavingaserialinterface.
ThisapproachoffloadsWLANtotheWi-Fichip,allowinghostmicrocontrollerstocommunicatewithotherhostsonthenetworkusingaWi-Fiwirelesslink.
ThehostprocessorcanuseserialcommandstoconfiguretheIP2WiFiAdapterandtocreatewirelessandnetworkconnections.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE7OF491.
4TerminologyTable1:GlossaryofTermsTermExplanationAPAccessPointAPIApplicationProgrammer'sInterfaceBSSIDBasicServiceSetIdentifierDHCPDynamicHostConfigurationProtocolIPInternetProtocolMTUMaximumTransferUnitPSKPre-sharedkeyRSSIReceivedSignalStrengthIndicationSSIDServiceSetIdentifierTCPTransmissionControlProtocolUARTUniversalAsynchronousReceiver/TransmitterUDPUserDatagramProtocolWEPWiredEquivalentPrivacyWPAWi-FiProtectedAccess1.
5StandardsThefollowingstandardsandconventionsareconsideredinthisdesign:IEEE802.
11b/gITUV.
25terATCommandSetError!
Referencesourcenotfound.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE8OF492InterfaceArchitectureTheoverallarchitectureoftheIP2WiFiinterfaceisdepictedinFigure1.
TxandRxDataHandlerspassmessagesto,andfrom,theWi-Fiinterface.
CommandsrelatedtomanagementoftheIP2WiFiinterfaceandthenetworkconnectionsareinterceptedbyaCommandProcessor.
ASerialDataHandlertranslatesdatatoandfromaUART/SPI-compatibleformat.
Figure1:OverallArchitectureoftheAdapterThesystemiscomposedofthefollowingmodules:SystemInitialization(section3.
2)CommandProcessor(section3.
3)DataHandlers(section3.
4)SerialDataHandler(section3.
5)WirelessConnectionManagement(section3.
6)IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE9OF49ThesoftwarefortheIP2WiFiAdapterisdrivenusingastatemachine.
Uponpoweringon,therequiredinitializationofallthemodulesisperformedandthenthestatemachineisentered.
Thisstatemachineisevent-drivenandprocessestheeventsreceivedfromeithertheserialportorfromtheWi-Fi/interfaceaswellasinternaleventsfromitsownmodules.
Thestatemachinecallstheappropriatehandlerforagiveneventperthecurrentstate.
TheIP2WiFiAdapterhastwodistinctoperatingmodes.
Inthedefaultcommandprocessingoperatingmode,commandstoconfigureandmanagetheinterfacearesentovertheserialinterface.
Inthisdefaultmode,thenodeacceptscommandsenteredbytheHostCPUandprocesseseachofthecommands.
Allcommandsareavailableinthismode.
TheUsermayestablishadataconnectionhereandsenddata.
Indataprocessingmode,datacanbesentto,orreceivedfrom,theWiFiinterface.
Foreachmode,configurationparametersarestoredinnon-volatilememory.
Inadditiontofactory-defaultparametervalues,twouser-definedprofiles(0and1)areavailable.
Theparametersettobeusedisdeterminedbyausercommand(section4.
5.
3).
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE10OF493AdapterDescription3.
1SerialInterfaceDetectionUponstartup,theIP2WiFiadaptorperformsanautodetectionofserialinterfaceprotocol.
ThisdetectionisdonethroughtheGPIOpin26.
IfthisGPIOis"high"duringstartup,meaningtheserialinterfaceisSPI,otherwisetheadaptorenablestheUARTinterfaceastheIP2WiFiinterfacetothehost.
3.
2SystemInitializationUponstartup,theIP2WiFiinterfaceperformsthefollowingactions.
Duringtheinitializationprocess,themodulewillsearchforasavedconfigurationfile.
Ifasavedconfigurationfileisavailable,itisloadedfromnon-volatilememory.
Ifnosavedconfigurationfileisdiscovered,thedefaultsettingswillbeapplied.
Iftherearenosavedparameters,thefactory-defaultconfigurationisloaded.
TheIP2WiFiapplicationisinitializedbasedontheprofilesettings.
Theinterfaceentersthecommandprocessingstate.
Uponpower-up,theUARTinterfacedefaultsto115200baud,using8bitcharacterswithnoparitybitsandonestopbit.
SimilarlySPIinterfacedefaultstoMode#0(CPL=0,CPH=0).
AnychangestothisconfigurationthatweremadeinaprevioussessionusingtheATBcommand(section4.
2.
1)willbelostwhenpowerislost.
TomakechangesintheUART/SPIparametersthatwillpersistacrosspowercycling,therelevantchangesmustbesavedintothepower-onprofileusingAT&W(section4.
5.
1)andAT&Y(section4.
5.
3).
3.
2.
1ExternalPAAutoDetectionUponstartup,theIP2WiFiinterfaceperformsanautodetectionofExternalPA.
ThisdetectionisdonethroughtheGPIOpin12.
IfthisGPIOis"high"duringstartup,meaningtheexternalPAispresent,theadaptorenablestheexternalPAandforcestheadaptortogotostandbyforamomentandcomesbackjusttomakeanychangeseffectivefortheexternalPAconfiguration.
3.
2.
2ProfileDefinitionTheconfigurationparametervaluesthatdefinethebehavioroftheAdapteraregroupedintoProfiles.
Theseprofilesarestoredinnon-volatilememorywhennotinuse.
ThedefaultconfigurationsupportstwoProfiles.
ThecontentsofaprofilearelistedinTable2.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE11OF49Table2:ProfileParametersParameterValuesReferenceGeneralWirelessParameters802.
11OperatingModeBSS,IBSS4.
6.
6TransmitPowerConfiguration4.
7.
1313802.
11TransmitRetryCount4.
6.
13PowerSaveModeEnabled,Disabled4.
7.
1111802.
11RadioModeEnabled,Disabled4.
7.
100WirelessInterfaceSecurityConfigurationAuthenticationModeOpen,Shared4.
7.
1PSKValidValid,Invalid4.
7.
5PSK-SSIDAnyvalidSSID;usedforPSKkeycomputation.
4.
7.
5WEPKeyConfiguration3WPAPassphrase4UARTConfigurationEchoModeEnabled,Disabled4.
1.
2VerboseModeEnabled,Disabled4.
1.
3BitsPerCharacter5,6,7,84.
2.
1NumberofStopBits1,24.
2.
1ParityTypeNo,Odd,Even4.
2.
1SoftwareFlowControlModeEnabled,Disabled4.
2.
2HardwareFlowControlModeEnabled,Disabled4.
2.
3BaudRate4.
2.
1IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE12OF493.
3CommandProcessingModeIncommandmode,theapplicationreceivescommandsovertheserialport.
Commandsareprocessedlinebyline.
"VerboseMode",whenreferringtocommandsbeingexecuting,displaysofstatusofanycommandexecutedinASCII(humanreadable)format.
Whentheverbosemodeisdisabled,theoutputwillsimplybeinnumericdigits,witheachdigitindicatingaparticularstatus.
VerboseModeisenabledbydefault.
If"echo"isenabledtheneachcharacterisechoedbackontheserialportEachcommandisterminatedwithacarriagereturnorlinefeedEachresponseisstartedwithacarriagereturnandlinefeed,withtheexceptionoftheresponsestothefollowingcommands:a.
Theresponsetothefollowinggroupofcommandsstartswithalinefeedonly:AT+WPAPSK=,a)Theresponsetothefollowinggroupofcommandsstartswithalinefeedandcarriagereturn:.
AT+SETTIME=,EachresponseisterminatedwithacarriagereturnandlinefeedIfthecharacters"A"and"/"areenteredatthebeginningofaline(after),thenthepreviouscommandisexecutedOnceacompleteline(endingwith)isentered,thenthecommandcontainedthereinisprocessedandanappropriateresponsereturnedUnlessotherwisespecified,ifverbosemodeisenabled,thentheresponsetoasuccessfulcommandisthecharacters"OK".
Theresponsetoanunsuccessfulcommandistheword"ERROR",followedbyadetailederrormessage,ifavailable.
Ifverbosemodeisdisabled,commandresponsesisnumericalwithOKhavingavalueof0anderrorcodesrepresentedbypositiveintegers.
ThecommandsaredescribedinSection4.
Possibleresponsecodesaredescribedin3.
6.
3.
3.
4DataHandlingInDataProcessingMode,datatransfersaremanagedusingescapesequences.
EachescapesequencestartswiththeASCIIcharacter27(0x1B);thisisequivalenttotheESCkey.
Theencodingofdataandrelatedcommandsaredescribedinthefollowingpages.
Thisencodingisusedforbothtransmittedandreceiveddata.
Theencodingofdataisdescribedbelow::R::IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE13OF49WheretheEthernetPacketis:Thecontentsofarebyteorbytestream.
LengthisthesizeofethernetpacketDstAddristhedestinationMACaddressSrcAddristhesourceMACaddressEtherTypeisthetypeoftheEthernetpacket.
Forexample,forBACNET-over-Ethernet,EtherTypeis0x0000.
Payloadistherawdata3.
4.
1UnsolicitedDataHandlingInUnsolicitedDataMode(datatransmissionwithoutassociation),datatransferismanagedusingescapesequences.
EachescapesequencestartswiththeASCIIcharacter27(0x1B),equivalenttotheESCkey.
Theencodingofdataisdescribedbelow.
Thisencodingisusedfortransmitteddataonly.
TheunsoliciteddatatransmissionEnablecommandmustbeissuedbeforesendingunsoliciteddatathroughtheAdapter.
Theformatofanunsoliciteddataframeis:D/dThePayLoadcontentisbyteorbytestream.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE14OF493.
4.
2SoftwareFlowControlSoftwareflowcontrolworksonlywithASCIIdatatransfersandcannotbeusedforbinarydata.
Ifsoftwareflowcontrolisenabled,andtheinterfacereceivesanXOFFcharacterfromtheserialhost,itstopssendingtothehostuntilitreceivesanXONcharacter.
IftheAdapterisreceivingdataoverthewirelessconnectionduringthetimethatXOFFisenabled,itispossibleforthewirelessbuffertobecomefullbeforeXONisreceived.
Insuchacase,datafromthenetworkwillbelost.
Ifsoftwareflowcontrolisenabled,thentheinterfacesendsanXOFFcharactertothehostwhenitwillbeunabletoservicetheserialport.
TheXONcharacterissentwhentheinterfaceisonceagainabletoacceptdataovertheserialport.
Note:Withinitialization,theAdaptertreatstheserialchannelasclearwithnorestrictionsondatatransmissionorreception;noexplicitXONistransmittedbytheAdapterorrequiredfromtheHost,evenifflowcontrolisenabled.
3.
4.
3HardwareFlowControlTheHardwareFlowcontrolisahandshakemechanisumbetweentheSerialhostandS2WadapteronUARTinterface,whichusetwoadditionalCTSandRTSconnections.
ThisfeaturepreventtheUARThardwareFIFOoverflowonS2Wadapterduetohighspeeddatatransmissionfrom/totheS2Wadapter.
Ifhardwareflowcontrolisenabled,anRTS/CTShandshakewilloccurbetweentheserialhostandtheAdapter.
ThisisahardwarefeatureandavailableonlyforUARTinterface.
TheS2WadapterusesbothCTSandRTSsignalsaslowforreadytosendorreceivedatafromserialhost.
3.
5SerialDataHandlingTheSerialDataHandlerreceivesandtransmitsdatatoandfromthehardwareserialcontroller.
Datareadfromtheserialportispassedto:ThecommandprocessorincommandmodeTheTxdatahandlerindatamodeThenDataistransferredontheserialportfrom:ThecommandprocessorinordertooutputresponsestocommandsTheRxdatahandlerinordertooutputincomingpacketsTheautoconnectionhandlerinordertooutputincomingdataTheconnectionmanagerinordertooutputstatusindicationsThewirelessconnectionmanagerinordertooutputstatusindicationsIP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE15OF493.
6WirelessNetworkManagement3.
6.
1ScanningTheIP2WiFiinterfaceinstructstheWi-FiradiotoscanforaccesspointsandadhocnetworkswithaspecifiedSSIDand/orchannelforaspecifiedscanperiod.
ScanningcanbeperformedtofindnetworkswithaspecificSSIDnetworksoperatingonaspecificradiochanneloracombinationoftheseconstraints.
3.
6.
2AssociationTheIP2WiFiinterfaceperformsalltheactionsrequiredtojoinaninfrastructureIPnetwork:ScanforaspecificAP(AT+WS,section0)Authenticatethespecifiednetworkusingtheconfiguredauthenticationmode(AT+WAUTH,section4.
7.
1)AssociatetotheAP(AT+WA,section4.
6.
7)PerformsecuritynegotiationifrequiredChangestatetoWirelessConnectedInadhocmode,theinterfacecan:ScanforaspecifiedadhocNetworkJointheadhocnetwork,ifitexistsIftheadhocnetworkdoesnotexist,createanewadhocnetworktojoinPerformsecuritynegotiation,ifrequiredChangestatetoWirelessConnected3.
6.
3ResponseCodesIP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE16OF49ThepossibleresponsessentbytheAdaptertotheserialhostareenumeratedinTable3.
Table3:ResponseCodes.
NoASCIICHARResponseASCIISTRINGMeaning10S2W_SUCCESS"OK"CommandRequestSuccess.
21S2W_FAILURE"ERROR"CommandRequestFailed.
32S2W_EINVAL"ERROR:INVALIDINPUT"InvalidCommandorOptionorParameter.
76S2W_ENOTSUP"ERROR:NOTSUPPORTED"OperationorFeaturenotsupported.
109S2W_LINK_LOST"DISASSOCIATED"Notassociatedtoawirelessnetwork.
1110S2W_DISASSO_EVT"\r\nDisassociationEvent\r\n"Wirelessnetworkassociationlost.
1211S2W_STBY_TMR_EVT"\n\rOutofStandBy-Timer\r\n"WakeupfromStandbyduetoRTCtimerexpiration.
1312S2W_STBY_ALM_EVT"\n\rOutofStandBy-Alarm\r\n"WakeupfromStandbyduetoreceiptofanAlarmsignal.
1413S2W_DPSLEEP_EVT"\r\nOutofDeepSleep\r\n"WakefromDeepSleep1514S2W_BOOT_UNEXPECTED_EVT"\r\nUnExpectedWarmBoot(PossiblyLowBattery)\r\n"Unexpectedreset.
Possiblereasons:externalresetorlowbattery3.
6.
4EnhancedAsynchronousMessagesNOMessageSubTypeMeaning1DisassociationEvent3WirelessnetworkassociationIP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE17OF49lost.
2OutofStandBy-Timer4WakeupfromStandbyduetoRTCtimerexpiration.
3OutofStandBy-Alarm5WakeupfromStandbyduetoreceiptofanAlarmsignal.
4OutofDeepSleep6WakefromDeepSleep.
5UnExpectedWarmBoot(PossiblyLowBattery)7Unexpectedreset.
Possiblereasons:externalresetorlowbattery.
3.
6.
5ExceptionMessagesThepossibleexceptionmessagessentbytheAdaptertotheserialhostareenumeratedinTable4:Table4:ExceptionMessages.
NoASCIISTRINGMeaning1\n\rAPPReset-WlanSWReset\r\nAdapterresetduetoWLANprocessorsoftwarereset.
2"\n\rAPPReset-APPSWReset\r\n"Adapterresetduetoappprocessorsoftwarereset.
.
.
3\n\rAPPReset-Wlan-Wd\r\nAdapterresetduetoWLANprocessorwatchdog.
4\n\rAPPReset-App-Wd\r\nAdapterresetduetoappprocessorwatchdog5\n\rAPPReset-WlanExcept\r\nAdapterresetduetoWLANprocessorsoftwareabortorassert.
6\n\rAPPReset-FW-UP-FAILURE\r\nAdapterresetduetofirmwareupgradefailure.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE18OF497\n\rAPPReset-FW-UP-SUCCESS\r\nAdapterresetduetofirmwareupgradesuccess.
8\n\rAPPReset-FW-UP-RECOVERY\r\nAdapterresetduetofirmwareupgradefailurewithoneoftheflashimageupdatedsuccessfully.
IftheexceptionisduetooneoftheWLANwd/SWReset/Except,thentheadaptersendmemorydumpinformationofitsWLANregisterstotheserialhoststartswiththemessage\r\n---MEM-DUMP-START:\r\nandendwiththemessage\n\r---MEM-DUMP-END:\r\n.
3.
6.
6BootMessagesThepossiblebootmessagessentbytheAdaptertotheserialhostareenumeratedinTable6.
Table5:BootMessages.
NOASCIISTRINGMeaning1\r\nIP2WiFiAPP\r\nNormalIP2WiFiadapterbootmessagewithinternalPA.
2\r\nIP2WiFiAPP-Ext.
PA\r\nNormalIP2WiFiadapterbootmessagewithexternalPA.
3\r\nFactoryDefaultCheckSumError\r\nThefactorydefaultsectioncontainsinvaliddata.
Thiscomesalongwitheitheroneoftheabovebootmessage.
3.
6.
7SSIDandPassPhraseRules:1-TheIP2WiFiadapteracceptsthefollowingASCIIcharactersforSSIDandpassphrase.
CategoryAcceptedCharactersNumerical0-9Alphabetsa-zandA-ZSpecialcharactersSPIP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE19OF49Note:SP=space2-TheSSIDorPassPhraseparametermaybecapturedwithinorwithoutdoublequotationmarks("SSID").
3-Thequotationmark(")maynotbeuseasthefirstcharacterofthessidorpassphrase.
4-Ifcomma(,)isapartoftheSSID,thenSSIDparameterneedstobeframedwithdoublequotationmarks("SS,ID").
ExpectedSSIDInputSSIDRemarksTESTTESTValid(satisfiesrule2)TEST"TEST"Valid(satisfiesrule2)TE"STTE"STValid(satisfiesrule3)TE"ST"TE"ST"Invalid(breaksrule3)TE,ST"TE,ST"Valid(satisfiesrule4)TE,STTES,TInvalid(breaksrule4)TE,S"T"TE,S"T"Invalid(breaksrule3and4)IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE20OF494CommandsforCommandProcessingModeThissectionprovidesalistofIP2WiFicommandsandtheireffects.
Formattingandprocessingofcommandswasdescribedinsection3.
3above.
ParametersaregenerallyASCIIcharacters,e.
g.
ATEnwithn=1istheseriesofASCIIcharacters'A','T','E',and'1'.
Wheresomeparametersareoptional,mandatoryparametersaredenotedbyandoptionalparametersby[].
Ifaparameterismandatory,anyassociatedsub-parametersarealsomandatory;sub-parametersofanoptionalparameterareoptional.
Parametersmustalwaysbeprovidedintheordergiveninthecommanddescription.
Whenanoptionalparameterisnotsupplied,thecommadelimitersmuststillbeincludedinthecommand.
Everycommandstartswiththecharacters"AT";anyotherinitialcharacterswillcauseanerrortobereturned.
CommandResponse:Inmostcases,validcommandsreturnthecharactersOKifverbosemodeisenabledand0verbosemodeisnotenabled.
InvalidinputsreturnERROR:INVALIDINPUTifverboseisenabledand2ifitisnot.
Exceptionstothisrulearenotedexplicitlybelow.
4.
1CommandInterface4.
1.
1InterfaceVerificationThecommandATcanbeissuedtoverifythattheinterfaceisoperatingcorrectly;itshouldreturnasuccessfulresponseOK(or0ifverbosemodeisdisabled).
4.
1.
2EchoThecommandtoenable/disableechoisATEnIfnis0,echoisdisabledandifnis1,echoisenabled.
Ifechoisenabled,everycharacterreceivedontheserialportistransmittedbackontheserialport.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
BydefaultechoisenabledinIP2WiFiadapter.
4.
1.
3VerboseThecommandtoenable/disableverboseresponsesisATVnIfnis0,verboseresponsesisdisabledandifnis1,verboseresponsesisenabled.
Ifverbosemodeisdisabled,thestatusresponseisintheformofnumericalresponsecodes.
Ifverbosemodeisenabled,thestatusresponseisintheformofASCIIstrings.
VerboseModeisenabledbydefault.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE21OF494.
2UARTInterfaceConfiguration4.
2.
1UARTParametersThecommandtosettheUARTcommunicationparametersisATB=[[,][,][,]]Allstandardbaudratesaresupported.
Allowedbaudratesinclude:9600,19200,38400,57600,115200,230400,460800and921600.
Parityisnfornoparity,eforevenparityandoforoddparity.
Allowedvaluesare5,6,7or8bits/character,with1or2stopbits(1.
5inthecaseofa5-bitcharacter).
ThenewUARTparameterstakeeffectimmediately.
However,theyarestoredinRAMandwillbelostwhenpowerislostunlesstheyaresavedtoaprofileusingAT&W(section4.
5.
1).
Theprofileusedinthatcommandmustalsobesetasthepower-onprofileusingAT&Y(section4.
5.
3).
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterfacewiththenewuartconfiguration.
4.
2.
2SoftwareFlowControlThecommandtoconfiguresoftwareflowcontrolisAT&KnIfnis0forsoftwareflowcontroltobedisabledandifnis1forsoftwareflowcontroltobeenabled.
Theuseofsoftwareflowcontrolisdescribedinsection3.
4.
2above.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
4.
2.
3HardwareFlowControlThecommandtoconfigurehardwareflowcontrolisAT&RnIfnis0,hardwareflowcontrolisdisabled.
Ifnis1,hardwareflowcontrolisenabled.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
Theuseofsoftwareflowcontrolisdescribedinsection3.
4.
3above.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE22OF494.
3SPIInterfaceConfiguration4.
3.
1SPIParametersThecommandtosettheSPIclockphaseandclockpolarityparameterisAT+SPICONF=,Ifclockpolarityis0,theninactivestateofserialclockislow.
Ifclockpolarityis1,theninactivestateofserialclockishigh.
Ifclockphaseis0,thendataiscapturedonthefirsttogglingedgeoftheserialclock(clockphasezero),afterthefallingedgeofslaveselectsignal.
Ifclockphaseis1,thendataiscapturedonthesecondedgeoftheserialclock(clockphase180),afterthefallingedgeofslaveselectsignal.
Defaultisclockpolarity0andclockphase0.
ThenewSPIparameterstakeeffectafternodereset/restart.
However,theyarestoredinRAMandwillbelostwhenpowerislostunlesstheyaresavedtoaprofileusingAT&W(section4.
5.
1).
Theprofileusedinthatcommandmustalsobesetasthepower-onprofileusingAT&Y(section4.
5.
3).
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterfacewiththenewSPIconfiguration.
4.
4IdentificationinformationThecommandtoobtainidentificationinformationfromtheapplicationisATInnistheIDoftheinformationtoobtain.
TheresponsesarelistedinTable.
TheseresponsesareprovidedasASCIIstrings.
Table4:ApplicationInformation.
InformationIDDescription0OEMidentification1HardwareversionIP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE23OF49InformationIDDescription2Softwareversion4.
5IPtoWi-FiConfigurationProfilesAdapterconfigurationparameterscanbestoredandrecalledasaProfile;see3.
2.
2foradetaileddescriptionoftheprofileparameters.
4.
5.
1SaveProfileThecommandtosavethecurrentprofileisAT&Wnnshalleitherbe0forprofile0or1forprofile1.
(Highervaluesareallowedifmoreprofilesareconfiguredatcompiletime.
)Upondeploymentofthiscommand,thecurrentconfigurationsettingsarestoredinnon-volatilememoryunderthespecifiedprofile.
Notethat,inordertoensurethattheseparametersarerestoredafterpowercyclingtheadapter,thecommandAT&Y(section4.
5.
3)mustalsobeissued,usingthesameprofilenumberselectedhere.
Thiscommandreturnsthestandardcommandresponse(section4)orERROR,(1,ifverbosedisabled)iftheoperationfailed.
4.
5.
2LoadProfileThecommandtoloadaprofileisATZnnshalleitherbe0forprofile0or1forprofile1.
(Highervaluesareallowedifmoreprofilesareconfiguredatcompiletime.
)Upondeploymentofthiscommand,thecurrentlyconfiguredsettingsaresettothosestoredinnon-volatilememoryunderthespecifiedprofile.
Thiscommandreturnsthestandardcommandresponse(section4)orERROR,(1,ifverbosedisabled)iftheoperationfailed.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE24OF494.
5.
3SelectionofDefaultProfileThecommandtoselectthedefaultprofileisAT&Ynnshalleitherbe0forprofile0or1forprofile1.
(Highervaluesareallowedifmoreprofilesareconfiguredatcompiletime.
)Thesettingsfromtheprofilethatischosenasthedefaultprofileareloadedfromnon-volatilememorywhenthedeviceisstarted.
Inadditiontothestandardstatusresponses,thiscommandreturnsERRORor1,basedonverbosesettings,ifavalidinputcannotbeexecuted.
4.
5.
4RestoretoFactoryDefaultsThecommandtoresettofactorydefaultsisAT&FUpondeploymentofthiscommand,thecurrentconfigurationvariablesareresettothefactorydefaults.
Thesedefaultsaredefinedbymacrovaluesintheconfigurationheader,andcanbemodifiedatcompiletime.
IssuingthiscommandresetsessentiallyallconfigurationvariablesexcepttheIEEEMACaddress.
OnlythecommandAT+NMAC(section4.
6.
1)changestheMACaddress.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
4.
5.
5OutputcurrentconfigurationThecommandtooutputtheconfigurationisAT&VUpondeploymentofthiscommand,thecurrentconfigurationandtheconfigurationofthesavedprofilesareoutputontheserialportinASCIIformat.
Inadditiontothestandardcommandresponse(section4).
Thedetailsoftheprofileparametersaredescribedinsection3.
1.
3.
4.
6Wi-FiInterfaceConfiguration4.
6.
1MACAddressConfigurationThecommandtosettheconfigurationisAT+NMAC=Upondeploymentofthiscommand,theAdaptersetstheIEEEMACaddressasspecified.
TheformatoftheMACaddressisan8-bytecolon-delimitedhexadecimalnumber.
Anexampleisshownbelow:AT+NMAC=00:1d:c9:00:01:a2TheMACaddressisusedinthe802.
11protocoltoidentifythevariousnodescommunicatingwithanAccessPointandtoroutemessageswithinthelocalarea(layer2)network.
FixedMACaddressesissuedIP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE25OF49tonetworkinterfacesarehierarchicallystructuredandareintendedtobegloballyunique.
BeforeissuingaMACaddresstoagivenAdapter,ensurethatnootherlocaldeviceisusingthataddress.
TheMACaddresssuppliedintheAT+NMACcommandissavedtoflashmemory,andwillbeusedoneachsubsequentcoldboot(frompoweroff)orwarmboot(fromStandby).
ThealternativecommandAT+NMAC2=StorestheMACaddressinRTCRAM.
Eachwarmboot(fromStandby)willusetheMACaddressstoredinRTCRAM(fromthemostrecentAT+NMAC2=command),butifpowertothedeviceislost,thenextcoldbootwillusetheMACaddressstoredinflashmemory(fromthemostrecentAT+NMAC=command).
Thiscommandisparticularlyusefulincaseswherewritingtoflashmemoryisundesirable.
4.
6.
2OutputMACAddressThecommandtooutputtheconfigurationisAT+NMAC=Upondeploymentofthecommand,theAdapteroutputsthecurrentMACaddressofthewirelessinterfacetotheserialport,inadditiontotheusualstatusresponses.
ThealternatecommandisAT+NMAC2=mayalsobeused,andreturnsthesamevalue.
4.
6.
3RegulatoryDomainConfigurationThecommandtosettheregulatorydomainisAT+WREGDOMAIN=ThiscommandsetstheregulatorydomainaspertheRegulatoryDomainparameterpassed.
Thesupportedregulatorydomainsare:FCCsupportedChannelrangeis1to11.
ETSIsupportedChannelrangeis1to13.
TELECsupportedChannelrangeis1to14.
Thecorrespondingvaluesforthisregulatorydomainthatneedstobepassedastheparameterare:FCC:0ETSI:1TELEC:2ThedefaultregulatorydomainisFCC.
TheRegulatorydomainsetisrequiredonlyoncesinceitisbeingupdatedintheflash.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE26OF494.
6.
4RegulatoryDomainInformationThecommandtogettheconfiguredregulatorydomainintheIP2WiFiadaptorisAT+WREGDOMAIN=Uponreceptionofthecommand,theAdapteroutputsthecurrentRegulatorydomainofthewirelessinterfacetotheserialportasthefollowingformat:REG_DOMAIN=FCCorETSIorTELEC,inadditiontothestandardcommandresponses.
4.
6.
5ScanningThecommandtoscanforaccesspointsoradhocnetworksisAT+WS[=[,][,][,]]Upondeploymentofthecommand,theAdapterscansfornetworkswiththespecifiedparametersanddisplaystheresults.
ScanningcanbeperformedtofindnetworkswithspecificSSIDorspecificBSSIDorinaparticularoperatingchannel,oracombinationoftheseparameters.
ScanningforaspecificSSIDorBSSIDemploysactivescanning,inwhichproberequestsaretransmittedwiththeSSIDand/orBSSIDfieldsbeingfilledappropriately.
TheSSIDisastringcontainingbetween1and32ASCIIcharacters,Refersection3.
7.
6fordetails.
ThiscommanddoesnotsupportscanbasedontheBSSID.
TheScanTimeisinunitsofMillisecondswitharangeof0-65535.
Uponcompletion,theadapterreportsthelistofnetworksandinformationforeachnetworkalongwiththestandardcommandresponse(section4)oneperline,inthefollowingformattotheserialinterface,,,,,Alsothissendsoutthetotalnumberofnetworksfoundasfollows(aftersendouttheaboveinformationtotheserialinterface).
"No.
OfAPFound:"Wherenisthetotalnumberofnetworksfoundduringscan.
TypeisINFRAforaninfrastructurenetworkandADHOCforanadhocnetwork.
4.
6.
6ModeThecommandtosetthewirelessmode:AT+WM=nIfnis0,themodeissettoinfrastructure;ifnis1,themodeissettoadhoc.
Ifnis2,themodeissettolimitedAPsothattheadaptercanactasalimitedwirelessAccessPoint.
IP2WiFiAdapterusesinfrastructure(0)asthedefaultmode.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE27OF494.
6.
7AssociatewithaNetwork,orStartanAdHocorInfrastructure(AP)NetworkThecommandtoassociatetoanaccesspoint,tojoinanadhocnetworkortocreateanadhoc/infrastructure(AP)/networkisAT+WA=[,[][,]]Ininfrastructuremode(section4.
6.
6,nis0),theadapterwillattempttoassociatewiththerequestednetwork.
Inadhocmode(section4.
6.
6,nis1),ifanetworkwiththedesiredSSIDorchannelorbothisnotfound,thenanewnetworkiscreated.
However,iftheBSSIDwasspecifiedintherequestandtheapplicableBSSIDisnotfound,theAdapterwillreportanerrorandwillnotcreateanadhocnetwork.
InAPmode(section4.
6.
6,nis2),theadaptercreatesaninfrastructurenetwork(limitedAP)withthessidpassed.
TheSSIDisastringcontainingbetween1and32ASCIIcharacters.
Refersection3.
6.
7fordetails.
InadhocandAPmodetheradioshouldbeoninactivemode(section4.
7.
10)Inadditiontotheusualstatusresponses,thiscommandwillreturnERRORor1(dependingonverbosestatus)ifavalidcommandwasissuedbutassociationfailed.
4.
6.
8DisassociationThecommandtodisassociateisAT+WDUpondeploymentofthiscommand,theinterfacedisassociatesfromthecurrentinfrastructureoradhocnetwork,ifassociated.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
4.
6.
9WPSThecommandtoassociatetoanAPusingWPSisAT+WWPS=[,PIN]METHODispushbutton(1)orpin(2).
PINisthepinforPINmethod.
Uponexecutionofthiscommand,theadaptoruseseitherpushbuttonorpinmethodaspertheMETHODparametertoassociatetotheWPSenabledAP.
ThePINisoptionalandisvalidforpinmethodonly.
Inadditiontotheusualstatusresponsesthiscommandreturnsthefollowinginformationtotheserialhostonsuccesscase:IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE28OF49SSID=CHANNEL=PASSPHRASE=forwpa/wpa2security;WEPKEY=forWEPsecurity;WEPKEYINDEX=forWEPsecurity.
;Theaboveinformationissendtotheserialinterfacewithoneinformationelementperline.
ThiscommandreturnsERRORor1(dependingonverbosestatus)ifavalidcommandwasissuedbutWPSfailed.
4.
6.
10StatusThecommandtoretrieveinformationaboutthecurrentnetworkisAT+WSTATUSUpondeploymentofthiscommand,theadapterreportsthecurrentnetworkconfigurationtotheserialhost:Mode;Channel;SSID;BSSID;Security;iftheadaptorassociatedtoanAccessPoint.
Ifnoassociationispresent,theerrormessageNOTASSOCIATEDisreturned,inadditiontotheusualstatusresponse.
4.
6.
11GetRSSIThecommandobtainsthecurrentRSSIisAT+WRSSI=Upondeploymentofthiscommand,thecurrentRSSIvalue(indBm)isoutputontheserialportinASCIIformat,inadditiontothestatusresponse.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE29OF494.
6.
12GetTransmitRateThecommandobtainsthecurrenttransmitrateisAT+WRATE=Upondeploymentofthiscommand,thecurrenttransmitrateusedisoutputontheserialportinASCIIformat.
4.
6.
13SetRetrycountThecommandtosetthewirelessretrycountisAT+WRETRY=Upondeploymentofthiscommand,thecurrentwirelessretrycountissettothesuppliedvalue.
Thetransmissionretrycountdeterminesthemaximumnumberoftimesadatapacketisretransmitted,ifan802.
11ACKisnotreceived.
Thevalidrangeis4to7withdefaultvalue5.
Notethatthecountincludestheinitialtransmissionattempt.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
4.
7Wi-FiSecurityConfiguration4.
7.
1AuthenticationModeThecommandtochoosetheauthenticationmodetouseisAT+WAUTH=nnis:0-None1–Open2–SharedwithWEPNotethatthiscommandconfigurestheauthenticationmode,butanyrequiredencryptionkeymustbesetusingthekeycommandsdescribedonthefollowingpage.
ThisauthenticationmodecommandisspecifictoWEPencryption;ifWPA/WPA2operationisemployed,theauthenticationmodemaybeleftatthedefaultvalue"None".
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
4.
7.
2SecurityConfigurationTheS2wadaptersupportsastrictsecurityconfiguration.
ThecommandrequiredtoconfigurethisfeatureisAT+WSEC=nWherenis:0–Autosecurity(All)IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE30OF491–Opensecurity2–Wepsecurity4–Wpa-psksecurity8–Wpa2-psksecurity16–WpaEnterprise32–Wpa2EnterpriseThes2wadaptersupportseitheroneoftheabovevaluewithdefaultsecurityconfigurationasauto.
ThisstrictsecuritycomplianceisnotapplicableforWPSfeature.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
4.
7.
3WEPKeysThecommandtosetWEPkeysisAT+WWEPn=nisthekeyindex,between1and4,andkeyareeither10or26hexadecimaldigitscorrespondingtoa40-bitor104-bitkey.
Someexamples:AT+WWEP1=123456abdcAT+WWEP3=abcdef12345678901234567890Uponreceivingavalidcommand,therelevantWEPkeyissettothevalueprovided.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
4.
7.
4WPA-PSKandWPA2-PSKPassphraseThecommandtosettheWPA-PSKandWPA2-PSKpassphraseisAT+WWPA=Thepassphraseisastringcontainingbetween8and63ASCIIcharacters,usedasaseedtocreatetheWPApre-sharedkey(PSK).
Ifthecomma(,)isapartofthepassphrase,thenthepassphraseparameteristobeframedindoublequotationmarks("passphrase").
Refersection3.
7.
6fordetails.
Uponreceivingthecommand,thePSKpassphraseisresettothevalueprovided.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
4.
7.
5WPA-PSKandWPA2-PSKKEYCALCULATIONComputationofthePSKfromthepassphraseiscomplexandconsumessubstantialamountsoftimeandenergy.
Toavoidrecalculatingthisquantityeverytimetheadapterassociates,theadapterprovidestheIP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE31OF49capabilitytocomputethePSKonceandstoretheresultingvalue.
ThekeyvalueisstoredintheSRAMcopyofthecurrentprofile;theprofileneedstobesavedinflashmemoryforthisvaluetopersistduringatransitiontoStandby.
ThecommandtocomputeandstorethevalueoftheWPA/WPA2PSK,derivedfromthepassphraseandSSIDvalueisAT+WPAPSK=,Thepassphraseisastringcontainingbetween8and63ASCIIcharacters,usedasaseedtocreatethePSK.
TheSSIDisastringofbetween1and32ASCIIcharacters.
Refersection3.
6.
7fordetails.
EachParameteroftheabovecommandseparatedbycomma(,).
Ifthecomma(,)isapartoftheSSIDorPASSPHRASE,thenSSIDandPASSPHRASEparametersistobeframedindoublequotationmarks("SSID","PASSPHRASE").
Whenthecommandisissued,theadapterimmediatelyrespondswithComputingPSKfromSSIDandPassPhrase.
Whenitiscomplete,theadapterwillissuetheusualOKor0.
InvalidinputswillresultinERROR:INVALIDINPUTor2,asusual.
Uponreceivingthecommand,theadaptercomputesthePSKfromtheSSIDandpassphraseprovided,andstoresthosevaluesinthecurrentprofile.
ThecurrentprofileparametersPSKValid,PSK-SSID,andWPAPassphraseareupdated,andcanbequeriedwithAT&V(4.
5.
5).
ThenexttimetheadapterassociatestothegivenSSID,thePSKvalueisusedwithoutbeingrecalculated.
AfterthePSKhasbeencomputed,thecommandsAT&W(tosavetherelevantprofile)andAT&Y(toensurethattheprofilecontainingthenewPSKisthedefaultprofile)shouldbeissued.
ThePSKwillthenbeavailablewhentheadapterawakensfromStandby.
Refertosections4.
5.
1and4.
5.
3formoreinformationonprofilemanagement.
4.
7.
6WPA-PSKandWPA2-PSKKEYThecommandtoconfiguretheWPA/WPA2PSKkeydirectlyisAT+WPSK=Thiscommanddirectlysetsthepre-sharedkeyasprovided.
Theargumentisa32-bytekeyformattedasanASCIIhexadecimalnumber.
Anyotherlengthorformatisconsideredinvalid.
Example:AT+WPSK=0001020304050607080900010203040506070809000102030405060708090001AfterthePSKhasbeenentered,thecommandsAT&W(tosavetherelevantprofile)andAT&Y(toensurethattheprofilecontainingthenewPSKisthedefaultprofile)shouldbeissued.
ThePSKwillthenbeavailablewhentheadapterawakensfromStandby.
Refertosections4.
5.
1and4.
5.
3formoreinformationonprofilemanagement.
4.
7.
7EAP-ConfigurationThecommandtoconfiguretheEAP-securityisAT+WEAPCONF=,,,IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE32OF49Uponexecutionofthiscommand,theadaptorsettheOuterauthentication,Innerauthentication,usernameandpasswordforEAPSecurity.
Thiscommandreturnsthenormalresponsecodes.
Thevalidouterauthenticationvaluesare:Eap-FAST:43Eap-TLS:13Eap-TTLS:21Eap-PEAP:25ThevalidInnerAuthenticationvaluesare:Eap-MSCHAP:26Eap-GTC:64.
7.
8EAPThecommandtoconfigurecertificateforEAP-TLSisAT+WEAP=,,,WType:CAcertificate(0)/Clientcertificate(1)/PrivateKey(2)Format:Binary(0)/Hex(1)Size:sizeofthefiletobetransferred.
Location:Flash(0)/Ram(1)ThiscommandenablestheadaptortoreceivethecertificateforEAP-TLS.
ThiscommandstoresthecertificateinflashorRAM,dependingontheparameter.
Upondeploymentofthiscommand,theinterfacereturnsthestandardcommandresponse(section4)orERROR,1(verbosedisabled),iftheoperationfailed.
4.
7.
9CertificateDeletionThecommandtodeleteanEAP-TLScertificatefrommemoryisAT+TCERTDEL=ThiscommanddeletestheEAP_TLScertificatestoredinflash/rambyname.
InthecaseofEAP-TLScertificatenamesare:TLS_CATLS_CLIENTIP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE33OF49TLS_KEYIP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE34OF494.
7.
10Disable802.
11RadioThecommandtoenableordisabletheradioisAT+WRXACTIVE=nIfnis0,theradioisdisabledandifnis1,theradioisenabled.
IfWRXACTIVE=1,the802.
11radioreceiverisalwayson.
Thisminimizeslatencyandensuresthatpacketsarereceivedatthecostofincreasedpowerconsumption.
TheGainSpanSOCcannotenterDeepSleep(section4.
9.
1)evenifitisenabled(PSDPSLEEP=1).
PowerSavemode(section4.
7.
1111)canbeenabledbutwillnotsavepower,sincethereceiverislefton.
IfWRXACTIVE=0,thereceiverisswitchedoffafterassociationiscomplete.
IfPowerSavemodeisnotenabled(WRXPSnotissuedorWRXPS=0),thereceiverwillnotbeturnedonagainunlessWRXACTIVE=1isreceived.
Packetswillnotbereceivedanddisassociationcouldoccur.
IfPowerSavemodeisenabled(WRXPS=1)priortoissuingWRXACTIVE=0,thereceiverwillbeturnedoff,butwillturnonagainwhenitistimetolistenforthenextbeaconfromtheAccessPoint.
IfDeepSleepisalsoenabled,thereceiverwillturnoff,andtheSOCwillenterDeepSleepwhenallpendingtasksarecompleted,butagainthesystemwillbeawakenedtolistentothenextbeacon.
IfatransitiontoStandbyisrequestedandoccurs(section4.
9.
2),theSOCwillremaininStandbyfortherequestedperiod,andwillnotawakentoreceiveabeaconduringthattime.
4.
7.
11Enable/Disable802.
11PowerSaveModeThecommandtoconfigure802.
11PowerSaveModeisAT+WRXPS=nIfnis0,PowerSaveisdisabledandifnis1,PowerSaveisenabled.
In802.
11PowerSaveMode,thenode(inthiscase,theIP2WiFiAdapter)willinformtheAccessPointthatitwillbecomeinactive,andtheAccessPointwillbufferanypacketsaddressedtothatnode.
Inthiscase,theGainSpanSOCradioreceiveristurnedoffbetweenbeacons.
ThenodewillawakentolistentoperiodicbeaconsfromtheAccessPoint,thatcontainaTrafficIndicationMap(TIM)thatwillinformtheStationifpacketsarewaitingforit.
Bufferedpacketscanberetrievedatthattime,usingPSPollcommandssentbythenode.
Inthisfashion,powerconsumedbytheradioisreduced(althoughthebenefitobtaineddependsontrafficloadandbeacontiming),atthecostofsomelatency.
.
Thelatencyencountereddependsinpartonthetimingofbeacons,setbytheAccessPointconfiguration.
ManyAccessPointsdefaultto100msecbetweenbeacons;inmostcasesthisparametercanbeadjusted.
4.
7.
12Enable/DisableMulticastReceptionIP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE35OF49ThecommandtoconfiguremulticastreceptionisAT+MCSTSET=nIfn=0,multicastreceptionisdisabled;ifn=1,multicastreceptionisenabled.
4.
7.
13TransmitpowerThecommandtosetthetransmitpowerisAT+WP=Ondeploymentofthiscommand,thetransmitpowerissettothesuppliedvalue.
ThedesiredpowerlevelshallbespecifiedinASCIIdecimalformat.
Thevalueoftheparametercanrangefrom0to7forinternalPAGS101x,withadefaultvalueof0(formaximumRFoutput)andfrom2to15forexternalPAGS101xwithdefaultvalueof2(formaximumRFoutput).
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
4.
7.
14SyncLossIntervalThecommandtoconfigurethesynclossintervalisAT+WSYNCINTRL=Onexecutionofthiscommandtheadaptorsetthesynclossintervalforntimesthebeaconintervalsothatiftheadaptordoesnotreceivethebeaconforthistimeitinformstheuserthiseventas"Dissociationevent".
Thedefaultvalueofsynclossintervalis30.
Thiscommandacceptthesynclossintervalfrom1to65535.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
4.
7.
15ExternalPAThecommandtoenabletheexternalPAisAT+EXTPA=n=1toenabletheexternalPAn=0todisableexternalPAThiscommandforcestheadaptortogotostandbyandcomesbackimmediatelyandcausingallconfiguredparametersandnetworkconnectionwillbelost.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
4.
7.
16.
AssociationKeepAliveTimerThecommandtoconfigurethekeep-alivetimerintervalisAT+PSPOLLINTRL=IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE36OF49Onexecutionofthiscommand,theadaptorwillsetthekeep-alivetimeintervalfornseconds.
Thiskeep-alivetimerwillfireforeverynsecondsoncetheadaptorsassociated.
ThistimerwillkeeptheadaptorinassociatedstateeventhereisnoactivitybetweenAPandadaptor.
Thedefaultvaleis45seconds.
Thiscommandacceptskeep-alivetimerintervalfrom0to65535seconds.
Thevalue0disablesthistimer.
Thiscommandreturnsthestandardcommandresponse(section4)totheserialinterface.
4.
7.
17UnsolicitedDataTransmissionTheadaptorsupportsunsoliciteddatatransmission(datatransmissionwithoutassociation).
TheCommandtoenablethisis:AT+UNSOLICITEDTX=,,,,,,,Thiscommandenablestheunsoliciteddatatransmissionwiththeparametersconfigured.
Afterissuingthiscommand,theuserneedstosendthepayloaddataasfollowing:D/dFrameControl:isthe802.
11framecontrolfield.
Itshouldbelimitedtoalldataframesandmanagementframeslikebeacons,associationrequestsandproberesponses.
SequenceControl:istheseqnumberoftheframe.
Thisfieldconsistsof12bits(LSB)fragmentnumberand4bit(MSB)sequencenumber.
(0-65535).
Channel:isthechannelonwhichthedatatobesent.
Rate:istherateatwhichthedatatobesendandthepossiblevaluesare:RATE_1MBPS=130,RATE_2MBPS=132,RATE_5_5MBPS=139,RATE_11MBPS=150WmmInfo:isthewmminformationtobesent.
ReceiverMac:istheremoteMACaddressoftheframetobesent.
Bssid:isbssidoftheAP.
FrameLength:isthelengthofthepayload.
Themaximumsizeoftheframeislimitedto1400bytes.
Thiscommandreturnsstandardcommandresponse(section4).
4.
8BATTERYCHECK4.
8.
1BatteryCheckStartThecommandtoinitiatebatterycheckingis:IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE37OF49AT+BCHKSTRT=ThevalidrangefortheparameterBatt.
chk.
freqisbetween1and100.
Upondeploymentofthiscommand,theadapterperformsacheckofthebatteryvoltageeachBatt.
chk.
freqnumberofsentpacketsandstorestheresultingvalueinnonvolatilememory(onlythemostrecentvalueisstored).
Notethatbatterychecksareperformedduringpackettransmissiontoensurethattheyreflectloadedconditions.
Batterycheckscanbeusedtoensurethatabattery-poweredsystemisprovidedwithsufficientvoltagefornormaloperation.
Lowsupplyvoltagescanresultindatacorruptionwhenprofiledataiswrittentoflashmemory.
Thiscommandreturnsstandardcommandresponse(section4)orERROR,iftheoperationfails.
4.
8.
2BatteryWarning/StandbyLevelSetThecommandtosetthebatterywarning/standbyleveltoenabletheadaptor'sinternalbatterymeasuringlogic:AT+BATTLVLSET=,,Uponexecutionofthiscommandtheadaptor'sinternalbatterylevelmonitoringlogicstarts.
Thiscommandshouldbeexecutedbeforethebatterycheckstartcommand.
WarningLevel:isthebatteryvoltage,inmillivolts,Whentheadapterbatteryvoltageislessthanthislevelsendsthemessage"BatteryLow"totheserialinterface.
WarningFreq:isthefrequencyatwhichtheadaptorsendsthe"BatteryLow"messagetotheserialinterfaceoncetheadaptor'sbatterycheckdetectedlowbattery.
StandbyLevel:isthebatteryvoltage,inmillivolts,Whentheadapterbatteryvoltagereachesthisleveltheadaptorsendsthemessage"BatteryDead"totheserialinterfaceandgoestolongstandby.
Thiscommandreturnsstandardcommandresponse(section4).
4.
8.
3BatteryCheckSetThecommandtoset/resetthebatterycheckperiodafterbatterycheckhasbeenstartedis:AT+BCHK=ThevalidrangefortheparameterBatt.
chk.
freqisbetween1and100.
Uponreceipt,theadapterrecordsthenewvalueofthebatterycheckfrequencysothatadapterperformsthebatteryvoltagecheckwiththenewvalueset.
Thiscommandreturnsstandardcommandresponse(section4).
Thesamecommandcanbeusedtogetthecurrentconfiguredbatterycheckperiod,theusageasfollowsAT+BCHK=Thiscommandreturnsthebatterycheckfrequencyalongwithstandardcommandresponse(section4).
4.
8.
4BatteryCheckstopThecommandtostopcheckingthebatterystateis:AT+BCHKSTOPIP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE38OF49Upondeploymentofthiscommand,batterycheckishalted.
4.
8.
5BatteryValueGetThecommandtoretrievetheresultsofbatterycheckoperationsis:AT+BATTVALGETThiscommandshouldreturnamessagewiththelatestvalue,e.
g.
BatteryValue:3.
4V,followedbytheusualstatusmessage.
Ifthiscommandisissuedbeforeissuingthecommandtostartbatterychecks,itreturnsERRORor1,dependingonthecurrentverbosesetting.
4.
9PowerStateManagement4.
9.
1Enable/DisableSOCDeepSleepThecommandtoenabletheGainSpanSOC'spower-savingDeepSleepprocessormodeisAT+PSDPSLEEPWhenenabled,theSOCwillenterthepower-savingDeepSleepmodewhennoactionsarepending.
InDeepSleepmode,theprocessorclockisturnedoffandSOCpowerconsumptionisreducedtolessthan1mW(about0.
1mAat1.
8V).
NotethatothercomponentsexternaltotheSOCmaycontinuetodissipatepowerduringthistime,unlessmeasuresaretakentoensurethattheyarealsooffordisabled.
Theprocessorcanbeawakenedbysendingdataontheserialport.
However,severalmillisecondsarerequiredtostabilizetheclockoscillatorwhenthesystemawakensfromDeepSleep.
Sincetheclockoscillatormuststabilizebeforedatacanberead,theinitialdatawillnotbereceived;"dummy"(discardable)charactersorcommandsshouldbesentuntilanindicationisreceivedfromtheapplication.
Thiscommanddoesnotreturnanyresponsecodetotheserialinterface.
Thes2wadaptersendsthemessage"OutofDeepSleep"onceitcomesoutfromdeepsleep.
4.
9.
2RequestStandbyModeThecommandtorequestatransitiontoultra-low-powerStandbyoperationisAT+PSSTBY=x[,,,]Theparametersare:xistheStandbytimeinmilliseconds.
Ifadelaytime(seebelow)isprovided,theStandbycountbeginsafterthedelaytimehasexpired.
DELAYTIMEisthedelayinmillisecondsfromthetimethecommandisissuedtothetimewhentheSOCgoestoStandby.
ALARM1POListhepolarityofthetransitionatpin31oftheSOCwhichwilltriggeranalarminputandwakentheGainSpanSOCfromStandby.
Avalueof0specifiesahigh-to-lowtransitionasactive;avalueof1specifieslow-to-high.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE39OF49ALARM2POListhepolarityofthetransitionatpin36thattriggersanalarminput,usingthesameconventionusedforAlarm1.
TheparametersDELAYTIME,ALARM1POL,andALARM2POLareoptional.
Specifyinganalarmpolarityalsoenablesthecorrespondingalarminput.
Thiscommanddoesnotreturnanyresponsecodetotheserialinterface.
Whenthiscommandisissued,theGainSpanSOCwillentertheultra-low-powerStandbystate(aftertheoptionaldelaytimeifpresent),remainingthereuntilxmillisecondshavepassedsincethecommandwasissued,oranenabledalarminputisreceived.
AnycurrentCID'sarelostontransitiontoStandby.
Onwakeup,theadaptersendsthemessageOutofStandby-orthecorrespondingerrorcode,dependingonverbosestatus.
InStandby,onlythelow-powerclockandsomeassociatedcircuitsareactive.
SerialmessagessenttotheUARTportwillnotbereceived.
Theradioisoffandpacketscannotbesentorreceived.
Therefore,beforerequestingatransitiontoStandby,therequestingapplicationshouldensurethatnoactionsareneededfromtheinterfaceuntiltherequestedtimehaspassed,orprovideanalarminputtoawakentheSOCwhenneeded.
Thealarmshouldtriggerabout10msecpriortoissuanceofanyserialcommands.
TheStandbyclockemploysa34-bitcounteroperatingat131,072Hz,sothemaximumpossibleStandbytimeis131,072,000milliseconds,orabout36.
4hours.
Standbyisnotentereduntilallpendingtasksarecompleted,andafewmillisecondsarerequiredtostoreanychangesandentertheStandbystate;asimilardelayisencounteredinawakingfromStandbyattheendoftherequestedtime.
Therefore,wedonotrecommendStandbytimeslessthanabout32milliseconds.
4.
10PROVISIONING4.
10.
1WebProvisioningTheadaptorsupportsprovisioningthroughwebpages.
ThecommandtostartwebprovisioningisAT+WEBPROV=,,,,PriortoissuingthiscommandtheadaptorshouldbeinanadhocorlimitedAPnetwork.
Uponreceptionofthiscommandtheadaptorstartsawebserver.
ItreturnsthenormalresponsecodeOKorERRORdependsonthesuccessorfailurecondition.
Oncetheadaptorreturnsthesuccessresponse("OK"),theusercanopenawebpageonthePCtheadhocorLimitedAPnetworkcreatedwiththeIPaddressoftheadaptorwithahttpclientapplication(e.
g.
IE).
UsercanconfigurebothL2andL3levelinformationontheprovisioningwebpages.
Submitbuttonstoresalltheconfiguredinformationintheadaptorandlogout/bootbuttonpresentsallprovisionedinformationtotheserialhostandresetstheadaptor.
Thesizeoftheusernameandpasswordislimitedto16characters.
Theprovisionedinformationsendstoserialhostis:SSID=CHNL=IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE40OF49CONN_TYPE=/*eitherBSSorIBSS*/MODE=/*0–>802.
11b*/WEP_ID=WEP_KEY=PSK_PASS_PHRASE=EAP_USER_NAME=EAP_PASS_WORD=PRIVATE_KEY_LEN=PRIVATE_KEY=/*privatekeyfileisstreamofbytesoflength=privateKeyLengthCLIENT_CERT_LEN=CLIENT_CERT=/*clientcertificateisstreamofbytesoflength=clientCertificateCA_CERT_LEN=CA_CERT=/*CAcertificateisstreamofbytesoflength=CACertificateNEW_USER_NAMENEW_PASS=Thiscommandreturnsstandardcommandresponse(section4)orERROR,ifthewebserverstartsfailed.
4.
10.
2WebProvisioning(Logo)TheadaptorsupportsaddingtheLogothatwillappearonthewebpagesusedforprovisioning.
ThecommandtoaddthelogoisAT+WEBLOGOADD=Lismeasuredinbytesandthemaximumsizeis1788bytes.
Thiscommandistypicallydoneatthemanufacturinglineinthefactory.
Thiscommandcanbedoneonlyonce.
ThereisnocommandtodeletetheLogo.
Thiscommandreturnsstandardcommandresponse(section4)totheserialinterface.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE41OF494.
11RFTestsTheadaptorsupportsdifferenttypesofframetransmissionforRFcapabilitymeasurement.
Itsupportsasynchronousdatatransmission/receptionandmodulated/un-modulatedwavetransmission.
4.
11.
1AsynchronousFrameTransmissionThecommandtoenabletheasynchronousframetransmissionis:AT+RFFRAMETXSTART=,,,,,,,,,,[,,]Afterissuingthiscommandtheuserneedstosendthepayloaddataasfollowing,A/aChannel:thechannelonwhichthedataistobesent.
Power:thepowerindbatwhichtheframetobesent(0-7).
Thevalueofthisparametercanrangefrom0to7forinternalPAandfrom2to15forexternalPA.
Rate:therateatwhichthedatacanbesentandthepossiblevaluesare:RATE_1MBPS=2,RATE_2MBPS=4,RATE_5.
5MBPS=11,RATE_11MBPS=22No.
ofTimes:thenumberofasynchronousframestobesent(1-65535).
Fr.
Intrvel:theintervalbetweeneachframe,inmicroseconds(1-65535).
FrameControl:expectsonlythelowerbyte(B0.
.
.
B7)of802.
11framecontrolfield,whichincludesprotocolversion,TypeandSubtype.
Allthehigherorderbits(B8.
.
.
B15)aremadezeroforthiscommand.
E.
g.
Framecontrolfieldofbeaconframeis:128HigherByteB15–B8SubTypeB7-B4TypeB3-B2ProtocolVersionB1–B00000000010000000IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE42OF49Note:Thiscommandisintendedtotransferonlydata&afewManagementframeslikeBeacon/Proberequest/Proberesponse/AssociationrequestDurationId:durationidinformationtobesent(0-65535).
SequenceControl:theseqnumberoftheframe(0-65535).
Thisfieldconsistsof12bits(LSB)fragmentnumberand4bit(MSB)sequencenumber.
(0-65535).
frameLen:thelengthofthepayload.
Themaximumsizeoftheframeislimitedto1400bytes.
Preamble:theshort(1)orlong(0)preamble.
Scrambler:theON(0)orOFF(1)scramblerfieldoftheframeDstMac:theMACaddressthroughwhichtheframetobesend.
SrcMac:MACaddressfortheWiFiBridge.
Example:AT+RFFRAMETXSTART=1,3,4,2,200,0,11,0,30,0,1,00:1d:c9:00:07:a2A123456789012345678901234567890Pleasecheckthewirelesssniffertoseetheframeonair.
TheAT+RFSTOP(section4.
11.
4)commandshouldbeissuedpriortosuccessiveframetransmissioncommand.
CSMA/CAisnotexecutedbeforetransmittingthiscommand;henceitcoulddestroythenetwork.
Thiscommandreturnsstandardcommandresponse(section4)totheserialinterface.
4.
11.
2AsynchronousFrameReceptionThecommandtoenabletheasynchronousframereceptionis:AT+RFRXSTART=[,]Channel:thechannelonwhichthedataistobereceived.
Sendtouser:isaflag(0/1)whichinstructstheadaptortosendthereceiveddatatotheserialinterface.
TheFrameTransmission/ReceptionStopcommand(section4.
11.
4)willsendthestatusinformationofthereceivedframestotheserialinterface.
Example:AT+RFRXSTART=1,1thiswillsendthereceiveddatatotheserialinterfaceAT+RFRXSTART=1,0thiswillnotsendthereceiveddatatotheserialinterfaceInbothcasethereceivedframeinformationisstoredinSRAMandonceissuethecommandAT+RFSTOPsendsthereceivedframeinformationtotheuserthroughserial.
Werecommendusingthesecondoption.
Thiscommandreturnsstandardcommandresponse(section4)totheserialinterface.
4.
11.
3Modulated/Un-ModulatedWaveTransmissionThecommandtoenablethemodulated/un-modulatedwavetransmissionis:IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE43OF49AT+RFWAVETXSTART=,,,,,,,Modulated:theflagtotellwhetherthewavetransmissionshouldbemodulated(1)orun-modulated(0)Channel:thechannelonwhichthedatatobereceived.
Rate:therateatwhichthewavetransmissionshouldhappen.
TX_RATE1mbps=0,TX_RATE2mbps=1,TX_RATE5.
5mbps=2,TX_RATE11mbps=3,PreambleLong:longpreamble(1)orshortpreamble(0).
ScamblerOff:thescramblerfieldOFF(1)orON(0).
Cont.
Tx:thewavetransmissioniscontinuous(1)ornot(0).
Power:thepowerindbatwhichthewavetransmissionshouldhappen(0-7).
Ssid:thessidofthenetworkcreatedforthewavetransmission.
Example:AT+RFWAVETXSTART=1,4,2,1,1,1,3,aaa-(modulated)AT+RFWAVETXSTART=0,4,3,0,1,1,3,bbb--(un-modulated)4.
11.
4FrameTransmission/ReceptionStopThecommandtostopanyoftheRFtesttransmissions/receptionsis:AT+RFSTOPUponexecutionofthiscommandtheadaptorstopsanyoftheframetransmission/receptionRFtests.
Thiscommandsendsthestatusinformationofthereceivedasynchronousframestotheserialinterfaceotherthanthenormalcommandresponseifthiscommandissuedfortheasynchronousframereceptionstop.
Example:AT+RFSTOP(ifthiscommandissuedafterAT+RFRXSTART,thenitsendsthefollowinginformationtotheserialinterface)Totalframesreceived=xxxxCorrectframesreceived=xxxxIncorrectframesreceived=xxxFCSErrorframesreceived=xxxIP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE44OF494.
12Miscellaneous4.
12.
1EnhancedAsynchronousNotificationIP2WiFiAdaptersupportsanenhancedasynchronousnotificationmethod.
Thecommandtoenable/disablethisfeatureisAT+ASYNCMSGFMT=nnis0–Disablethisfeature1–EnablethisfeatureThiscommandreturnsstandardcommandresponse(section4)totheserialinterface.
Enablingthisfeatureresultswithallasynchronousmessagesgoingtotheserialinterfacewithaheader.
AlsoduringtheseasynchronousmessagetransferIP2WiFiadaptermakethegpio19high.
Theasynchronousmessageformatisasshownbelow:TYPE–Typeofmessageandthelengthisonebyte.
Forasynchronousmessage,itis0x41(AsciivalueA)SUBTYPE–Messagesubtypeandthelengthofthisfieldisonebyte.
Normallythisfieldcontainstheasciivalueofthesubtypemessage.
Refersection3.
6.
4forsubtypevalues.
LENGTH–Lengthoftheasynchronousmessageinhex.
Thisfieldlengthis2bytes.
MESSAGE–Exactasynchronousmessageasstring.
Refersection3.
7.
4forallenhancedasynchronousmessages.
4.
12.
2NodeStartUpHandlingForpropersynchronizationbetweenhostmicrocontroller(MCU)andIP2WiFiadapter,thefollowingstepsmustbefollowed:IncaseofUARTinterface,duringbootuphostMCUshallsenddummy'AT'commandandwaitforresponsefromtheIP2WiFiadapter.
ThehostMCUmustcontinuouslysendthesedummy'AT'commandstill'OK'responseisreceivedfromIP2WiFiadapter.
IncaseofSPIinterface,duringbootuphostMCUmustcheckthestatusofhostwake-upsignal(GPIO#28ofIP2WiFiadapter).
Oncehostwake-upsignalisHIGH,thenhostMCUcansendthe'AT'commands.
IfforsomereasonhostMCUgettingreset,thenIP2WiFiadaptermustbeexplicitlyresetusingEXT_RESETpinandtheMCUshouldwaitforthewake-upsignal(GPIO#28)becomehighincaseofSPIinterface.
Howeverifresetprovisionisnotavailable,thenhostMCUmustcontinuouslysenddummy'AT'commandstill'OK'responseisreceivedfromIP2WiFiadapter.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE45OF494.
12.
3SPIinterfacehandlingInthecaseofSPIinterface,theGS101XnodeactsasslaveandwillcommunicatetomasterSPIcontroller.
Bydefault,SPIinterfacesupportsMotorolaprotocolwithclockpolarity0andclockphase0.
FormoredetailedspecificationofSPIframeformatandtimingcharacteristicsreferGS1011datasheet.
SinceSPIdatatransferworksinfullduplexmode,itsrequiredtomakeuseofspecialoctettoindicateidledata.
SimilarlyifhostMCUissendingdataathigherrateflowcontrolmechanismisrequired.
Inorderdifferentiatethesespecialcontrolcodes(suchasidlepattern,flowcontrolcodesandothercontroloctets)fromuserdata,bytestuffingmechanismisincorporated.
SPItransmitdatahandlingprocedure:TheSPIdatatransferlayermakesuseofanoctet(orbyte)stuffingprocedure.
TheControlEscapeoctetisdefinedasbinary11111011(hexadecimal0xFB),mostsignificantbitfirst.
EachspecialcontrolpatternisreplacedbyatwooctetsequencesconsistingoftheControlEscapeoctetfollowedbytheoriginaloctetexclusive-or'd(XOR)withhexadecimal0x20.
ReceivingimplementationsmustcorrectlyprocessallControlEscapesequences.
Escapeddataistransmittedonthelinkasfollows:PatternEncodedasDescription0xFD0xFB0xDDFlowcontrolXON0xFA0xFB0xDAFlowcontrolXOFF0x000xFB0x20Inactivelinkdetection0xFB0xFB0xDBControlESCAPE0xF50xFB0xD5IDLEcharacter0xFF0xFB0xDFInactivelinkdetection0xF30xFB0xD3SPIlinkreadyindicationOnededicatedGPIOsignal(GS_SPI_HOST_WAKEUP:GPIO#28)isavailablefordatareadyindicationsfromSlaveGS1011nodetoMasterHostcontroller.
ThisGS_SPI_HOST_WAKEUPsignalisassertedhighduringvaliddatatransmissionperiod,sothatthehost(masterSPI)startspullingoutdatabygivingSPIclockandGS_SPI_HOST_WAKEUPsignalisde-assertedoncetransmissioniscompleted.
MasterhostcontrollermustprovideclockaslongasGS_SPI_HOST_WAKEUPsignalisactive.
Specialcharacter(GS_SPI_IDLE)willbetransmittedduringidleperiod(ifthereisnomoredatatotransmit)andmustbedroppedatthereceivingHost.
SPIreceivedatahandlingprocedure:Sincebytestuffingisused,eachControlEscapeoctetmustberemovedandthenextimmediateoctetisexclusive-or'd(XOR)withhexadecimal0x20.
Ifreceivedbufferhasreachedtheupperwatermark,thenXOFFcharacterwillbesentoutinformingthehosttostoptransmittingactualdata.
AfterreceivingXOFFcharacterhostmuststoptransmittingactualdataandcansendIDLEbytes,untiltheXONisreceived.
OncethehostreceivesXON,thenitmayresumethevaliddatatransmissions.
SpecialcontrolbyteIDLEwillbedroppedatreceiver.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE46OF494.
12.
4PinconnectionforSPIInterfaceHostMCUIP2WiFiAdapterRemarksMSPI_DOUTSSPI_DINMSPI_DINSSPI_DOUTMSPI_SSSSPI_SSMSPI_CLKSSPI_CLKGPIOGPIO#28Hostwake-upsignalGroundGround4.
12.
5FactoryDefaultsTheIP2WiFiadaptorstoresfactorydefaultstoitsflash.
CurrentlysupportingonlytheMACaddressasfactorydefaultone.
IfthefactorydefaultMACaddresslocationcontainsavalidMACaddressthentheIP2WifiadaptorusesthisasitsMACaddressotherwiseitusethedefaultfactoryMACIDasitsMACaddress.
Thefactorydefaultlocationstartsat122KbytesofsecondapplicationflashandtheIP2WiFistoresthefactorydefaultinthefollowingformat:Checksum:thesimplebytewisexorofbothlengthandMACaddressLength:thelengthinbytesofMACaddressandlength(hereitis7)Macaddress:theMACaddressTheusercanoverridethefactorydefaultmacaddressbyusingtheATcommandsmentionedinsection4.
7.
1.
4.
12.
6FirmwareUpgradeThecommandtoupgradethefirmwareisAT+FWUP=,,,,,,Thiscommandstartsthefirmwareupgradeprocedureoverthewirelesslink.
SrvIpistheIPaddressofthefirmwareupgradeserver;SrvPortistheserverportnumbertobeusedforfirmwareupgrade;Macaddress(6byte)Length(1byte)Checksum(1byte)IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE47OF49SrcPortistheadapterportnumbertobeusedforfirmwareupgrade.
Retryisthenumberoftimesthenodewillrepeatthefirmwareupgradeattemptiffailuresareencountered.
Thedefaultvalueis10andtheretrycountrangesfrom0to0xffffffff.
Whenavalidcommandhasbeenreceived,theadapterreturnsthemessage:Firmwareupgradeisgoingon,Pleasewait.
.
.
.
followedwiththestatusmessageOKor0,appliesonlytothevalidityofthecommand.
Afterattemptingtoupgradethefirmware,thenodesendsanadditionalmessagedescribingtheresultoftheactualfirmwareupgradeattempt.
Afterasuccessfulfirmwareupgrade,theAdapterwillresetandbootupusingtheupdatedfirmwareandissuethemessageAPPReset-FW-UP-FAILURE.
Ifthefirmwareupgradeattemptfailedaftersuccessfulupgradeofoneflashimage(flash0),theAdapterwillresetandbootup,issuethemessageAPPReset-FW-UP-RECOVERY,associatebacktotheneworkwithprevioussettingsandtrytoupgradethefirmwareagain.
Theretrycountdecideshowmanytimesthiscanbedone.
Ifthenodeisnotassociated,theadapterreturnsERRORor1,basedonverbosesettings.
4.
12.
7SetSystemTimeThecommandtosettheadaptorsystemtimeisAT+SETTIME=,Uponexecutionofthiscommandtheadaptorsetitssystemtimetothetimespecifiedastheparametersandreturnsthestandardcommandresponse.
4.
12.
8GetSystemTimeThecommandtogetthecurrentsystemisAT+GETTIME=Uponreceptionofthiscommandtheadaptorsendsthecurrentsystemtimeinmillisecondssinceepoch(1970)followedbythestandardcommandresponsetotheserialinterface.
Thetimeformatcomesontheserialinterfaceasfollows:"CurrentTimeinmsecsinceepoch=xxxxxxx"4.
12.
9GPIOOutHIGH/LOWThecommandtoset/reset(high/low)agpiopinisAT+DGPIO=,ThiscommandsetstheGpio'GPIO-NO'pinleveltohighorlowaspertheSET/RESETparameter.
Note:OnlytheGpioPinsthatarenotmixedwiththeanyusedIOs(likeUART/SPI,etc.
)canbesethigh/lowwiththiscommand.
ThesupportedGpiosandthecorrespondingnumbersare:Gpio10:10Gpio11:11IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE48OF49Gpio30:30Gpio31:314.
12.
10ErrorCountsThecommandtogettheerrorcountstatisticsisAT+ERRCOUNT=Thiscommandreturnserrorcountinformationtotheserialhostinterfacefollowedbythestandardcommandresponse(section4).
TheerrorcountsincludesWatchdogresetcountsSoftwareresetcountsWlanabort/assertcounts4.
12.
11VersionThecommandtooutputthecurrentversioninformationisAT+VER=Thecommandreturnsversioninformationfollowedbythestandardcommandresponse(section4)totheserialhost:IP-to-Wi-Fiversion;GainSpanEmbeddedPlatformSoftwareversion;WLANfirmwareversion.
IP-TO-WIFIADAPTERAPPLICATIONPROGRAMMINGGUIDE1PRELIMINARYPAGE49OF495ReferencesGS1011Ultra-Low-PowerWirelessSystem-On-ChipDatasheetGS1011-DS-ABGainSpanCorporation,www.
gainspan.
comGS1011MModuleDataSheetGS1011M-DSIEEEStandardforInformationTechnology-Telecommunicationsandinformationexchangebetweensystems-LocalandmetropolitanareanetworksSpecificrequirementsPart11:WirelessLANMediumAccessControl(MAC)andPhysicalLayer(PHY)Specifications,802.
11-2007IEEE,www.
ieee.
orgV.
250,SerialasynchronousautomaticdialingandcontrolV.
251,ProcedureforDTE-controlledcallnegotiationInternationalTelecommunicationsUnion,www.
itu.
intCommunicationsNetworksA.
Leon-GarciaandI.
Widjaja,McGraw-Hill2000,p.
582GainSpanCorporation,www.
gainspan.
com

RAKsmart 2021新年新增韩国服务器及香港美国日本VPS半价

RAKsmart 商家我们肯定不算陌生,目前主要的营销客户群肯定是我们。于是在去年的时候有新增很多很多的机房,比如也有测试过的日本、香港、美国机房,这不今年有新增韩国机房(记得去年是不是也有增加过)。且如果没有记错的话,之前VPS主机也有一次磁盘故障的问题。 这不今天有看到商家新增韩国服务器产品,当然目前我还不清楚商家韩国服务器的线路和速度情况,后面我搞一台测试机进行...

DiyVM:50元/月起-双核,2G内存,50G硬盘,香港/日本/洛杉矶机房

DiyVM是一家比较低调的国人主机商,成立于2009年,提供VPS主机和独立服务器租用等产品,其中VPS基于XEN(HVM)架构,数据中心包括香港沙田、美国洛杉矶和日本大阪等,CN2或者直连线路,支持异地备份与自定义镜像,可提供内网IP。本月商家最高提供5折优惠码,优惠后香港沙田CN2线路VPS最低2GB内存套餐每月仅50元起。香港(CN2)VPSCPU:2cores内存:2GB硬盘:50GB/R...

乐凝网络支持24小时无理由退款,香港HKBN/美国CERA云服务器,低至9.88元/月起

乐凝网络怎么样?乐凝网络是一家新兴的云服务器商家,目前主要提供香港CN2 GIA、美国CUVIP、美国CERA、日本东京CN2等云服务器及云挂机宝等服务。乐凝网络提供比同行更多的售后服务,让您在使用过程中更加省心,使用零云服务器,可免费享受超过50项运维服务,1分钟内极速响应,平均20分钟内解决运维问题,助您无忧上云。目前,香港HKBN/美国cera云服务器,低至9.88元/月起,支持24小时无理...

电脑ip查询为你推荐
setOwnerjavaflashfxpflashfxp怎么用?重庆电信断网为什么电信宽带突然断网了filezillaserver如何使用filezilla servercuteftpcuteFTP的使用方法?重庆网站制作重庆网站制作,哪家公司服务,价格都比较好?sns网站有哪些有趣的SNS网站有哪些客服电话各银行的客服电话是多少?2828商机网千元能办厂?28商机网是真的吗?12306.com注册12306邮箱地址怎么写
ip查域名 浙江vps 域名抢注工具 老左 美国主机评测 香港vps99idc jsp主机 国内永久免费云服务器 免费名片模板 parseerror 网站被封 adroit tna官网 天翼云盘 免费dns解析 电信主机 上海服务器 Updog 怎么建立邮箱 便宜空间 更多