Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. gizi
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    gizi

    @gizi

    0
    Reputation
    4
    Posts
    294
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    gizi Follow

    Best posts made by gizi

    This user hasn't posted anything yet.

    Latest posts made by gizi

    • RE: Raw binary transmission

      Sorry for the confusion, this is using the SerialGateway - I have my own code server side parsing the serial responses. Everything after the 'mysensorsmqtt: serial recv -' is just dumps of the serial string received.

      Ill dig a little deeper into the code and look at the MyGateway side of the code, everything seemed in order but I will do some debugging.

      posted in Development
      gizi
      gizi
    • RE: Raw binary transmission

      Ok, so I am obviously missing something here, I saw you mention this solution in my searches, but I am unable to output a serialised hex string. My test code below appears to be setting the packetType correctly for the different types but for P_CUSTOM my results are an empty string...

      #include <MySensor.h>
      #include <SPI.h>
      
      #define CHILD_ID 3
      
      #define MS_CEPIN 8
      #define MS_CSPIN 7
      
      MySensor gw(MS_CEPIN, MS_CSPIN);
      
      unsigned int counter=0;
      unsigned int counter2=0;
      
      // Change to V_LIGHT if you use S_LIGHT in presentation below
      MyMessage msg(CHILD_ID,V_VAR1);
      
      void setup()
      {
      	gw.begin(NULL, 99);
      	gw.present(CHILD_ID, S_CUSTOM);
      }
      
      // some random buffer for testing
      char buffer[10] = {'H','e','l','l','o',' ','Y','o','u','\0'};
      
      void loop()
      {
      	//send something periodically
      	counter++;
      	if (counter == 0) {
      		counter2++;
      		gw.send(msg.set(buffer));	//pt=0 > P_STRING
      		gw.send(msg.set(counter2));	//pt=3 > P_UINT16
      		gw.send(msg.set(buffer,5)); //pt=6 > P_CUSTOM
      	}
      }
      
      

      My gateway returns the following when raw dumping the received serial data (this was the 61st send)...

      mysensorsmqtt: serial recv - 0;0;3;0;9;read: 99-99-0 s=3,c=1,t=24,pt=0,l=9:Hello You
      mysensorsmqtt: serial recv - 99;3;1;0;24;Hello You
      
      mysensorsmqtt: serial recv - 0;0;3;0;9;read: 99-99-0 s=3,c=1,t=24,pt=3,l=2:61
      mysensorsmqtt: serial recv - 99;3;1;0;24;61
      
      mysensorsmqtt: serial recv - 0;0;3;0;9;read: 99-99-0 s=3,c=1,t=24,pt=6,l=5:
      mysensorsmqtt: serial recv - 99;3;1;0;24;
      
      

      So the "pt=" seems to be set as expected, but no serialised hex. I must be missing something simple.

      posted in Development
      gizi
      gizi
    • Raw binary transmission

      Hi All

      Just getting to grips with MySensors.

      Is there a means to transmit raw binary data. In particular the handling of the transmission from the gateway to the controller - maybe as a hexadecimal encoded string of characters?

      I wish to send some bytes of bit flags to my custom controller (which publishes onto MQTT), this controller parses the serial port looking for carriage return ('\n') characters to split the received packets. This obviously presents a problem if the payload data actually contains the '\n' carriage return as a valid bit flag value, splitting the packet incorrectly. (Not to mention all the other control characters that may be received).

      Is such a feature already possibly, or do I need to investigate the gateway code and implement this myself?

      Cheers
      Gizi

      posted in Development
      gizi
      gizi
    • RE: Gerber/Eagle files and then...?

      Try pcbshopper.com, to search multiple fab houses based on your board requirements.

      posted in Hardware
      gizi
      gizi