Wifi AudioHttp API WIFI Audio HTTP API All Copyrights belong to iEAST No disclosure without permission 2014.
Wifi AudioHttp API Revision record Revision Date 2014-03-26 Description Author version 0.1 Initially built Shao Chunsuo 2014-4-10 0.2 Revised interface description, added multiroom interfaces Shao Chunsuo 2014-6-11 0.3 Added favorites, recording and MCU communication Shao Chunsuo 2014-6-25 2014-7-1 0.4 0.
Wifi AudioHttp API 3 / 26
Wifi AudioHttp API 目 录 WIFI AUDIO ................................................................................................................................... 1 HTTP API ........................................................................................................................................ 1 1. BRIEF ...................................................................................................................................... 6 1.1. 1.2. 1.3. 2. BRIEF ....................
Wifi AudioHttp API 2.6.12 start WPS server........................................................................................................... 20 2.6.13 stop WPS server ........................................................................................................... 20 2.6.14 start WPS Client ........................................................................................................... 20 2.8 DEVICE CONTROL ......................................................................
Wifi AudioHttp API 1. Brief 1.1. brief Wifi Audio AXX module is the SoC module for WiFi audio solutions, it support Smartlink, DLNA and Airplay. It also support some http API for quick access. 1.2. HTTP get You can send HTTP get request to the module,the response if in JSON. Request format is http://x.x.x.x/httpapi.asp?command=******** X.x.x.x is the IP address,(Below, assume the IP is 10.10.10.254) ******* is the command. 1.3. About Hexed Some data should hexed before transfer it.
Wifi AudioHttp API } int ascii2hex(char* ascii_in, char* hex_out, int ascii_len, int hex_len) { const char hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8','9', 'A', 'B', 'C', 'D', 'E', 'F'}; int i = 0; int ret = 0; memset(hex_out, 0, hex_len); while( i < ascii_len ) { int b= ascii_in[i] & 0x000000ff; hex_out[i*2] = hex[b/16] ; hex_out[i*2+1] = hex[b%16] ; ++i; ret += 2; } return ret; } 2. API list 2.1. Get device information http:// 10.10.10.254/httpapi.
Wifi AudioHttp API "netstat": "0", "essid": "", "apcli0": "", "eth2": "192.168.120.
Wifi AudioHttp API 4 if battery support 5 if preset key support 6 if I2S in support streams Bit: 0 if 1 if 2 if 3 if 4 if 5 if airplay enabled DLNA enabled TTPod support TuneIn support Pandora support DoubanFM support external preset_key presets key number plm_support Bit: 0 LineIn (Aux support) 1 BT support 2 optical support WifiChannel WiFi channel AP_clients AP client number RSSI Router RSSI (0 ~ 100), 100 is the best TxQuality Tx quality, RxQuality Rx quality battery 1 means battery i
Wifi AudioHttp API {"res":"0","aplist":[{"ssid":"wmmAudio_a7b8","bssid":"00:22:6c:00:a7:b8","rssi":"76","channel": "1","auth":"OPEN","encry":"NONE","extch":"1"},{"ssid":"WIIMU_Network","bssid":"20:dc:e6: cb:7e:78","rssi":"70","channel":"11","auth":"WPA2PSK","encry":"AES","extch":"0"},{"ssid":"W IFIAudio_29b0","bssid":"00:22:6c:16:29:b0","rssi":"65","channel":"11","auth":"OPEN","encry":" NONE","extch":"0"}]} res number aplist ssid Wifi SSID name (hide SSID is not include), hexed bssid MAC rssi RSSI
Wifi AudioHttp API Connect the device to a hide router. When connecting, the device AP connection may lost. This API has no return result, you can call wlanGetConnectState to get the connect state if the AP connection still not lost. Ssid and pwd must hexed,if no pwd,API is: http://10.10.10.254/httpapi.asp?command=wlanConnectHideApEx:ssid 2.2.4 Get the connect state http://10.10.10.254/httpapi.
Wifi AudioHttp API "sw": "0", "status": "play", "curpos": "12900", "totlen": "229000", "Title": "736865", "Artist": "47726f6f766520436f766572616765", "Album": "xxxxxxxxxx", "Year": "2005", "Track": "7", "Genre": "Dance", "locallistflag": "1", "locallistfile": "", "plicount": "1", "plicurr": "1", "vol": "90", "mute": "0", "iuri": "xxxxxxxxxxxxxxxxxxxxx", "uri": "xxxxxxxxxxxxxxxxxxxxxx" } 字段说明: 返回值字段 字段说明 type 0: master or standalone device 1: slave ch 0 stereo,1 left,2 right mode 0 none 1 Airplay rd
Wifi AudioHttp API 60 voice mail 99 slave loop Loop mode: 0: sequence, no loop 1: single loop 2:shuffle all 3:loop all eq The Equalizer number status 0 1 2 3 curpos Position, in ms totlen Duration in ms Title Return hexed data, the music name or music URL Artist Return hexed data Album Return hexed data udsikflag Is there USB disk plicount The track number of playlist plicurr Current track index vol Current volume mute Current mute state stop play load pause 2.3.
Wifi AudioHttp API 2.3.3 Pause / Resume http://10.10.10.254/httpapi.asp?command=setPlayerCmd:pause http://10.10.10.254/httpapi.asp?command=setPlayerCmd:resume 2.3.4 Pause or Resume http://10.10.10.254/httpapi.asp?command=setPlayerCmd:onepause If the state is paused, resume it; or, pause it. 2.3.5 Previous http://10.10.10.254/httpapi.asp?command=setPlayerCmd:prev 2.3.6 Next http://10.10.10.254/httpapi.asp?command=setPlayerCmd:next 2.3.7 Seek http://10.10.10.254/httpapi.
Wifi AudioHttp API note: n is from 1-100, it stands each volume tuning will increase or decrease the volume by n%. 2.3.10 Mute http://10.10.10.254/httpapi.asp?command=setPlayerCmd:mute:n Mute: n=1 Unmute: n=0 the slave mute state will be set at the same time. 2.3.11 Loop mode set http://10.10.10.254/httpapi.asp?command=setPlayerCmd:loopmode:n n 0 1 2 -1 Sequence, no loop Single loop Shuffle loop Sequence loop 2.3.12 EQ set http://10.10.10.254/httpapi.
Wifi AudioHttp API 2.4 USB disk playback 2.4.1 Get the playlist of USB http://10.10.10.254/httpapi.asp?command=getLocalPlayList { "num": "2", "locallist": [ { "file": "/media/sda1/avril lavigne - tik tok.mp3" }, { "file": "/media/sda1/avril lavigne – hush hush.mp3" } ] } num Music file number in USB disk locallist file Music file,hexed 2.4.2 Get Music information in USB disk http:// 10.10.10.254/httpapi.
Wifi AudioHttp API { "filename": "/media/sda1/avril lavigne – hush hush.mp3", "totlen": "0", "Title": "unknown", "Artist": "unknown", "Album": "unknown" }, { "filename": "/media/sda1/avril lavigne – hush hush2.mp3", "totlen": "0", "Title": "unknown", "Artist": "unknown", "Album": "unknown" }]} Or return single metadata { "filename": "/media/sda1/avril lavigne – hush hush.
Wifi AudioHttp API 2.4.3 Play the USBDisk http:// 10.10.10.254/httpapi.asp?command=setPlayerCmd:playLocalList:index 2.6 Multiroom 2.6.1 Get slave list http://10.10.10.254/httpapi.asp?command=multiroom:getSlaveList { "slaves": "1", "slave_list": [ { "name": "FA5100_a3f4", "mask": "0", "volume": "90", "mute": "0", "channel": "0", "ip": "10.10.10.100", "version": "WIFIAudio.1.2.2321" } ] } slaves Slave number slave_list name Slave device name mask If slave is masked, it will act as a standalone device.
Wifi AudioHttp API 2.6.2 2.6.3 kickout slave http://10.10.10.254/httpapi.asp?command=multiroom:SlaveKickout:ip Kickout one slave from group. 2.6.4 mask slave http://10.10.10.254/httpapi.asp?command=multiroom:SlaveMask:ip Mask one slave, If slave is masked, it will act as a standalone device. 2.6.5 un-mask slave http://10.10.10.254/httpapi.asp?command=multiroom:SlaveUnMask:ip 2.6.6 set slave volume 接口 URL: http://10.10.10.254/httpapi.asp?command=multiroom:SlaveVolume:ip:volume 2.6.
Wifi AudioHttp API 2.6.10 Slave playback channel set http://10.10.10.254/httpapi.asp?command=multiroom:SlaveChannel:ip:channel Slave channel: 0 stereo 1 left 2 right 2.6.11 Master playback channel set http://10.10.10.254/httpapi.asp?command=setPlayerCmd:slave_channel:channel Just set the master or standalone playback channel , not affect the slave . Slave channel: 0 stereo 1 left 2 right 2.6.12 start WPS server http://10.10.10.254/httpapi.
Wifi AudioHttp API 2.8 Device control 2.8.1 Set SSID http:// 10.10.10.254/httpapi.asp?command=setSSID:value Set the device SSID SSID value should < 16 bytes without special charaters. 2.8.2 Set AP password http:// 10.10.10.254/httpapi.asp?command=setNetwork:1:password Password value should < 16 bytes without special charaters. http:// 10.10.10.254/httpapi.asp?command=setNetwork:0 Remove AP passowrd 2.8.3 Restore http:// 10.10.10.254/httpapi.asp?command=restoreToDefault 2.8.4 Reboot http:// 10.10.10.
Wifi AudioHttp API 2.8.6 Get the shutdown timer http:// 10.10.10.254/httpapi.asp?command=getShutdown Return the seconds 2.8.7 Close WIFI http:// 10.10.10.254/httpapi.asp?command=setPowerWifiDown Device is still active but Wifi is closed. 2.9 Online Upgrade 2.9.1 Check the new version http:// 10.10.10.254/httpapi.asp?command=getMvRemoteUpdateStartCheck 2.9.2 Start upgrade http:// 10.10.10.254/httpapi.asp?command=getMvRemoteUpdateStart It will download the firmware first and then burn it. 2.9.
Wifi AudioHttp API 2.9.6 Get the upgrade percent http:// 10.10.10.254/httpapi.asp?command=getMvRomBurnPrecent {"status":"0","progress":"50"} 0 in progress -1 failed status progress 0~100 2.10 Alarm clock 2.10.1 time sync If the device has no internet access, you need to sync its time with: http://10.10.10.254/httpapi.asp?command=timeSync:YYYYMMDDHHMMSS YYYY is year(such as 2015),MM is month (01~12),DD is day (01~31),HH is hour (00~23),MM is minute (00~59),SS is second (00~59) In UTC 2.10.
Wifi AudioHttp API 1 playback or ring 2 stop playback Time should be HHMMSS url:the shell path or playback url, should less than 256 bytes 2.10.3 Get alarm http://10.10.10.254/httpapi.
Wifi AudioHttp API Above, device will capture I2S data and play it udisk:if Udisk is connected to the device, it will playback the UDisk, or device will capture I2S data and play it wifi: 2.12 GPIO simulation 2.12.1 Pull up GPIO http://10.10.10.254/httpapi.asp?command=IOSimuPullUp:%d 00: GPIO_nReload 11: GPIO_nReady (only A02) 12: GPIO_DCD 14: GPIO_RIN 18: GPIO1(only A11) 17: GPIO2(only A11) 2.12.2 Pull down GPIO http://10.10.10.254/httpapi.asp?command=IOSimuPullUp:%d 2.12.3 Read GPIO level http://10.
Wifi AudioHttp API http://10.10.10.254/httpapi.asp?command=IOSimuKeyOut:%d Generate the AXX+KEY+XXX command to MCU 2.13 Voice prompt http://10.10.10.254/httpapi.asp?command=PromptEnable http://10.10.10.254/httpapi.asp?command=PromptDisable 2.14 pre-set program 1-6 http://10.10.10.254/httpapi.