function [FirmwareVersion SN err] = BK_GetSN(sp)

PACKET_LENGTH = 26;
LoadCmdPacket = zeros(1,PACKET_LENGTH);
LoadCmdPacket(1:3)  = [ hex2dec('aa') 00 hex2dec('6a')];
  
LoadCmdPacket(end) = rem(sum(LoadCmdPacket(1:end-1)),256);  %Compute checksum

fwrite(sp,LoadCmdPacket);
 [A, count] = fread(sp,PACKET_LENGTH);

 if(count == 0)
     err = 1;
 else
     err = 0;
     FirmwareVersion = 0;
     SN = A(11:20);
 end
end