Shop OBEX P1 Docs P2 Docs Learn Events
Changing NVS UART Speed of Easy Bluetooth Module — Parallax Forums

Changing NVS UART Speed of Easy Bluetooth Module

Fritz007Fritz007 Posts: 2
edited 2011-11-20 02:51 in Accessories
Hello,

I'm using the easy bluetooth module in a project but not with parallax but with Arduino. Now I got the 2 talking and everything is working but at a default baud of 9600 (kinda slow). So my question is how can i change the baud rate? I did try the following:
  1. In my program on the arduino setting the baud to 57600 (Serial1.begin(57600);)
  2. Also setting my terminal vieuwer to the same baud rate
  3. Im on windows 7 and also there i change the buad rate for the COM port the bluetooth module is using.
I've read the User manual and i can clearly see there are some opcodes to change stuff, but im working with arduino and that not in basic stamp (more in AVR-C++, reason why i bought it).

So can anyone help me ?

Thanks!

Comments

  • Fritz007Fritz007 Posts: 2
    edited 2011-11-20 02:51
    I tryed some stuff, and i came up with the following code:
    Serial1.begin(9600);delay(2000);
    Serial1.write(2); //send STX
    delay(200);
    Serial1.write(52); //request REQ
    delay(200);
    Serial1.write(23); // CHANGE_NVS_UART_SPEED
    delay(200);
    long datalength = 1;
    Serial1.write(datalength << 0); // Datalength 1
    delay(200);
    Serial1.write(datalength << 1); // datalength
    delay(200);
    byte checksum = 52 + 23 + (datalength << 0) + (datalength << 1);
    Serial1.write(checksum); //checksum: 0x52 + 0x23 + 0x01
    delay(200);
    Serial1.write(07); // UART speed 115200
    delay(200);
    Serial1.write(03); // end delimiter ETX

    Is this wrong or not? I get a responce "N4" back when i listen to the serial port on my computer...
Sign In or Register to comment.