SerialGateway print garbage [ Clue added! ]



  • Hello,

    I'm trying to setup a simple SerialGateway, using the following components:

    • Arduino Pro Mini (3.3V, 8MHz)
    • nRF 24L01+
    • USB 2 TTL from icstation.com

    But the serial output only print garbage strings, like

    p{p{s{p{qt{‡ÁôÅ÷Áù@óôÁòôõð@ÃÏÍðÌÅôÅN
    p{p{s{p{y{òÅÁÄz@ruuMruuMp@ó}ruuLÃ}sLô}sLðô}pLÌ}pz
    ruu{ruu{s{p{s{
    p{p{s{p{y{òÅÁÄz@ruuMruuMp@ó}ruuLÃ}sLô}sLðô}pLÌ}pz
    ruu{ruu{s{p{s{
    p{p{s{p{y{òÅÁÄz@ruuMruuMp@ó}ruuLÃ}sLô}sLðô}pLÌ}pz
    ruu{ruu{s{p{s{

    When I add another Arduino Uno with some sensor, it seems both are communicating. The sensor serial debug gives correct logs like:

    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
    read: 255-1-0 s=255,c=3,t=3,pt=0,l=0:
    Nb Sensors = 1
    Temperature = 25.10
    req node id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
    read: 255-1-0 s=255,c=3,t=3,pt=0,l=0:
    Nb Sensors = 1
    Temperature = 25.00
    req node id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
    read: 255-1-0 s=255,c=3,t=3,pt=0,l=0:

    What could be the issue with my gateway? Both are 115200 bauds.

    Please note that I'm a noob in both MySensors & Arduino :)


  • Hero Member

    Could it be your USB2TTL is not wired correctly?

    Mine looks (not wired):

    USB2TTL.jpg

    If so, you will have to make a connection between the 3.3V pad and the middle pad.



  • Thanks for your comment.

    Mine is this one : http://www.icstation.com/product_info.php?products_id=1393

    Actually, I think all my wires are correct, because everything (sending temperature data from an arduino to another and logging through serial port) is working fine when I use "simpler" code, mixing Dallas and nRF24L01+ libraries.

    I only have this behavior when trying to use MySensors code.



  • Update: New clue!

    Actually, everything works fine if I decrease the baud rate to 9600 in MySensor.h (but not higher !).

    Could it be possible that I have an alimentation issue? Do I need a decoupling capacitor?


  • Hero Member

    Not 100% sure what you mean with "an alimentation issue" but apart from signal quality it could be also that the clocks of your gateway and computer are not matching.

    Does the Pro Mini have a Xtal or is it running from the internal oscillator?


Log in to reply
 

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