Serial Gateway freezes on Raspberry Pi's USB Port



  • Hi,

    I have an Arduino Pro Mini (3.3V) connected to an NRF24l01 acting as my Serial Gateway. As a first sensor I use the same configuration with a DHT22 attached to it. And it all works fine, as long as the Gateway is connected to my MacBooks USB port (via an FTDI board btw.)
    However, I connected the gateway to my Raspberry to test it there and the gateway hangs after:

    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSM:RADIO:OK
    0;255;3;0;9;TSM:GW MODE
    0;255;3;0;9;TSM:READY
    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;18;2.0.0
    0;255;3;0;9;No registration required
    0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
    

    Not even something like a SANCHK:OK, which I would expect. Even stranger: The sensors debug output seems ok:

    TSP:MSG:SEND 105-105-0-0 s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=ok:23.9
    T: 23.90
    

    From st=ok I figure the sensor believes the gateway ACKed its message? Then why doesn't it print the received message?

    I suspected power issues, since the USB supply should be the only thing different compared to the macbook, so soldered in a capacitor, but still no luck šŸ˜ž


    Log in to reply
     


  • Solved it using a direct serial connection. Maybe my FTDI Board is bogus.



  • Hi Andre, I'm about to build a serial GW for my controller (Rasp Pi 3 running the latest build of Domoticz). I'm a little confused how the GW will practically interface with my controller however. Do i just plug the GW into one of my RPi's USB ports?? Is it as simple as that? Thanks for answering my "newbie" questions!!



  • Hi!

    The serial Port on the current Raspberry Pi 3 is on Pins 8/10. That is the big row of pins on the board. With the current Raspbian you have to first add enable_uart=1 to the cmdline in /boot/config.txt.
    After a reboot /dev/ttyS0 becomes available. You need to disable getty on /dev/ttyS0 using systemctl mask serial-getty@ttyAMA0.service. Otherwise, it will interfere with communication between your gateway and the Pi.

    When set up properly, the serial interface can be checked for data using terminal software such as picocom or minicom (seriously, use picocom ;)).



  • Thank you! That's helpful. When i get some more hardware in the mail I'll test it out.


Log in to reply
 

2 out of 5

Suggested Topics

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts