Application Guide

Wifi AudioHttp API
6 / 26
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 modulethe 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.
Here is the hex method (in C):
int hex2ascii(const char *pSrc, unsigned char *pDst, unsigned int nSrcLength, unsigned int nDstLength)
{
int i, j = 0;
memset(pDst, 0, nDstLength);
for (i = 0; i<nSrcLength; i+=2 )
{
char val1 = pSrc[i];
char val2 = pSrc[i+1];
if( val1 > 0x60) val1 -= 0x57;
else if(val1 > 0x40) val1 -= 0x37;
else val1 -= 0x30;
if( val2 > 0x60) val2 -= 0x57;
else if(val2 > 0x40) val2 -= 0x37;
else val2 -= 0x30;
if(val1 > 15 || val2 > 15 || val1 < 0 || val2 < 0)
return 0;
pDst[j] = val1*16 + val2;
j++;
}
return j;