Using a VS debugger as suggested I have found the problem,from my code the serial port sent 7 byte (latest with the value of 0x00) and not 6 bytes as declared.
The right code is:
Dim array(5) As Byte
array(0) = &H3
array(1) = &H1
array(2) = &H1
array(3) = &HA4
array(4) = &HA5
array(5) = &HB2
SerialPort1.Write(array, 0, array.Length)
Is quite strange...from 0 to 5 there are 6 bytes...and not 5 as I must declare...
.
The device used a single wire for the communication in half duplex mode..the master sent 0×00 and on the same time the slave answer with the value of 0x01...result 0x00 then the rest of the status packet....
....
Thank you for the help
Regards
Maurizio