• @Gordon - I wonder if there are any plans to build an App to send
    A-GNSS data to the Bangle 2 GPS chip.s Has there been any attempt
    to do this.

    I found the following if it is any use to you.
    I have been unsuccessful so far in sending any CASIC commands to the B2 GPS.

    If you go to https://www.icofchina.com
    Got to the downloads link
    https://www-icofchina-com.translate.goog­/?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-­GB

    Download AGPS.zip

    Unzip and there is a file called agps_demo.c
    This shows how to download the A-GNSS information data.

    Unzip and inside the AGPS folder is a CasicAgns.zip file.
    Inside that zip is file called casicAgnsAidIni.c
    This file has the following code at the bottom.

    	ckSum = 0x010B0038;
    	for (i = 0; i < 14; i++)
    	{
    		ckSum += pDataBuff[i];
    	}
    
    	
    	aidIniMsg[0] = 0xBA;
    	aidIniMsg[1] = 0xCE;
    	aidIniMsg[2] = 0x38;		// LENGTH
    	aidIniMsg[3] = 0x00;
    	aidIniMsg[4] = 0x0B;		// CLASS	ID
    	aidIniMsg[5] = 0x01;		// MESSAGE	ID
    	
    	memcpy(&aidIniMsg[6],  (char*)(&aidIni), 56);
    	memcpy(&aidIniMsg[62], (char*)(&ckSum),  4);
    	
    	return;
    }
    

    The code above makes it look like the start of the CHKSUM is calculated as

    sum = (msg_id << 24) + (msg_class << 16) ++ (len_byte1 << 8) + (len_byte0)
    

    This is ties in with the statement in the CASIC document.

    The calculation of the check value can follow the following algorithm:
    ckSum = (id << 24) + (class << 16) + len;
    for (i = 0; i <(len / 4); i++)
    {
    ckSum = ckSum + payload [i];
    }

    The point is - that it looks like the CASIC command should work on our Bangle 2 GPS chip.
    However so far I have been unable to get a response to a basic CFG-PRT command.
    See the other thread by @Mark_M
    http://forum.espruino.com/conversations/­371336/#comment16328801

About

Avatar for HughB @HughB started