I am doing some project on GPS module
I want to split the string according to incoming messages.
I receive continues data over UART on my mcu.
$PMTK011,MTKGPS*08
$PMTK010,001*2E
$PMTK011,MTKGPS*08
$PMTK010,002*2D
$GPRMC,064512.498,V,,,,,0.00,0.00,270121,,,N*4B
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,064512.498,,,,,0,0,,,M,,M,,*49
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GLGSV,1,1,00*65
$GPGLL,,,,,064512.498,V,N*7B
$GPTXT,01,01,02,ANTSTATUS=OPEN*2B
$GPRMC,064513.498,V,,,,,0.00,0.00,270121,,,N*4A
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,064513.498,,,,,0,0,,,M,,M,,*48
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GLGSV,1,1,00*65
$GPGLL,,,,,064513.498,V,N*7A
$GPTXT,01,01,02,ANTSTATUS=OPEN*2B
I want to split the above data when it check 2B at the end of string and count the length of each split of string
question from:
https://stackoverflow.com/questions/65914416/how-to-split-large-character-array-and-check-length-of-the-array