Navigation

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

    Philippe 57

    @Philippe 57

    0
    Reputation
    14
    Posts
    339
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Philippe 57 Follow

    Best posts made by Philippe 57

    This user hasn't posted anything yet.

    Latest posts made by Philippe 57

    • RE: [SOLVED] Gateway RS485

      @mfalkvidd yes I said it works with the test sketch and I do not know why, what I saw on my PCB is that the frame go in one direction and that's why with mysensors the gateway was not answering

      order placed for new PCBs, waiting now

      posted in Bug Reports
      Philippe 57
      Philippe 57
    • RE: [SOLVED] Gateway RS485

      Hello everyone
      I found my problem, it comes from my PCB there is an error on the tracks, I ordered again corrected PCB and I come back to you when I could do the tests. it takes at least 15 days / 3 weeks

      thanks again for your help i get back to you as soon as possible

      posted in Bug Reports
      Philippe 57
      Philippe 57
    • RE: [SOLVED] Gateway RS485

      Hello

      following tests:

      debug gateway:

      0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RSNGA---,VER=2.3.0
      0;255;3;0;9;4 TSM:INIT
      0;255;3;0;9;6 TSF:WUR:MS=0
      0;255;3;0;9;9 TSM:INIT:TSP OK
      0;255;3;0;9;11 TSM:INIT:GW MODE
      0;255;3;0;9;14 TSM:READY:ID=0,PAR=0,DIS=0
      0;255;3;0;9;18 MCO:REG:NOT NEEDED
      0;255;3;0;14;Gateway startup complete.
      0;255;0;0;18;2.3.0
      0;255;3;0;9;22 MCO:BGN:STP
      0;255;3;0;9;28 MCO:BGN:INIT OK,TSP=1
      0;255;3;0;9;900007 TSF:SAN:OK
      0;255;3;0;9;1200001 TSM:READY:NWD REQ
      0;255;3;0;9;1200020 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
      0;255;3;0;9;1800008 TSF:SAN:OK
      0;255;3;0;9;2400002 TSM:READY:NWD REQ
      0;255;3;0;9;2400021 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
      0;255;3;0;9;2700009 TSF:SAN:OK
      0;255;3;0;9;5400032 TSF:SAN:OK
      0;255;3;0;9;6000005 TSM:READY:NWD REQ
      0;255;3;0;9;6000024 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
      0;255;3;0;9;6300033 TSF:SAN:OK
      

      I found no trace on the RS485 network despite the frame sent by the gateway

      I also reversed the code to do the other way and it's the same, the geteway sends the frame but nothing on the RS485

      for the node I can see the frames on the RS485 that I'm on deck 1 or 2

      so I guess it comes from the sketch of the gateway, after I do not know or look for debug

      posted in Bug Reports
      Philippe 57
      Philippe 57
    • RE: [SOLVED] Gateway RS485

      New PCB :

      0_1534747236676_PCB_PCB-Mysensors-Gateway-RS485_20180820083823.png

      posted in Bug Reports
      Philippe 57
      Philippe 57
    • RE: [SOLVED] Gateway RS485

      after inversion of the sketch the problem remains the same the NODE sends many infos on the network RS485 but the gateway receive nothing

      since the gateway sends a frame from time to time I will wait to see if there is really anything on the RS485 network and if I receive info it means that my node and my gateway do not understand on the RS485 network

      posted in Bug Reports
      Philippe 57
      Philippe 57
    • RE: [SOLVED] Gateway RS485

      Hello

      Here is the diagram of my card but since I made some modification I added a module NRF24 but not programmed and the W5100 is not present too, it is a universal turntable.

      0_1534746232270_Schematic_Mysensors-Gateway-RS485-NRF24_Mysensors-Gateway-RS485_20180820081448.png

      with my test skit no problem it works with the same component on the PCB the only thing weird is that the NODE sends much info on the RS485 but not the gateway

      I will try to reverse the turntables and sketches to see if it is not an arduino problem or not

      posted in Bug Reports
      Philippe 57
      Philippe 57
    • RE: [SOLVED] Gateway RS485

      I use for each pcb arduino nano:

      1_1534687906716_bada1acd-ba4a-4f97-aab5-52bb40d45d92_1_0_1.png 0_1534687906715_6eb868f8-4ce4-4bd0-9830-c1e67170ef96_1_0_1.png

      posted in Bug Reports
      Philippe 57
      Philippe 57
    • RE: [SOLVED] Gateway RS485

      here is my test sketch:

      Master :

      #include <SoftwareSerial.h>
      
      int MAX485_Receiver_Output_PIN = 8;
      int MAX485_Driver_Input_PIN = 9;
      int MAX485_Driver_Output_Enable_PIN = 2;
      
      int debug_led = 13;
      
      SoftwareSerial software_serial (MAX485_Receiver_Output_PIN, MAX485_Driver_Input_PIN); // RX, TX
      
      void setup()
      {
        Serial.begin(115200); // begin hardware serial
        software_serial.begin(9600); // begin software serial
        
        pinMode(MAX485_Driver_Output_Enable_PIN, OUTPUT);
        digitalWrite(MAX485_Driver_Output_Enable_PIN, HIGH); // this disables Receiver Output Enable and enables Driver Output Enable
      }
      
      void loop()
      {
         byte to_send = 0; // declare the byte to be sent to the slaves though, init as 0
        int rate;
        
        while (true) 
        {
          // invert the byte to be sent
          if (to_send == 1) to_send = 0;
          else if (to_send == 0) to_send = 1; 
          
          Serial.print("Sending: ");
          Serial.println(to_send);
          
          digitalWrite(debug_led, to_send);
          
          rate = map(analogRead(5), 0, 1023, 0, 1000);
          
          software_serial.write(to_send); // send our byte out to the MAX485
          
          delay(rate);
        }
      }
      

      Slave :

      #include <SoftwareSerial.h>
      
      int MAX485_Receiver_Output_PIN = 8;
      int MAX485_Driver_Input_PIN = 9;
      int MAX485_Driver_Output_Enable_PIN = 2;
      
      int debug_led_PIN = 13; 
      
      SoftwareSerial software_serial (MAX485_Receiver_Output_PIN, MAX485_Driver_Input_PIN); // RX, TX
      
      void setup()
      {
        
        Serial.begin(115200); // begin hardware serial
        software_serial.begin(9600); // begin software serial
        
        pinMode(MAX485_Driver_Output_Enable_PIN, OUTPUT);
        digitalWrite(MAX485_Driver_Output_Enable_PIN, LOW);
        
        pinMode(debug_led_PIN, OUTPUT);
        
      }
      
      void loop() // run over and over
      {
        byte k;
        
        if (software_serial.available() > 0) // make sure there is something to read
        { 
          k = software_serial.read();// read in a single byte from the serial port 
          Serial.println(k);   
          digitalWrite(debug_led_PIN, k); 
        }
      }
      

      this skit makes it possible to blink the led 13 with a variation of the potentiometer which changes the delay of the blinking

      posted in Bug Reports
      Philippe 57
      Philippe 57
    • RE: [SOLVED] Gateway RS485

      after testing by putting the serial connections live (and well reversed the TX and RX) there is no communication between the node and the gateway while with my test sketch that function, CAUTION: I do not use the same library as mysensors:
      on mysensors we use : AltSoftSerial
      on my test sketch I use : SoftwareSerial

      no need to put the debug because it's the same as above

      posted in Bug Reports
      Philippe 57
      Philippe 57
    • RE: [SOLVED] Gateway RS485

      I try with another sketch for rs485 and my two arduino comunique well together with the same hardware configuration.

      did I notice the node sends many infos on the RS485 network (tested with a sketch snifer RS485) but the gateway send anything on the RS485 network

      if someone has already done mysensors on the RS485 thank you for sharing your skit to find what is wrong

      posted in Bug Reports
      Philippe 57
      Philippe 57