SENA HD1200 User Manual
Page 48
![background image](/manuals/292729/48/background.png)
Starter Kit and User Manual for the HelloDevice 1200
45
length,
0,
(struct
sockaddr*)&clientAddr,
&clientLen
);
if (lenReceived < 0)
{
perror("\nError receiving???\n") ;
exit(0)
;
}
// Store memory status for future use
for (i=0, count=0; i { printf("%2.2x:\t", ResponseBuf[i+4]) ; if (count == 9) { count = 0 ; printf("\n") ; } ; } ; // Display incoming packet size printf("\n%d bytes received...\n\n", lenReceived) ; Free free(ResponseBuf) ; // Close TCP socket TCPSocketClose() ; } char commandBuf[1450+6+1]="", data[1450+1] ; int commandLen ; int offset, length, tmp ; int i, err ; printf("\n\nEnter offset in hex (MAX. 0x7FF):") ; scanf("%x", &offset) ; printf("\nEnter length in digit (MAX. 1450):") ; scanf("%d", &length) ; printf("\nEnter value in hex:") ; scanf("%s", data) ; // Re-Initialize TCP socket TCPSocketInit() ; // Make TCP command commandBuf[0] = DPRSet; tmp =offset >> 8 ; commandBuf[1] = tmp; tmp = offset & 0x00FF ; commandBuf[2] = tmp ; tmp = length >> 8 ;
count++
printf("\n\n")
//
//---------------------
// Process DPRAM Write
//---------------------
void DPR_Write()
{