now I have managed to get the simpleperipheral project modified to send adc data in advetising packet payload:
unit16 adc;
GAPRole_SetParameter( GAPROLE_ADVERT_DATA, sizeof( uint16 ), &adc);
and then enable advertising for 1s by
uint8 current_adv_enabled_status;
//Find the current GAP advertisement status
GAPRole_GetParameter( GAPROLE_ADVERT_ENABLED, ¤t_adv_enabled_status );
if( current_adv_enabled_status != TRUE )
{
//change the GAP advertisement status advertising
uint8 new_adv_enabled_status = TRUE;
GAPRole_SetParameter( GAPROLE_ADVERT_ENABLED, sizeof( uint8 ), &new_adv_enabled_status );
}
packet sniffer show the payload of the advertising packet as expected.
now I want to know how to modify the SimpleBLEObserver, to get the payload back to a variable:
unit16 adc;
thanks a lot any one could help!