Sensebender Micro as gateway on raspberry pi



  • Hello,

    I want to use the sensebender micro as a Gateway on the raspberry pi.
    I have connected the rx and tx line directly to the I/Os of the raspberry and also the 3.3V for the power.

    In the controller I can connect to the gateway and receive data, but when I trie to send a value, nothing is send out.
    Also assigning an ID to a new sensor fails.

    It seems that the transmission from the raspberry to the sensebender is not working.

    Does anybody have an idea how to solve this?



  • Did nobody use the internal serial connection of the raspberry pi?


  • Admin

    I think you might be the first! Most people use USB serial connection.



  • @gloob

    I use it, but with one ATmega connected internally. If you have everything connected correctly, TX to RX and RX to TX, maybe you need to add the port /dev/ttyAMA0 to your controller.
    I use Openhab, and for this one, you have to add "-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0 " on start.sh before the line with ".jar".



  • Lower the speed from 115200 to 19200, 9600 or similar. The frequency of the arduino is not able to match 115200 baud exactly, so the arduino and rpi are mis-communicating.

    From another thread; http://wormfood.net/avrbaudcalc.php?postclock=8&hidetables=1

    Solved it for me.



  • Yes, it's about the baud rate. 38400 works for me, and I even made a pull request (not yet merged, though): https://github.com/mysensors/Arduino/pull/391

    Recent Domoticz beta's also have a feature to select the baud rate for MySensors serial gateway (default 115200, 38400 as an alternative). This of course needs to match with the baud rate on the gateway itself.



  • @Stric
    Good to know! I don't have this kind of problem because I use a Atmega328 with external 16MHz clock. The Sensebender Micro uses internal clock and run as low as 1MHz, so there is your problem.


Log in to reply
 

Suggested Topics

  • 1
  • 3
  • 6
  • 1
  • 2
  • 1

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts