Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
sebastiengS

sebastieng

@sebastieng
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • RS485 transmit errors
    sebastiengS sebastieng

    FYI, I have found my error

    The description of my setup was not totally correct, I don't use an arduino but a atmega328p standalone.
    The root cause was the use of the internal oscillator, it is not enough accurate. I am now using an external quarz and it is working fine

    Troubleshooting

  • RS485 transmit errors
    sebastiengS sebastieng

    Hello,

    I am trying to setup a RS485 gateway on a raspberry with an arduino node.

    Raspberry gateway is build with

    ./configure  --my-gateway=ethernet --my-port=8011 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyAMA0 --my-rs485-de-pin=37
    

    The arduino sketch is configured with

    #define MY_DEBUG
    #define MY_RS485
    
    #define MY_RS485_DE_PIN 2
    
    #define MY_RS485_BAUD_RATE 9600
    #define MY_BAUD_RATE 9600
    #define MY_NODE_ID 2
    

    On each RS485 I have a 120 ohm resistor. The arduino and the raspberry are very close so the wires are short

    The parent request from the node to the gateway fails. I have added extra logging on each side, and I see following issue

    • the parent request is received by the gateway
    • but the response to the node is corrupted.

    The gateway write following bytes

    • 1 -> SOH
    • 2 -> destination node
    • 0 -> source address
    • 88 -> command
    • 8 -> message length
    • 2 -> STX

    The node receives

    • 1 -> SOH
    • 65534-> destination node -> ERROR
    • 0 -> source address
    • 65496-> command-> ERROR
    • 8 -> message length
    • 2 -> STX

    As you can see some bits are corrupted
    Expected destination node =2 (in binary 0000 0000 0000 0010), while we received 65534 (in binary 1111 1111 1111 1110). The leading bits are 1 instead of 0
    Same issue about command byte.
    It is 100% reproductible, this message is always received with same values so I don't think it is caused by noise or something like that.

    Any idea about the root cause?

    Troubleshooting
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular