Repost: Serial.begin() not working as expected…

Home Forums Hardware Freakduino Repost: Serial.begin() not working as expected…

This topic contains 2 replies, has 1 voice, and was last updated by  akiba September 11, 2017 at 2:42 pm.

  • Author
    Posts
  • #477

    akiba
    Keymaster

    [Reposted from old forum]
    Greetings,
    I’ve worked with Arduino type gear for quite some time but I’m feeling like a super noob here. Firing up my very first Freekduino has been a blast, but Serial.begin(115200) is initializing the serial port at 57600 instead. Trying other baud rates gets even weirder results that follows no discernible pattern that I can find yet.

    Edit: I should add that I’m running Arduino 1.0.5 on OSX 10.6.8 to compile and upload sketches.

    My first sketch I’ve tried to run on my Freekduino is this one for use with WSBridge (channel hopping variant of chibi_ex09_wsbridge):
    https://github.com/ninebit/zigbee-surf/ … e-surf.pde

    After some debugging to find out why Wireshark was not getting any packets I finally found that I’m getting 57600 out of the serial port of my Freekduino. For now I just recompiled WSBridge to expect 57600 and things work great, Wireshark is getting packets at this point. But ultimately I’d like to figure out what the heck is up here.

    BTW, thanks again so much for making this hardware and software available.

    • This topic was modified 1 year, 5 months ago by  akiba.
    • This topic was modified 1 year, 5 months ago by  akiba.

    Akiba
    FreakLabs Open Source Wireless
    Twitter: @freaklabs
    Facebook: https://www.facebook.com/freaklabswireless

  • #478

    akiba
    Keymaster

    Lol, problem solved, classic RTFM. I looked at the chip and saw it was an ATMega328, ignored the fact that the crystal is 8MHz. Choosing “Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ATMega328” in the Arduino IDE resolved my problem.

    Akiba
    FreakLabs Open Source Wireless
    Twitter: @freaklabs
    Facebook: https://www.facebook.com/freaklabswireless

  • #480

    akiba
    Keymaster

    You can use the current board definitions and select the Freakduino board from the Tools/Board menu. That should give you the correct settings.

    Akiba
    FreakLabs Open Source Wireless
    Twitter: @freaklabs
    Facebook: https://www.facebook.com/freaklabswireless

You must be logged in to reply to this topic.