Greetings to all who read this,

1. I need to load 1 Mb binary file
2. In binary file are all settings for programming device like this sample
which will I try to explain...

0012DB3A000300470016000000160600000FFE3D(second block)436B041A80017FF60000000022F085F0BDEF68D2724EFFBEFBECC9309249F6409072245730324CC648C304C6B0B72EFB008AC540648490834ADCA82D9490 01B5EDD9357ADC46352842646036011DE712000849306A5DD85576C7C96FA5B4445B6F68ED6EF4DEAD696A55C911B5145FBF 7FBFFEFBEC99820A56BBBDB7B777BDDDDEF77BDDDDEEEEFC8EEF

this is like U see hex format
when i load file, I need to make this

"0012" first line of binary file ( here is hex ) are = 18 decimal and this is size of block need's to be sent at first

"DB3A" are checksum of that lenght

"0003" are device type

"0047" are number of block's in this binary file ( decimal = 71 block )

"00160000" are device ID1
"00160600" are device ID2
"00FFE3D" are size of binary file ( decimal = 1048125 bytes )

This all info is from first line of binary code ( I have put here hex for better understanding )

"0012DB3A000300470016000000160600000FFE3D"


Another block, size lenght and CRC

"436B" = 17259 ( binary lenght of second block )
"041A" = checksum
"8001" = not important
"7FF6" = decimal value 32758
"00000000" start address

Now using mscoom I need to send first ( 0012 hex = 18 decimal line of code )

send "DB3A000300470016000000160600000FFE3D" = 1 block size
wait for device to accept and store data
return from device = 06 ( this means that data are stored correctly )

send 2 block "436B041A80017FF60000000022F085F0BDEF68D2724EFFBEFBECC9309249F6409072245730324CC648C304C6B0B72EFB008 AC540648490834ADCA82D949001B5EDD9357A..........." lenght 17259 binary

Also here, afther sending 2 block data, I need to wait for ( 06 ) which is
response from device that data are stored correctly.

Afther lenght of 17259 binary, there is also line of code which gives info of another block like described beffore.

I'm sorry for bad explanation if U dont understand...

Please help...
B.R
VB Client/Server