AI60 060H H Useer Maanual An A IOT SSolution Compa any -1- Copyright ht@2016 AcSiP
AI60 060H H Useer Maanual Reevision History H Revvision V.
AI60 060H H Useer Maanual Coontents: 1. Introduction……… …………… …………………… …………… ………4 2. Start AI66060H dev velopmentt………… …………… …………… ……...5 3. AT comm mand Description… …………… …………… …….…… ….....11 4. API Desscription… …………… …………… …………… …….….… ….…..21 5. Networkk Programm ming…… …………… …………… ……….…..……30 6. SPI Flashh API…… …………… …………… ………………….… …...…34 7. Smart_L Link Guidee………… …………....………… ….…….… ………37 8. OTA Guuide……… …………… …………… …………… ….……… ………39 9. FTP dow wnload Lin nk ……… …………… …………… …………… ……..41 10.
AI60 060H H Useer Maanual 1. Introduuction: AcSip Wi-F Fi IOT AI6 6060H moddule is dediicated desig gned for IO OT product. The single IOT Wi-Fi chip includes W Wi-Fi driver, Embedded OS and TC CP/IP stack.
AI60 060H H Useer Maanual 2. Start AI6060H A H devellopmen nt 22.1 IDE Setup T The AI6060H H firmware is developeed under Ub buntu operaation system m. T The developping environ nment also sshipped togeether with VMware V Virrtual Machiine. Inn order to use u this virtu ual machinee, please dow wnload VM Mware playeer and setup. (11) Downlooad VMwarre Player 6 Please reference r th he web pagee for downlo oad the VM Mware Playeer https://m my.vmware.
AI60 060H H Useer Maanual (44) Open thhe file foldeer and choosse the virtuaal machine project p file “Instannt_Contiki_ _Ubuntu_122.04_32-bit.vmx” (55) Double click the viirtual machiine name “IInstantContiki2.7-Workking” 22.2 F/W W build (11) Into Ubuuntu develop ping environnment. Type “user” forr the passwoord to get in nto Ubuntu environmen e nt.
AI60 060H H Useer Maanual (22) Press “P Places” icon n to have a llook for thee developmeent folders w which is located at “contiki--work” minal” icon oon the Ubun ntu Desktop p. (33) Executee the “Term Use “m make clean”” to clean upp the compiler environm ment and “m make” to rebuild the examplles project.
AI60 060H H Useer Maanual (44) Get a *..
AI60 060H H Useer Maanual 2.3 Uppdate F/W W (11) Connecct board and d execute F//W upgrade tool bin ”, (22) Open toool then updaate “ ssv60060-main.
AI60 060H H Useer Maanual (33) Press boaard RESET# button -10- Copyright ht@2016 AcSiP
AI60 060H H Useer Maanual -11- Copyright ht@2016 AcSiP
AI60 060H H Useer Maanual 22.4 Burnn in comm mand linee (11) Open Windows W “Terminal” “ and run ssv v6060_burn.exe (22) -f: file ppath , -b: Baaud-rate , -cc: port -f , -c iss needed , ex:‐ff D:\ssv606 60_burn\sssv6060‐m main.
AI60 060H H Useer Maanual 3 AT com mmand d Descrription 3.1 systeem reboot Description AT+REBOOT comman nd Return n none none 3.2 Get Firmware Version V Description AT+VERSION=? Parametters none Return n +VERSION:SSV60600.Z0.799.0 3.3 Get Manufactu ure informattion Description AT+MFF_INFO=? Parametters none Return n +MF_INFO 3.
AI60 060H H Useer Maanual 3.6 Set Wi_Fi W confiiguration Description AT+SET T_WIFICONFFIG= >, >, : 0: STA‐moode Parametters : AP nam me : AP passwoord Return n AT+SET T_WIFICONFFIG=OK AT+SET T_WIFICONFFIG=0,7298A,88888888 3.7 Scannning Description AT+SCA AN=? Parametters None +SCAN:7298A, SSV V‐AP5_2.4G, QA.DIR524, Q SSV_AP2, S TPP‐LINK_45FE5 5E, D‐Link_ _DIR‐Jay, APPET, test, OOX, for.interch hannel.wr8445n, Return n for.inte erchannel.
AI60 060H H Useer Maanual 3.11 Shoow All AP Description AT+SHOWALLAP Parametters None [0]7298A Return n 3.12 TC CP connect Description Parametters Return n 3.13 AT+TCPCONNECT==, > IP : xxxx.xxx.xxx.xxx,,ex:192.168.112.10 PORT : xxxx,ex:20000 socket number : crreate socket::0 TC CP Send Description Parametters Return n 3.14 ch: 1, rrssi: ‐ 26 dBm m, rssiLevel: 4, 4 security_tyype = WPA2/AES [1]AP5 5_2.4G m, rssiLevel: 4, 4 security_tyype = ch: 1, rrssi: ‐ 42 dBm WPAW WPA2/AES [2]QA.
AI60 060H H Useer Maanual 3.15 TC CP SERVER R Description AT+TCPLISTEN= Parametters PORT: number ; exx :2000 Return n AT+TCPLISTEN=OKK ssv606 60>:AT+TCPLLISTEN=2000 AT+TCPLISTEN=OKK 60>:new con nected to lissten port(200 00), socket:00 ssv606 3.16 Cleean TCP SE ERVER Description AT+TCPUNLISTEN== Parametters PORT: number ; exx :2000 Return n AT+TCPUNLISTEN==OK 3.
AI60 060H H Useer Maanual 3.20 GP PIO Setting Description Parametters Return n AT+SET T_GPIO=>, G ID. : GPIO : 0:input ; 1:output. AT+SET T_GPIO=OK ssv606 60>:AT+SET__GPIO=2,1 3.21 GP PIO Write Description Parametters Return n AT+WR RITE_GPIO=<, > G ID. : GPIO : 0:low ; 1:hhigh. AT+WR RITE_GPIO=O OK ssv606 60>:AT+WRITTE_GPIO=2,1 1 3.
AI60 060H H Useer Maanual 3.25 AP P mode Description AT+AP Parametters None Return n [At_AP P] : +++ 3.26 EX XIT AP mod de Description AT+AP_EXIT Parametters None Return n [At_AP P_EXIT] : ++++ 3.27 Set AP SSID Description AT+SET T_AP_SSID=< Parametters :SSID w_softap_ssid=ABC new Return n i_co onfig.
AI60 060H H Useer Maanual 3.31 G//N Mode Gain Description AT+RA ADIO_RF_GN GAIN= Parametters :5~15 Return n None AT+RA ADIO_RF_GN GAIN=7 3.32 B Mode M Gain Description AT+RA ADIO_RF_BGA AIN= Parametters :5~15 Return n None AT+RA ADIO_RF_BGA AIN=2 3.33 IC Temp. Description AT+RA ADIO_RF_REA AD_TEMPCS= =? Parametters None Temp:°°C Return n Ex: AT+ +RADIO_RF__READ_TEMP PCS=28 3.34 Sttop RF Description AT+RA ADIO_RF_STO OP Parametters None Return n None 3.
AI60 060H H Useer Maanual 3.37 Duump all RF OFFSET O Description AT+RA ADIO_RF_DU MP Parametters None 列出 ALL A RF 補償值 值 Ex: ====== ========== channe el = 1 11 B powe er = G/N po ower = 9 Return n Freq. Offset O = 2,22 LDO = 4b661c PA1 = 3d5e84fff PA2 = 1457d79 PA3 = fcccce27 Boundary = 0,0 ====== ========== 3.38 RF LDO Description Parametters Return n AT+RA ADIO_RF_LDO O= >, :1~8 :5~8 None 3.
AI60 060H H Useer Maanual 3.42 RF_IQ PHASE E Description AT+RA ADIO_RF_IQPPHASE= Parametters : (‐7~7) Return n None 3.
AI60 060H H Useer Maanual 4. API Descrip D ption: 4.1 TAG G_CABRIO O_CONFIG GURATION N data stru ucture The datta structure of TAG_C ABRIO_CO ONFIGURA ATION is uused to storee the necessaary informattion for the operation of o WiFi.
AI60 060H H Useer Maanual 4.2 Rebooot the firm mware Descripption : The command c will w reboot th the firmwaree of SSV6060. Syntax : void bss_m mgmt_reboot (void) Parameeters : Nonee Return Value : Nonee Remarkk : None I 4.3 Coree Library Initialize Descripption : The command initializes i thhe necessarry parameteers of 802. 11 core library. This should be callled every tim me. Syntax : void bss_m mgmt_init (void) ( Parameeters : Nonee Return Value : Nonee Remarkk : None 4.
AI60 060H H Useer Maanual Returnss: ESS_THRE The return value v willl be sen nd to th he PROCE EAD “Cabrioo_ate_proceess” and calll the functtion “At_PaarserInd”. T This thread will continuue to listen the AT comm mand and th he result fro om 802.11 ccore library. Remarkk : #defiine MAX_A AP_LIST 100 // Maximum M nu umber of W WiFi AP stored // The scanned of o WiFi AP’s informatio on will be store into “aap_list”.
AI60 060H H Useer Maanual char wifi_ssid[[32]; // W WiFi AP naame or STA name u8_t wifi_ssid_ _len; // T The length of SSID u8_t wifi_mac[[6]; // M MAC addreess of Wifi AP A The returnn value will be send to the PROCE ESS_THREAD “Cabrioo_ate_proceess” and call thee function “A At_ParserInnd” with meessage ID “M MSG_ATE__CONNEC CT”. 4.6 WiFFi AP Disconnnect Descripption : The command c will w disconnnect the conn nection of WiFi W AP.
AI60 060H H Useer Maanual Parameeters : ripadddr The remotee IP addresss for TCP co onnection port The remotee IP’s port nnumber for TCP T connecction appsttate NULL for this t field Returnss : uip_cconn * will be return foor the handlle of TCP co onnection. Remark 4.8 TCPP Disconnecction Descripption : The command c will w disconnnect the conn nection of remote IP’s T TCP port. Commaand : unsiggned char tcpclient_close ( struct tcpclient_state *s) Parameeters : *s The handlee of current T TCP connecction.
AI60 060H H Useer Maanual PIN__ID id, PIN__MODE mo ode) Parameeters : id typedef enu um t_PIN_IID { PIN_1 11 = 00, PIN_1 13, PIN_1 15, PIN_1 16, PIN_3 30, PIN_3 31, PIN_3 33, PIN_3 34 } PIN_ID; modee typedef enu um t_PIN_M MODE { INPUT T = 00, INPUT T_PULL, OUTP PUT, OUTP PUT_DRIVIINGUP } PIN_MODE; Returnss : Nonee Remarkk : 4.10 GPPIO Write Descripption : The command c will w send thee data to GP PIO.
AI60 060H H Useer Maanual digitaalWrite( PIN__ID id, u32 data) d Parameeters : id typedef enu um t_PIN_IID { PIN_1 11 = 00, PIN_1 13, PIN_1 15, PIN_1 16, PIN_3 30, PIN_3 31, PIN_3 33, PIN_3 34 } PIN_ID; data The data is going sendd to GPIO Returnss : Nonee Remarkk : 4.11 GPPIO Read Descripption : Readd data from GPIO.
AI60 060H H Useer Maanual id typedef enu um t_PIN_IID { PIN_1 11 = 00, PIN_1 13, PIN_1 15, PIN_1 16, PIN_3 30, PIN_3 31, PIN_3 33, PIN_3 34 } PIN_ID; Returnss : Returrn data valu ue in 32-bit data. Remark : 4.12 PW WM delay Descripption : Conttrol PWM behavior..
AI60 060H H Useer Maanual PIN_3 34 } PIN_ID; dutyccycle Duty cycle. Returnss : 0 : Suuccess -1 : fail f Remarkk : M 4.13 Dissable PWM Descripption : Disabble PWM fu unction.
AI60 060H H Useer Maanual 5. Network pro ogramm ming Because this is nonb black IO. Wee need to crreate a proccess to get m message an nd confirm the t TCP con nnection, seend data is completed c or o there is nnew data orr connection coming. There is a ssimple exam mple show below. b Proccess need to o wait event PROCESSS_EVENT_M MSG and the e data pointter type is SSOCKETMSG G. We can know k this message m com me from wh hich socket, port and sttatus.
AI60 060H H Useer Maanual 5.1 ‐ T TCP clien nt progrramming g Create a TCP conneection Call fun nction tcpco onnect to staart TCP connect to pee er side and nneed wait for f SOCKETT_CONNECT TED messagge . httpsocck = tcpconn nect( &gNettStatus.rem mote_ip_add dr, gNetStattus.port, &http_req quest_proce ess); //wait for f TCP conn nected or tiimeout. PROCESSS_WAIT_EV VENT_UNTIIL(ev == PRO OCESS_EVENT_MSG); msg = *(SOCKETM * SG *)data; if(msg.
AI60 060H H Useer Maanual if(msg.sstatus == SO OCKET_NEW WDATA) { reccvlen = tcprrecv(httpsocck, buffer_in, MAX_SEN ND_BUFFERR); } ‐ Close co onnection Call fun nction tcpclo ose to closee connection n. tcpclosee(httpsock); TThere is a sim mple examp ple “HTTP reequest” to show s how the t TCP clieent working.. P Please refer \C Cabrio conttiki src\exam mples\sockeet_proc\soccket_proc.c P PROCESS_TH HREAD(http_request_pprocess, ev, data) 5.
AI60 060H H Useer Maanual Call fun nction tcpun nlisten to stoop listeningg the TCP po ort. tcpunlissten(localpo ort); 5.3 ‐ U UDP prog grammin ng Cre eate a UDP socket s Call fun nction udpcrreate to creeate a UDP socket. s gudpsock = udpcre eate(gNetSttatus.udppo ort, &udp_connect_proocess); ‐ Send daata to the peer p side Call fun nction udpse endto to se nd data to peer p side.
AI60 060H H Useer Maanual 6. SPI Flash F AP PI 6.1 S Flash SPI h API strructure User Appplication SPI FLA ASH API SPI Flassh Driver S Flassh directtory stru SPI ucture 6.2 API layer: ./ icomlib/incl i lude /flash__api.h Drivver layer: . / iccomlib/inclu ude /drv_flaash.h 6.3 S Flassh API in SPI ntroducttion Funnction namee Description D spi__flash_init()) Call C driver innitialization n in this APII. spi__flash_read Use U this to reead flash daata into your reserved m memory destination.
AI60 060H H Useer Maanual 6.4 S Flassh Driver introdu SPI uction F Function naame Description drv__flash_init To setup sp pi command d related infformation. In I our driveer,we now only setup s follow wing spi flassh command: 1).read staatus1 2).read staatus2 3).write en nable 4).erase seector 5).page pro ogram drv__flash_get__cache_addrr Get start address of 4K KB driver ccache bufferr. It’s addresss is in sram ran nge. drv__flash_get__base_addr Get start address of sp pi flash.
AI60 060H H Useer Maanual For detail implem mentation,pleease see drv_fllash_page_proogram. SPI command type t Pro ocedures Reaad status 1 regiister Step p1:initializatioon Set up register too let HW know w the exact sraam address off spi command d. You can seee the imp plementation iin drv_flash_iint(): In n our implem mentation. I allo ocate two (256+4) byte bufffers.
AI60 060H H Useer Maanual 7. Smartt_Link Guide The APP(iComm_too ol.apk) provvide a simplle way for th he first initiialization off AI 6060H H through sm martphone. This APP will pass yo our currentlly connected d WiFi AP’ss name and password to t 0H receivedd the messag ge, AI6060H H can conneect to WiFi AP A AI6060H.. As AI6060 and will seend successs message bback to the APP A on smaartphone. Byy this scenaario, APP is cappable to inittialize multiiple AI6060 0 H at the saame time wi with few step ps.
AI60 060H H Useer Maanual 7.4 C Console infformation 7.5 C Control LE ED on/off aand PWM M function W fu unction: 7.
AI60 060H H Useer Maanual 8. OTA Guide 8.1 Opeen APP an nd choice F F/W & Dut D wnload F/W W and upddate to dutt 8.2 dow P 8.
AI60 060H H Useer Maanual 8.
AI60 060H H Useer Maanual 9. FTP downlo d oad linkk ftp://AI60660H@ftp2 2.acsip.ccom.tw:2121 主機 機 =ftp22.acsip.co om.
AI60 060H H Useer Maanual 100. Coding Fllowchaart: 10.
AI60 060H H Useer Maanual 10.
AI60 060H H Useer Maanual 10.
AI60 060H H Useer Maanual 10.
AI60 060H H Useer Maanual 111. Fedderal Commun C nication n Comm missionn Inteerferen nce Stattement 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.
AI60 060H H Useer Maanual 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.