AcSiP Technology A16060H 802.11b/g/n IoT Module User Manual AI6060H x

AcSiP Technology Corporation 802.11b/g/n IoT Module AI6060H x

User Manual

 AI60A060H AnIOTSH Use-1- Solutioner MaCompaanual Copyrightany ht@2016 AcSiP
ReRev   evision Hvision DV.1    AI60History Date 160308 060HAuthor   PW    H Use-2- DescriptiNew Cre  er Maion ate anual Copyrightht@2016 AcSiP
Co1. 2. 3. 4. 5. 6. 7. 8. 9. 10.  11.               ontentsIntroduc Start AI6 AT comm API Des Network SPI Flash Smart_L OTA Gu FTP dow  Coding FFederal CAI60: tion………6060H devmand Desscription…k Programmh API……Link Guideuide………wnload LinFlowchartCommuni060H……………velopmentcription………………ming…………………e………………………nk ………t …………cation CoH Use-3- …………t…………………………………………………………………………..………………………………………ommissioner Ma…………………………………………………………………………..…………………………………………………n Interferenanual Copyright……………………………….………….….………….….……….…….…….…….………………………………nce Statemht@2016 A………4 ……...5 ….....11 ….…..21 .……30 …...…34 ………37 ………39 ……..41 …….43 ment..47 cSiP
1. IntroduAcSip Wi-Fsingle IOT In this docuenvironmen                AI60uction: Fi IOT AI6Wi-Fi chip ument, we wnt 060H6060H modincludes Wwill focus onH Use-4- dule is dediWi-Fi driver, n how to iner Maicated desigEmbeddednstall the proanual Copyrightgned for IOOS and TCoper Acsip Iht@2016 AOT product. CP/IP stack.IOT developcSiP The  ping
2. 2TTIn(1(2(3Start A2.1 IDE The AI6060HThe developn order to u1)  DownloPlease rhttps://mare_pla 2)  PrepareUnzip tdevelop 3)  ExecuteExecutea VirtuaAI60AI6060HSetup H firmwareping environuse this virtuoad VMwarreference thmy.vmwareayer/6_0|PLAe VMware Vthe file “Insping environe Virtual Mae the VMwaal Machine”060HH devel is developenment also sual machinere Player 6he web page.com/web/vAYER-605|Virtual MachtantContikinment that Vachine are Player fr” on VMwarH Use-5- lopmened under Ubshipped togee, please dowe for downlovmware/free|product_dohine i2.7-OEM”VMware Plfrom “Desktare Player.er Mant  buntu operaether with Vwnload VMoad the VMe#desktop_ownloads to local harayer will rutop” or “Proanual Copyrightation systemVMware VirMware playeMware Playeend_user_crd drive. Thiun with. ogram files”ht@2016 Am.  rtual Machier and setuper computing/vis is the ”. Select “OcSiP ine. . vmwOpen
 (4(5      2(14)  Open th  “Instan  5)  Double    2.2 F/W1) Into UbuUbuntu eAI60he file foldent_Contiki_ click the viW build untu developenvironmen060Her and choos_Ubuntu_12irtual machiping environnt. H Use-6- se the virtua2.04_32-bitine name “Inment. Typer Maal machine p.vmx” InstantConte “user” foranual Copyrightproject file   iki2.7-Workr the passwoht@2016 Aking” ord to get incSiP  nto
(2    (3 2)  Press “Plocated    3)  ExecuteUse “mrebuild AI60Places” iconat “contiki-e the “Termmake clean”the exampl060Hn to have a l-work”   minal” icon o” to clean uples project.H Use-7- look for theon the Ubunp the compier Mae developmentu Desktopler environmanual Copyrightent folders wp. ment and “mht@2016 Awhich is   make” to cSiP
   (44)  Get a *.AI60.bin file wh060Hhich is the FH Use-8- F/W for IoT er Mamodule  anual Copyright         ht@2016 AcSiP
     (1      (2 2.3  Up1)  Connec   2) Open tooAI60pdate F/Wct board andol then upda060HW  d execute F/ate  “ ssv60H Use-9- /W upgrade 060-main.ber Matool   bin ”,   anual Copyrightht@2016 A cSiP
(3   3) Press boaAI60ard RESET060H# button H Use-10- er Maanual Copyright ht@2016 A cSiP
                AI60060HH Use-11- er Maanual Copyright  ht@2016 AcSiP
2(1(22.4 Burn1)  Open W2)  -f: file p  -f , -c is ex:‐f          AI60n in commWindows  “path , -b: Bas needed  ,fD:\ssv606060Hmand line“Terminal”aud-rate , -c    60_burn\sH Use-12- e   and run ssvc: port ssv6060‐mer Mav6060_bumain.bin anual Copyrightrn.exe ht@2016 AcSiP
3    AT com 3.1  systeDescriptcommanReturn3.2  Get DescriptParametReturn3.3  Get DescriptParametReturn3.4  Get DescriptParametReturn3.5  Set nDescriptParametReturnAI60mmandem reboot ion AT+REndnonennoneFirmware Vion AT+VEters nonen+VERSManufactuion AT+MFters nonen+MF_Inetwork coion AT+GEters Nonen +GET_dhcp,IPIfdhcp+GET_Ifdhcp+GET_123456network conionAT+SETters<dhcp><IP>:xx<Subm<GatewnAT+SETAT+SETAT+SET060Hd DescrBOOTVersionRSION=?ION:SSV6060ure informatF_INFO=?NFOAT+VnfigurationT_CONFIG=?CONFIG=wifP,Submask,Gp=1CONFIG=0,7p=0CONFIG=0,7678,8,0,192.nfigurationT_IFCONFIG=>:1:Auto,0:xx.xxx.xxx.xxmask>:xxx.xxway>:xxx.xxxT_IFCONFIGT_IFCONFIG=T_IFCONFIG=H Use-13- ription0.Z0.799.0tion  ERSION=OK?fi_mode,APGateway7298A,123457298A,.168.55.243,=<dhcp>,<:manualxx(ifDhcp=0xx.xxx.xxx(ifx.xxx.xxx(ifG=OK=0,192.168.5=1er Ma_SSID,key,k5678,8,1,0.0.255.255.255IP>,<Subma0)Dhcp=0)Dhcp=0)55.243,255.2anual Copyrightkeynumber,.0.0,0.0.0.0,05.0,192.168.5ask>,<Gatew255.255.0,19ht@2016 A0.0.0.055.1way>92.168.55.1cSiP
3.6  Set WDescriptParametReturn3.7  ScanDescriptParametReturn3.8  Wi_DescriptParametReturn3.9  Wi_DescriptParametReturn3.10  ShoDescriptParametReturnAI60Wi_Fi confiion AT+SETters<mode<AP_SS<Key>nAT+SETAT+SETnningion AT+SCAters Nonen+SCAND‐Link_for.inteWinnieAT+SCA_Fi AP connion AT+WIters NonenAT+WIIfdhcpGotIPGotneGotDNGotde_Fi AP Discoion AT+WIters NonenAT+WIow connect ion AT+SHters Nonen[0]729HT‐MM060HigurationT_WIFICONFe>:0:STA‐moSID>:APnam:APpasswoT_WIFICONFT_WIFICONFAN=?:7298A,SSV_DIR‐Jay,APerchannel.c8e_NB‐PC,EnGAN=OKectionFICONNECTFICONNECT=p=1address192etmask255.2NSserver192efaultrouteronnectionFIDISCONNEFIDISCONNEAPOWCONNEC8A,ch:1,rssMSGIMCS7H Use-14- FIG=<mode>odemeordFIG=OKFIG=0,7298AV‐AP5_2.4G,QPET,test,OO8,Eric_Fw,SSGenius_wpa=OK2.168.43.16255.255.02.168.43.1192.168.43.ECTECT=OKCTAPsi:‐29dBm,er Ma>,<AP_SSID>,88888888QA.DIR524,SX,for.interchSV_AP2,icom2aes,.1rssiLevel:4,anual Copyright>,<Key>SSV_AP2,TPhannel.wr84mm‐softap‐0security_typht@2016 AP‐LINK_45FE545n,0023456789pe=WPA2/AcSiP 5E,16,AES,
3.11  ShoDescriptParametReturn3.12  TCDescriptParametReturn3.13  TCDescriptParametReturn3.14  TCDescriptParametReturnAI60ow All APion AT+SHters Nonen[0]729[1]AP5WPAW[2]QA.OPEN/[3]D‐LiOPEN/CP connection AT+TCters IP:xxxPORT:nsocketCP Sendion AT+TCters socketdata:snAT+TCCP Disconneion AT+TCters NonenAT+TCssv606ssv606AT+TC060HOWALLAP8Ach:1,r5_2.4Gch:1,rWPA2/AESDIR524ch:1,r/NONEnk_DIR‐Jaych:2,r/NONEPCONNECT=x.xxx.xxx.xxx,xxxx,ex:200number:crPSEND=<socnumber:Usstring,ex:123PSEND=OKectPDISCONNECPDISCONNEC60>:AT+TCPD60>:socked:0PDISCONNECH Use-15- rssi:‐26dBmrssi:‐42dBmrssi:‐47dBmrssi:‐80dBm=<IP>,<PORT>,ex:192.168.00reatesocket:cketnumberseTCPCONN345678CT=<socket>CT=OKDISCONNECT0closedCT=OKer Mam,rssiLevel:4m,rssiLevel:4m,rssiLevel:4m,rssiLevel:2>112.10:0>,<data>NECTtogets>T=0anual Copyright4,security_ty4,security_ty4,security_ty2,security_tyocketnumbeht@2016 Aype=WPA2ype=ype=ype=ercSiP /AES
3.15  TCDescriptParametReturn3.16  CleDescriptParametReturn3.17  UDDescriptParametReturn3.18  UDDescriptParametReturn3.19  CloDescriptParametReturnAI60CP SERVERion AT+TCters PORT:nAT+TCssv606AT+TCssv606ean TCP SEion AT+TCters PORT:nAT+TCDP Create  ion AT+UDters PORT:nSocketssv606createAT+UDDP Sendion AT+UDters<socke<Client<port><Data>nNoneAT+UDssv606ose UDPion AT+UDters <sockenAT+UDssv606AT+UD060HR PLISTEN=<POnumber;exPLISTEN=OK60>:AT+TCPLPLISTEN=OK60>:newconERVER  PUNLISTEN=number;exPUNLISTEN=DPCREATE=<number;extnumber:cr60>:AT+UDPCsocket:12DPCREATE=ODPSEND=<socet>:UseUDPtIP>:xxx.xxx>:portnumb>:stringDPSEND=12,160>:UDPsockDPCLOSE=<set>:UseUDPDPCLOSE=OK60>:AT+UDPCDPCLOSE=OKH Use-16- ORT>x:2000KLISTEN=2000Knectedtolis=<PORT>x:2000=OKPORT>x:2000reatesocketCREATE=200OKcket>,<ClienPCREATEtogx.xxx.xxx;exber192.168.43.2ked:12recvdocket>PCREATEtogKCLOSE=12Ker Mastenport(200:1200tIP>,<port>,getsocketn:192.168.123,11111,asddata:fgshfshfgetsocketnanual Copyright00),socket:0,<Data>umber12.10dfghfhfrom192.1umberht@2016 A0168.43.23:61cSiP 1148
3.20  GPDescriptParametReturn3.21  GPDescriptParametReturn3.22  GPDescriptParametReturn3.23  PWDescriptParametReturn3.24  SMDescriptParametReturnAI60PIO Settingion AT+SETters <id>:G<modenAT+SETssv606PIO Write  ion AT+WRters <id>:G<valuenAT+WRssv606PIO Readion AT+REAters <NumbnOn:1;ssv606+GPIOWM settingion AT+SETters<id>:G<Enabl<Cyclenssv606+OKMARTLINKmion AT+ENters<type>nNoneNeedt060HT_GPIO=<id>GPIOID.e>:0:input;T_GPIO=OK60>:AT+SET_RITE_GPIO=<GPIOID.>:0:low;1:hRITE_GPIO=O60>:AT+WRITAD_GPIO=<Nber>Off:060>:AT+READ:1T_PWM=<idPIOID=5(dle>:0,1>:0~1060>:AT+SET_mode  ABLE_SMAR>:0:NOSmtorebootH Use-17- >,<mode>1:output._GPIO=2,1<id>,<value>high.OKTE_GPIO=2,1Number>D_GPIO=3>,<Enable>,<defaultGPIO_PWM=5,1,0RTREBOOT=<artLink1:ICOMM2:WECHAT3:USERer Ma>1<Cycle>8)<type>SmartLinkTanual Copyrightht@2016 AcSiP
3.25  APDescriptParametReturn3.26  EXDescriptParametReturn3.27  SeDescriptParametReturn3.28  StaDescriptParametReturn3.29  SeDescriptParametReturn3.30  WDescriptParametReturnAI60P mode  ion AT+APtersNonen[At_APXIT AP modion AT+APters Nonen[At_APt AP SSIDion AT+SETters <namen<gconf<gconfssv606[At_SE<gconf<gconfart RF  ion AT+RAters <rangenNoneAT+RAt RF CHANion AT+RAters <rangenNoneAT+RAWIFI PACKEion AT+RAters <rangenNoneAT+RA060HP]:+++de_EXITP_EXIT]:+++T_AP_SSID=<e>:SSIDfig_set_softafig_set_softa60>:AT+SET_T_AP_SSID]fig_set_softafig_set_softaADIO_RF_STAe>=0ADIO_RF_STANNELADIO_CHANNe>=1~13ADIO_CHANNET Format ADIO_RF_RATe>:0~30ADIO_RF_RATH Use-18- +<name>ap_ssid>newap_ssid>i_co_AP_SSID=AB:+++ap_ssid>newap_ssid>i_coART=<range>ART=0NEL=<range>NEL=12         TE=<range>TE=22er Maw_softap_ssionfig.softap_BCw_softap_ssionfig.softap_>>     anual Copyrightd=ABC_ssid=ABCd=ABC_ssid=ABCht@2016 AcSiP
3.31  G/DescriptParametReturn3.32  B MDescriptParametReturn3.33  ICDescriptParametReturn3.34  StDescriptParametReturn3.35  RFDescriptParametReturn3.36  RFDescriptParametReturn  AI60/N Mode Gion AT+RAters <rangenNoneAT+RAMode Gainion AT+RAters <rangenNoneAT+RA Temp.ion AT+RAters NonenTemp:°Ex:AT+top RFion AT+RAters NonenNoneF TCSRion AT+RAters <on/ofnNone frequency ion AT+RAters <pran<nrannNone060HainADIO_RF_GNe>:5~15ADIO_RF_GNADIO_RF_BGAe>:5~15ADIO_RF_BGAADIO_RF_REA°C+RADIO_RF_ADIO_RF_STOADIO_RF_ENAff>:0:Off;1:OFFSETADIO_RF_FREge>:1~16ge>:1~16H Use-19- GAIN=<rangGAIN=7AIN=<rangeAIN=2AD_TEMPCS=_READ_TEMPOPABLE_TCSR=:OnEQOFFSET=<er Mage>>=?PCS=28<on/off>prange>,<nanual Copyrightrange>ht@2016 AcSiP
3.37  DuDescriptParametReturn3.38  RFDescriptParametReturn3.39  RFDescriptParametReturn3.40  RFDescriptParametReturn3.41  RFDescriptParametReturnAI60ump all RF Oion AT+RAters Nonen列出AEx:======channeBpoweG/NpoFreq.OLDO=PA1=PA2=PA3=Bound====== LDOion AT+RAters <nran<mrannNone_PA1 TUNion AT+RAters <rangenNone_PA2 TUNion AT+RAters <rangenNone_PA3 TUNion AT+RAters <rangenNone060HOFFSETADIO_RF_DUALLRF補償值==========el=1er=ower=Offset=2,24b661c3d5e84ff1457d79fcccce27ary===========ADIO_RF_LDOge>:1~8nge>:5~8INGADIO_RF_PA1e>:6~12INGADIO_RF_PA2e>:1~7INGADIO_RF_PA3e>:7~14H Use-20- MP值11192f0,0O=<nrange>1=<range>2=<range>3=<range>er Ma>,<mrange>anual Copyrightht@2016 AcSiP
3.42  RFDescriptParametReturn3.43  RFDescriptParametReturn              AI60_IQ PHASEion AT+RAters <rangenNone_IQ AMPion AT+RAters <rangenNone060HEADIO_RF_IQPe>:(‐7~7)ADIO_RF_IQAe>:(‐7~7)H Use-21- PHASE=<rangAMP=<rangeer Mage>>anual Copyrightht@2016 AcSiP
4.  API D4.1 TAGThe datnecessatypedef{  u8_t  char  u8_t  u8_t  u8_t  TAG u8_t  char  char  u8_t AP    u8_t  u8_t  uip_i uip_i uip_i u8_t  u8_t    uip_iconnect u16_  u8_t   u8_t  u8_t } TAG_CA AI60DescripG_CABRIOta structure ary informatf struct t_TA wifi_mod wifi_ssid[ wifi_ssid_ wifi_mac[ wifi_privG_SECURIT wifi_wepk wifi_wepk wifi_pmk wifi_chan dhcp_enab connect_mip4addr_t loip4addr_t neip4addr_t ga gateway_m gateway_mip4addr_t tion _t port;  // local_mac intoSmart debugLevABRIO_CON060Hption: O_CONFIGof TAG_Ction for the AG_CABRIe;   // [32]; // W_len; // T[6];   // Mvacy; TY wifi_sekeylen; // 5key[64]; // 4[32]; // 4nnel; // ble;   // mode; // 0ocal_ip_addet_mask; ateway_ip_mac[6]; mac_set; remote_ip_/ Remote IPc[6]; // MtLink; // Avel; NFIGURATH Use-22- GURATIONABRIO_COoperation oIO_CONFIG1: AP modeWiFi AP naThe length MAC addre  ecurity; 5, 13 40bit and 1040bit and 10WiFI chan1: DHCP En0: Client , 1dr; // IP add// Net ma_addr; // G// MAC _addr; // P port numbMAC addreActivate of TION er MaN data struONFIGURAof WiFi. GURATIONe, 0: STA-mame or STA of SSID ess of Wifi A04 bit 04 bit nel for scanable 0: Fix1: Server ress of locaask of localGateway IP aaddrsss of gRemote IPber for TCP/ess of local Smartlink panual Copyrightucture ATION is uN mode, IBSS, name AP nning or cox IP al host host address of logateway P addrss /UDP connehost process ht@2016 Aused to storeInfrastructuonnect to Wocal host for TCP/Uection cSiP e the ure WiFi UDP
4.2 ReboDescripThe cSyntax  void bss_mParame NoneReturn  NoneRemarkNone 4.3 CoreDescripThe This shSyntax  void bss_mParame NoneReturn  NoneRemarkNone 4.4 WiFDescripThe c Syntax:void bss_m Parame NoneAI60oot the firmption :   command w:   mgmt_reboeters : e Value : e k : e Library Iption :   command iould be call:   mgmt_init (eters : e Value : e k : Fi AP Scan ption:  command w:   mgmt_scan eters: e 060Hmware will reboot thot (void) Initialize initializes thled every tim(void)  will search th(void) H Use-23- the firmwarehe necessarme. the nearby Wer Mae of SSV60ry parameteWiFi Aps anual Copyright60. ers of 802.ht@2016 A11 core libcSiP rary.
 Returns The “Cabriocontinu Remark#defi// Thtyped{     } TATAG_AP_ 4.5 WiFDescrip The c Syntax  void bss_m ParameNone Returns None Remark WhilTAG_Cu8_t AI60s: return vo_ate_proceue to listen tk : ine MAX_Ae scanned odef struct t_u8_t    u8_t    u8_t    u8_t    AG_AP_INF_INFO ap_lFi AP Conneption :   command w:   mgmt_conneters : e s : e k : le happCABRIO_C wifi_mod060Hvalue willess” and calhe AT commAP_LIST of WiFi AP’_TAG_AP_Iname[3name_lmac[6];channelFO; list[MAX_Aection  will connectnect (void)pens to ONFIGURAe;   // H Use-24- l be senll the functmand and th100 // Ms informatioINFO 32]; len; ; l; AP_LIST];t the desiredo conneATION nee1: AP modeer Mand to thtion “At_Pahe result froMaximum nuon will be sd WiFi AP.ection, ed to be pre-e, 0: STA-manual Copyrighthe PROCEarserInd”. Tom 802.11 cumber of Wtore into “asome m-stored. Sucmode, IBSS, ht@2016 AESS_THREThis thread core library.WiFi AP storap_list”. member ch as … InfrastructucSiP EAD will  ed of ure
    char  u8_t  u8_t The returnand call the4.6 WiFDescripThe c Comma void bss_m ParameNone Returns NoneRemark The r“Cabrio_ate“MSG_ATE4.7 TCPDescripThe cSSV606 Comma Struc tcp_cuip_iuint1void  AI60 wifi_ssid[ wifi_ssid_ wifi_mac[n value wille function “AFi AP Disconption :   command wand :    mgmt_discoeters :   e s :   e k : return valuee_process” E_DISCONP Connectioption :   command w60 is conneand :   ct uip_conn connect ( ipaddr_t *ri16_t port, *appstate) 060H[32]; // W_len; // T[6];   // Mbe send to At_ParserInnnect  will disconnonnect (voide will be senand call theNNECT”. on will connectcted to a W* ipaddr, H Use-25- WiFi AP naThe length MAC addrethe PROCEnd” with menect the connd) nd to the PRe function “ts to remoteWiFi AP befoer Maame or STA of SSID ess of Wifi AESS_THREessage ID “Mnection of WROCESS_T“At_ParserIne IP’s TCP ore calling Tanual Copyrightname AP AD “CabrioMSG_ATE_WiFi AP. HREAD nd” with meport. PleaseTCP connectht@2016 Ao_ate_proce_CONNECessage ID e make suretion. cSiP ess” CT”. e the
Parameripad port  appst Returns uip_c Remark 4.8 TCPDescripThe c Commaunsigtcpclstruc Parame*s    Returns1 : fo0 : fa Remark 4.9 GPIDescripThe c Commavoid pinMAI60eters :   ddr The remoteThe remotetate NULL for ts :   conn * will P Disconnecption :   command wand :   gned char ient_close (t tcpclient_eters :   The handles :   or the succeail of diconnO setting  ption :   command isand :    Mode( 060He IP addresse IP’s port nthis field be return foction will disconn( state *s) e of current Tss of disconnection s used for seH Use-26- s for TCP conumber for Tor the handlnect the connTCP connecnnection etting the ater Maonnection TCP connecle of TCP conection of rction. ttribute of Ganual Copyrightction onnection. emote IP’s TGPIO. ht@2016 ATCP port.   cSiP
PIN_PIN_ Parameid           mode      ReturnsNone Remark 4.10 GPDescripThe c Commavoid AI60_ID id,   _MODE moeters :   typedef enu{  PIN_1 PIN_1 PIN_1 PIN_1 PIN_3 PIN_3 PIN_3 PIN_3} PIN_ID; e typedef enu{  INPUT INPUT OUTP OUTP} PIN_MOs :   e k : PIO Write ption :   command wand :    060Hode)  um t_PIN_I11    = 013, 15, 16, 30, 31, 33, 34 um t_PIN_MT    = 0T_PULL,PUT, PUT_DRIVIDE; will send theH Use-27- ID 0, MODE 0, INGUP e data to GPer MaPIO. anual Copyrightht@2016 AcSiP
digitaPIN_u32 d Parameid           data   ReturnsNone Remark  4.11 GPDescripRead Commau32 digitaPIN_ ParameAI60alWrite( _ID id,   data) eters :   typedef enu{  PIN_1 PIN_1 PIN_1 PIN_1 PIN_3 PIN_3 PIN_3 PIN_3} PIN_ID; The data is s :   e k : PIO Read  ption :   d data from and :    alRead( _ID id) eters :   060Hum t_PIN_I11    = 013, 15, 16, 30, 31, 33, 34 going sendGPIO.  H Use-28- ID 0, d to GPIO er Maanual Copyrightht@2016 AcSiP
 id            ReturnsReturRemark : 4.12 PWDescripCont Commaint  enablPIN_u8 duParame         AI60typedef enu{  PIN_1 PIN_1 PIN_1 PIN_1 PIN_3 PIN_3 PIN_3 PIN_3} PIN_ID; s :   rn data valuWM delay  ption :   trol PWM band: lePWM( _ID id,   utycycle) eters : id  typedef enu{  PIN_1 PIN_1 PIN_1 PIN_1 PIN_3 PIN_3 PIN_3060Hum t_PIN_I11    = 013, 15, 16, 30, 31, 33, 34 ue in 32-bit ehavior.. um t_PIN_I11    = 013, 15, 16, 30, 31, 33, H Use-29- ID 0, data. ID 0, er Maanual Copyrightht@2016 AcSiP
   dutyc Returns0 : Su-1 : f Remark 4.13 DisDescripDisabCommavoid disabPIN_Parame          ReturnsNone RemarkAI60 PIN_3} PIN_ID; cycle Duty cycles :   uccess fail k : sable PWMption :   ble PWM fuand :    blePWM( _ID id) eters :   id  typedef enu{  PIN_1 PIN_1 PIN_1 PIN_1 PIN_3 PIN_3 PIN_3 PIN_3} PIN_ID; s :   e k : 060H34 . M unction. um t_PIN_I11    = 013, 15, 16, 30, 31, 33, 34 H Use-30- ID 0, er Maanual Copyrightht@2016 AcSiP
5.   typecrea}SOtype{}SOPRO{} Netw BecauseconfirmtconnectiwaiteveWecankedefenumSOCKET_CSOCKET_CSOCKET_SSOCKET_NSOCKET_Nated.CKETSTATE;edefstructNETSOCKEU16SOCKETSTCKETMSG;OCESS_THREPROCESS_SOCKETMwhile(1)PROCif(ev}}PROCESS_AI60ork prothisisnonbtheTCPcononcoming.ntPROCESSknowthismt_SOCKETSTCONNECTEDCLOSED,SENDACK,NEWDATA,NEWCONNE;t_SOCKETMET socket lport;TATEstatus;EAD(tcp_co_BEGIN();SGmsg;{CESS_WAIT_==PROCESmsg=*(SO//Doingthi_END();060HogrammblackIO.Wennection,seThereisasS_EVENT_MmessagecomTATE{D,ECTION, MSGt;onnect_proc_EVENT();S_EVENT_MOCKETMSG*ngsdependH Use-31- ming eneedtocrenddataiscsimpleexamMSGandthemefromwhTCPsockTCPconnThesendThereisnAnewccess,ev,datMSG){*)data;donwhicher Mareateaproccompletedompleshowbedatapointhichsocket,ketisconnenectioniscloddataprocenewdatacoonnectionfta)messageanual Copyrightcesstogetmorthereisnbelow.ProctertypeisSportandstected.osed.edureiscomoming.fromlisteninht@2016 AmessageannewdataorcessneedtoSOCKETMSGtatus.mpleted.ngportiscSiP ndroG.
 5.1  T‐     CallfunSOCKEThttpsoc&http_req//waitfPROCESmsg=*if(msg.sprgo}‐ SenddaCallfunBeforegbuffer.tcpsend//WaitfPROCESmsg=*if(msg.spr}else{prgo}‐ ReceiveWaitfoincominPROCESmsg=*AI60TCP clien CreateanctiontcpcoT_CONNECTck=tcpconnquest_proceforTCPconnSS_WAIT_EV*(SOCKETMstatus!=SOintf("TCPcootodissconnatatothepnctiontcpsegettheSOCd(httpsock,fordataistSS_WAIT_EV*(SOCKETMstatus==SOintf("TCPseintf("TCPseotodissconnedatafromrSOCKET_Nngdata.SS_WAIT_EV*(SOCKETM060Hnt prograTCPconneonnecttostaTEDmessagnect(&gNetess);nectedortiVENT_UNTISG*)data;OCKET_CONonnectfail!nect;peersidendtosendCKET_SENDAhttpstring,transmittedVENT_UNTISG*)data;OCKET_SENendsuccessendfail!Posnect;mpeersideNEWDATAmVENT_UNTISG*)data;H Use-32- rammingectionartTCPconge.tStatus.remimeout.IL(ev==PRONECTED){PostmessadatatopeeACKmessagstrlen(httporuip_timIL(ev==PRODACK){ful\n");stmessagemessagetheIL(ev==PROer Mag necttopeemote_ip_addOCESS_EVEagetype:%dersideandwge,pleasedpstring));eout.OCESS_EVEtype:%d\n"encallfunctOCESS_EVEanual Copyrightersideandndr,gNetStatNT_MSG);d\n",msg.stwaitforackdonotmodiNT_MSG);",msg.statutiontcprecvNT_MSG)ht@2016 Aneedwaitftus.port,tatus);knowledge.ifythedataus);vtogetcSiP for
TP\CPif(msg.srec}‐ ClosecoCallfuntcpcloseThereisasimPleasereferCabriocontPROCESS_TH  5.2  T‐  ListenCallfuntcpliste‐ AcceptWaitfofrommPROCESmsg=*if(msg.sgse}‐ AttachThenewdefaultprocessfunctiotcpattch‐ StoplisAI60status==SOcvlen=tcpronnectionnctiontcpcloe(httpsock)mpleexamptikisrc\examHREAD(httpTCP servnaTCPportnctiontcplisn(localport,anewconnrSOCKET_Nessage.SS_WAIT_EV*(SOCKETMstatus==SOerversock=anotherprowconnectiocallbackprsofthissocn.h(gserversostenaTCPp060HOCKET_NEWrecv(httpsocosetoclose;ple“HTTPremples\socke_request_pver progrttentolisten,&tcp_connnectionNEWCONNEVENT_UNTISG*)data;OCKET_NEW=msg.sockeocess.onwillusetocess.Ifweket,itcancock,&client_portH Use-33- WDATA){ck,buffer_ieconnectionequest”toset_proc\socprocess,ev,ramminntheTCPpnect_proceECTIONmesIL(ev==PROWCONNECTIt;thecallbackewantanotcallfunction_handle_prer Man,MAX_SENn.showhowtcket_proc.cdata)g ort.ss)ssageandgOCESS_EVEION){kprocessretherprocessntcpattachtrocess);anual CopyrightND_BUFFERtheTCPclieetthenewNT_MSG)gisterbytcstobethectoreplacetht@2016 AR);entworking.socketnumplistenascallbackthecallbackcSiP .mberk
Callfuntcpunlis  5.3  U‐   CreCallfungudpso‐ SenddaCallfunudpsen‐ ReceiveWaitfoincominPROCESmsg=*if(msg.srecv&peera}‐ ClosesoCallfunudpclos   AI60nctiontcpunsten(localpoUDP progeateaUDPsnctionudpcrck=udpcreatatothepnctionudpsedto(gudpsoedatafromrSOCKET_Nngdata.SS_WAIT_EV*(SOCKETMstatus==SOvlen=udpreaddr,&peerocketnctionudpclse(sock);060Hnlistentostoort);gramminsocketreatetocreeate(gNetStpeersideendtotoseock,pdata,smpeersideNEWDATAmVENT_UNTISG*)data;OCKET_NEWecvfrom(mport);losetocloseH Use-34- oplisteningng eateaUDPstatus.udpponddatatopstrlen(pdatamessagetheIL(ev==PROWDATA){msg.socket,besocket.er MagtheTCPposocket.ort,&udp_cpeerside.a),&remoteencallfunctOCESS_EVEbuffer_in,Manual Copyrightort.onnect_proe_ip_addr,rtionudprecNT_MSG)MAX_SEND_ht@2016 Aocess);rport)cvfromtoge_BUFFER,cSiP et
6. Funspi_spi_spi_spi_spi_ SPI F 6.1  S      6.2   S AP./ iDriv. / ic  6.3   Snction name_flash_init()_flash_read _flash_secto_flash_write_flash_final  AI60Flash APSPI FlashSPI FlasI layer: icomlib/inclver layer: comlib/incluSPI Flase D) CUdor_erase Ube Ucthize Dfl060HPI h API strsh directlude /flash_ude /drv_flash API inDescriptionCall driver inUse this to redestination.Use this api e erase as 0Use this api ache bufferhis API.   Data in flashlash by this User ApSPI FLASPI FlasH Use-35- ructuretory stru_api.h ash.h ntroductnitializationead flash dato erase sec0xffff-ffff into write datr. But bewarh driver’s 4kAPI. pplication ASH API sh Driver er Maucture tion n in this APIata into youctor (4KB) in whole sectta into spi flre,data wonkB cache buanual CopyrightI. r reserved min spi flash. tor. lash driver’s’t be writteruffer will beht@2016 Amemory  All data wis interal 4Krn into flashe written intcSiP ill KB h in to
  Fdrv_drv_drv_drv_drv_drvdrv_drv_drv_SPI Page 6.4   SFunction na_flash_init _flash_get__flash_get__flash_write_flash_waitv_flash_wait_flash_write_flash_secto_flash_page 6.5   Hcommand te program   AI60SPI Flasame _cache_addr_base_addr e_cmd t_spi_busy t_spi_statuse_enable or_erase e_program How SPtype ProcStep1Set upimple  In   RE  REStep2Step3know060Hsh Driver s_regsiterI Flash Dcedures 1:initializationp register to leementation in our implemenEG32(SPI_ADEG32(SPI_AD2:write comma3:trigger HW tw many bytes cH Use-36- r introduDescriptioTo setup spnow only s1).read sta2).read sta3).write en4).erase se5).page proGet start ain sram ranGet start a0x300-000When all cThis will trUse this fuUse this fuSPI flash nprogrammSince IOT only proviThis functiwould be “flash.  Driver mn et HW know tdrv_flash_intntation. I allocDDR_CMD_SDDR_DATAINand into au8spto send commcommand neeer Mauction n pi commandsetup followatus1 atus2 nable ector ogram ddress of 4Knge. ddress of sp00 command orriggr HW tounction to chunction to chneed to writming data intwon’t havede sector(4Kion is the m“Copy data make usethe exact sramt(): cate two (256+SRAM_ADDRN_SRAM_ADpi_cmd[0]. mand.It means ed to be sent oanual Copyrightd related infwing spi flasKB driver cpi flash. In cr data relateo send data heck if our heck if SPI e this commo spi flash. e large size fKB) level emajor functioto specific e of HW m address of sp+4) byte buffeR) = (unsignedDDR) = (unsigyou set up theut.  ht@2016 Aformation. Ish commancache buffercurrent tiramed informatiinto spi busHW busy. bus busy   mand on spiflash. In ouerase. on to write dSRAM” -> pi command. Yers. d int)(&au8spgned int)(&aue command lecSiP In our drived: r. It’s addresmisu systemion being ses. i bus first beur driver,we data. The flSPI bus->SYou can see thpi_cmd[0]); u8spi_data[0])ength,thus HWer,we ss is m,it’s etup. efore now ow SPI he ; W will
 SPI RearegiNotor th  command tad status 1 ister  6.6 Ete: Please behe System wAI60  Fotype ProStepSet imp  In  R   StepStepwillau8Exampleeware that wwill han 060Hr detail implemocedures p1:initializatioup register toplementation in our implemREG32(SPI_AREG32(SPI_p2:write commp3:trigger HWl know many 8spi_data bytee for usinwhen prograH Use-37- mentation,pleon o let HW knowin drv_flash_imentation. I alloADDR_CMD__ADDR_DATAmand into au8W to send combytes commane buffer. ng SPI Fam data intoer Maease see drv_flw the exact sraint(): ocate two (25_SRAM_ADDAIN_SRAM_8spi_cmd[0].mmand.It meannd need to be Flash APo spi flash. Ianual Copyrightlash_page_proam address of 6+4) byte bufDR) = (unsign_ADDR) = (unns you set up tsent out. AndPI Interrupt muht@2016 Aogram. fspi commandffers. ned int)(&au8snsigned int)(&the command d then read   dmust be disabcSiP d. You can seespi_cmd[0]);&au8spi_data[length,thus Hdata from bled e the 0]); HW
7.        Smart The APP(AI 6060H This APP AI6060H.and will seAPP is cap   7.1  In 7.2  O 7.3  T     TAI60t_Link iComm_tooH through smwill pass yo. As AI6060end successpable to initnstall “ ICOpen APP Tap “ smartThen get th060HGuideol.apk) provmartphone.our currentl0H receiveds message btialize multiCOM Smartlink” andhe IP & MH Use-38- vide a simplly connectedd the messagback to the Aiple AI6060rtLink.apk      d key-in SSMac er Male way for thd WiFi AP’sge, AI6060HAPP on sma0 H at the sak” and exeSID/Passw anual Copyrighthe first initis name and H can conneartphone. Byame time wiecute it: word ht@2016 Aialization ofpassword tect to WiFi Ay this scenawith few stepcSiP f to AP ario, ps.
7.4  C 7.5  C      7.6  W     AI60Console infControl LEWifiuart fu060HformationED on/off aunction: H Use-39- and PWMer MaM functionanual Copyright  ht@2016 AcSiP
8.  OTA 8.1 Ope   8.2 dow 8.3 Upd  AI60Guide en APP an wnload F/Wdate F/W P060Hnd choice F  W and updPass H Use-40- F/W &   Ddate to dut er MaDut t anual Copyright ht@2016 AcSiP
8.4 Con                   AI60nsole infor   060Hrmation H Use-41- er Ma anual Copyrightht@2016 A  cSiP
9. ftp主機埠號帳號密碼 FTP d://AI606機 =ftp2號 = 212號 = AI6碼 = bK             AI60downlo60H@ftp22.acsip.co21 6060H    KNNc79A060Hoad link2.acsip.com.tw       A  H Use-42- k com.tw:2er Ma121 anual Copyrightht@2016 AcSiP
10 0. Co 10.1 W      AI60ding FlWi_Fi Con060Hlowchannect flowH Use-43- art:  w: er Maanual Copyrightht@2016 AcSiP
     10.2      AI60TCP SER060HRVER @H Use-44- @ STA Mer MaMODE anual Copyright ht@2016 AcSiP
       10.3      AI60TCP CL060HLIENT @H Use-45- @ STA Mer MaMODE anual Copyrightht@2016 AcSiP
         10.4  AI60UDP @ 060HSTA MOH Use-46- ODE er Maanual Copyrightht@2016 A cSiP
11                1. Fed  Inte AI60deral Cerferen060HCommunnce StatH Use-47- nicationtementer Man Comm     anual Copyrightmission      ht@2016 An    cSiP   This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) This device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation.  This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules.  These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications.    However, there is no guarantee that interference will not occur in a particular installation.    If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one of the following measures:   Reorient or relocate the receiving antenna.  Increase the separation between the equipment and receiver.  Connect the equipment into an outlet on a circuit different from that to which the receiver is connected.  Consult the dealer or an experienced radio/TV technician for help.  FCC Caution:  Any changes or modifications not expressly approved by the party responsible for compliance could void the user's authority to operate this equipment.  This transmitter must not be co-located or operating in conjunction with any other antenna or transmitter.   Radiation Exposure Statement: This equipment complies with FCC radiation exposure limits set forth for an uncontrolled environment. This equipment should be installed and operated with minimum distance 20cm between the radiator & your body. This device is intended only for OEM integrators under the following conditions: 1) The antenna must be installed such that 20 cm is maintained between the antenna and users, and the maximum antenna gain allowed for use with this device is -2.5dBi     2) The transmitter module may not be co-located with any other transmitter or antenna. As long as 2 conditions above are met, further transmitter test will not be required. However, the OEM
           AI60060HH Use-48- er Maanual Copyrightht@2016 A cSiP integrator is still responsible for testing their end-product for any additional compliance requirements required with this module installed  IMPORTANT NOTE: In the event that these conditions can not be met (for example certain laptop configurations or co-location with another transmitter), then the FCC authorization is no longer considered valid and the FCC ID can not be used on the final product. In these circumstances, the OEM integrator will be responsible for re-evaluating the end product (including the transmitter) and obtaining a separate FCC authorization.  End Product Labeling This transmitter module is authorized only for use in device where the antenna may be installed such that 20 cm may be maintained between the antenna and users. The final end product must be labeled in a visible area with the following: “Contains FCC ID: 2ADWC-AI6060H”. The grantee's FCC ID can be used only when all FCC compliance requirements are met. Manual Information To the End User The OEM integrator has to be aware not to provide information to the end user regarding how to install or remove this RF module in the user’s manual of the end product which integrates this module. The end user manual shall include all required regulatory information/warning as show in this manual.  Figure 1 below details the standard product marking for all AcSiP Corp. products. Cross reference to the applicable line number and table for a full detail of all the variables. Figure 1 Standard Product Marking Diagram- TOP VIEW

Navigation menu