[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?
-
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.
-
@allysmith Please check if you use the right MCU frequency.
-
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,Ally
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login