Enable RS485 on Raspbian Stretch



  • I'm using Neuron with Raspbian Stretch image and I'm tring to work with serial 485 interface. I have enabled serial interface using raspi-config>Interfacing options>Enable Serial and than I have use those commands to disable console on interface

    sudo systemctl stop serial-getty@ttyS0.service
    sudo systemctl disable serial-getty@ttyS0.service
    

    I have also removed the console from the cmdline.txt by removing the line: console=serial0,115200 :

    sudo nano /boot/cmdline.txt
    

    After reboot I can connect to the serial interface using node-red but when I try to read values I receive a timeout. What should I do to make it work?



  • @roberts_lando

    hi
    have you disable BT ?
    i have same problems whit the serial console to the gsm modem.
    i have fixed whit edit the /boot/config.txt and add

    dtoverlay=pi3-disable-bt
    

    Pi 3 and stretch have problems whit bt and serial

    Regards



  • @unix I have tried that overlay and also I have tried pi3-miniuart-bt but it doesn't work with my Unipi Neuron S103-G. I have use this tutorial: https://spellfoundry.com/2016/05/29/configuring-gpio-serial-port-raspbian-jessie-including-pi-3/


  • administrators

    Hello everyone, if you use the UniPian image, than the RS485 is available in /dev/extcomm/0/0 (symlink to /dev/pts...). You do not need to do anything with the RPi UART interface.

    If you have your own image, than the neuron_tcp_server is taking care of the RS485 (so the neuron tcp server must be running) but the port configuration has to be done using the Modbus registers (as described in the Modbus maps).