anchor.diff:    ok = Transport:setopts(Socket, [{active, once}]),
     Protocol = proplists:get_value(protocol, Opts),
     gen_server:enter_loop(?MODULE, [],
  -    #state{protocol = Protocol, socket=Socket, transport=Transport}, ?TIMEOUT).
  +    #state{protocol = Protocol, socket = Socket, transport = Transport}, ?TIMEOUT).
   %%{ok, #state{}}.
   
   %%--------------------------------------------------------------------
  
positive.code: 
  do_format_command(UniqueId, DataId, Content) ->
    Length = 1 + byte_size(UniqueId) + 1 + byte_size(Content) + 5,
    Result =  list_to_binary(io_lib:format("@@~s~w,~s,~s*", [DataId, Length, UniqueId, Content])),
    CheckSum = em_checksum:sum(Result),
    list_to_binary(io_lib:format("~s~2.16.0B\r\n", [Result, CheckSum])).
  
  %% echo "20. meitrack"
  %% (echo -n -e "\$\$d138,123456789012345,AAA,35,60.000000,130.000000,120101122000,A,7,18,0,0,0,49,3800,24965,510|10|0081|4F4F,0000,000D|0010|0012|0963|0000,,*BF\r\n";) | nc -v localhost 5020
  
negative.code:     {error, Reason} ->
        em_logger:info("Error: ~s", [Reason]),
        {noreply, State, ?TIMEOUT}
    end.
  
  do_encode_command(UniqueId, #command{type = ?TYPE_POSITION_SINGLE}) ->
    {ok, do_format_command(UniqueId, <<"Q">>, <<"A10">>)};
  do_encode_command(UniqueId, #command{type = ?TYPE_ENGINE_STOP}) ->
  