[SOLVED] Serial Gateway 2.3.1

  • I am trying to upgrade my dated mysensors system from 1.4 to 2.3.1. Starting by upgrading the working mysensors 1.4 serial gateway attached to a Openhabian Pi. The current baud rate used on the Openhab system for the serial gateway is 115200.

    When I compile the new gateway using the 2.3.1. sketch the baud rate seems to default to 74880. Arduino nano.

    Unfortunately 74880 baud does not seem to be accepted as a valid baud rate on the openhabian.

    Is there a way of setting the baud rate in the sketch??

    I have tried adding "#define MY_BAUD_RATE 115200" to the sketch, but this seems to have a strange effect. The baud rate of the serial output changes to 230400 baud.

    I found that by setting "#define MY_BAUD_RATE 57600" that the baud rate was then set to 115200. So I have got the device working but I am totally confused as to why it now works.

    Can anyone explain this or is there a possible bug?

  • @allysmith Please check if you use the right MCU frequency.

  • Mod

    What @rejoe2 said. You're probably programming a 16MHz device as if it was 8MHz. Common mistake with Pro Mini, but I haven't seen it with Nano.

  • @mfalkvidd You are absolutely correct. I was using wrong frequency.
    many thanks,


Log in to reply

Suggested Topics