Serial protocol..



  • Hi all.
    Today I look to source code and try understand serial protocol format..
    I understand it .. but not all.. then I have qestion..
    0;0;3;0;14;Gateway startup complete.
    if good understand then Gateway startup complete. is Payload , or comment...? or what is it ?
    14 is Internal sub-type - I_GATEWAY_READY.
    why gateway send this string Gateway startup complete. if string format contain sub-type ?

    Then if power up my sensor then received this from serial gateway:
    0;0;3;0;9;read: 32-32-0 s=255,c=0,t=17,pt=0,l=3:1.4
    and again this :
    32;255;0;0;17;1.4

    Question is why serial gateway send packet twice and first is decoded?

    I want make own controler in delphi and need idea how to easy received and decodet all data packet from serial gateway .
    I can test all data from serial gateway if contain special string .. but may be exist more easy way..
    may be is possible disable in serial gateway send decoded packet..

    regards.


  • Admin

    The "gateway startup complete" was initially just a debug message.

    @John (PiDome) proposed to give this message a special internal type to distinguish it from the rest of the debug messages.

    0;0;3;0;9 is jut plain debug messages. You can turn them off when compiling your gateway (or log them in your application log).


  • Plugin Developer

    True, the main reason for this request/proposal was with the use of a special type the controller connected knows when the gateway is ready to handle data to be send/receive.

    It previously was a debug message then you to parse a debug message (if I remember correct). If the debugging was turned of there was no way to determine properly when the gateway could handle messages to be send to the nodes.



  • Hi.
    ehm... I want plain message only .. no debug information ..
    is it possible ?


  • Admin

    @hek said:

    You can turn them off when compiling your gateway

    In MyConfig.h



  • Hi.
    I do it .. change configuration in MyCOnfig.h (disable debug) and now gateway not send encoded message .
    But right now I test my serial board and have problem ..
    If send fast many packet from my sensor (INT0 and INT1) then serial gateway halt .. and no more data received from sensor and output string to uart .. I must reset MCU and all work again..

    what is problem ??

    Problem is in serial gateway .. after reset all work good .. any idea??

    regards.



Suggested Topics

  • 199
  • 4
  • 8
  • 5
  • 10
  • 14
  • 1
  • 16

1
Online

11.4k
Users

11.1k
Topics

112.7k
Posts