help for step by step wiring and configure a gateway with RS485 module and raspberry pi 3



  • hi friend can you help for wiring and configure a RS485 module with raspberrypi ?
    i have a raspberry gateway with rf24 ( /dev/ttyUSB020 ) but i also a wiring gateway side rf24. i want use other gpio for rs485 (difference rf24 gpio)also difference virtual port serial
    thank you :pray:



  • @b0rmann @marceloaqno
    my friends please help :(
    for wiring :
    MAX485 raspberry3
    VCC.....................5V
    GND...................GND
    RO.................UART(TX)
    DI.................UART(RX)
    DE-RE..................??

    so for configure:
    first remove this line?
    0_1486114959736_A.jpg
    2th add this lines?
    0_1486114995898_B.jpg
    3th

    git clone https://github.com/mysensors/MySensors.git --branch master
    
    cd MySensors
    
    ( change sketch of gateway? convert to rs485 gateway? )
    
    ./configure --my-gateway=serial --my-rs485-serial-port=/dev/ttyAMA0 --my-serial-baudrate=115200
    
    make
    
    sudo ./bin/mysgw -h
    
    sudo ./bin/mysgw -d
    
    sudo make install
    

    i have a folder for fr24 gateway .so can use other folder for rs485 gateway ? so i have 2 gateway on raspberry (with gpio and uart)?
    please help


  • Hardware Contributor

    i've not followed all the rpi stuff, so 'im not expert on this.. but is the Mysensors rs485 working on linux port? i'm not sure.

    Then, on which serial port do you plan to use rs485 and nrf24? Mysensors can't do two transports layer on the same output.. at least for the moment. You would need to separate your 2 gateways on two differents serial ports.



  • @scalz
    thank you for answer
    now i use a raspberry gateway with nrf24 and a rs485 with usbport with arduino and in domoticz add 2 gateway (wireless and wire) and both work ! but i want use raspberry for rs485 without arduino. rf24 is using virtual ttyUSB020 and can i use AMA0 for uart and rs485 ?


  • Hardware Contributor

    oki. well i can't tell you if rs485 without arduino is working on rpi, but i don't think so..as far as i know only nrf24, rfm69 ported..



  • This post is deleted!


  • @scalz
    ok very thanks for answer :pray:
    but if will ok so this is very pretty , i dont have any problem with sensors with nrf24 but for relay with nrf and domoticz i have very error of nack... so this is a good solution. now i have all sensors (wireless) with nrf and i have relay (wiring) with rs485 . if can use uart for rs485 instead of usb port and without arduino so this is exellent.
    again thank you for answer


  • Code Contributor

    @Reza You need to set the transport to use the rs485:

    --my-transport=rs485
    


  • @Reza
    Remeber, that GPIO Uart on RPi3 is not ttyAMA0 like with RPi2( it is bluetooth now ).
    GPIO is ttyS0 on RPi3.

    http://raspberrypi.stackexchange.com/questions/45570/how-do-i-make-serial-work-on-the-raspberry-pi3

    Or read this thread too:
    https://forum.mysensors.org/topic/6015/serial-gateway-connect-problem-ttyama0



  • Thank you friends :pray:


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.