Tomas90 0 Posted March 18, 2014 Share Posted March 18, 2014 Hello, I'm currently working on a project involving G2553 MCU and Sparkfun Bluesmirf Silver BT module. I'm programming my MCU using the MSP430 Launchpad as a programmer and Energia IDE. I'm trying to configure the Bluetooth module using the firmware that I upload to the MCU. I connected the MCU's hardware UART pins to the Bluesmirf pins. Pin 1.1 (HW RX) to the module's RX and vice versa. I supply the same voltage to the MCU and the module (supply voltage connected to the breadboard from the Launchpad itself, multimeter shows values at around 3.5V). Bluesmirf's datasheet says the Vcc should be between 3.3V and 6V. My code looks like this: void setup() { Serial.begin(9600); initBTModule(); delay(delayReset); pinMode(RED_LED, OUTPUT); } void loop() { digitalWrite(RED_LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(2000); // wait for a second digitalWrite(RED_LED, LOW); // turn the LED off by making the voltage LOW delay(2000); // wait for a second } // Sets up the Sparkfun Bluesmirf Silver Bluetooth module void initBTModule() { delay(2000); sendUART("$$$"); // enter command mode delay(200); sendUART("SN,Kanarek0000\n"); // set name of the device delay(200); sendUART("SP,kanarek0000\n"); // set security PIN code delay(200); sendUART("SU,96\n"); // set baud rate to 9600 delay(200); sendUART("R,1\n"); // reset device for changes to take effect delay(3000); } // Sends a char sequence using the hardware UART // pin 1.1 RX // pin 1.2 TX void sendUART(char msg[]) { Serial.print(msg); delay(3000); } After I upload the code however, nothing happens. After entering the Bluesmirf's command mode ($$$) it's power LED should start blinking rapidly, but it doesen't. When I tried with Arduino UNO and entering the commands manualy using the Serial Monitor (loop was constantly waiting for serial communication), It worked (With Arduino I was using the Software Serial however). I don't know if there is a problem with the AT commands or the code. Any help will be greatly appretiated! Thanks! Quote Link to post Share on other sites
xyiii 0 Posted February 13, 2015 Share Posted February 13, 2015 Hello, I'm currently working on a project involving G2553 MCU and Sparkfun Bluesmirf Silver BT module. I'm programming my MCU using the MSP430 Launchpad as a programmer and Energia IDE. I'm trying to configure the Bluetooth module using the firmware that I upload to the MCU. I connected the MCU's hardware UART pins to the Bluesmirf pins. Pin 1.1 (HW RX) to the module's RX and vice versa. I supply the same voltage to the MCU and the module (supply voltage connected to the breadboard from the Launchpad itself, multimeter shows values at around 3.5V). Bluesmirf's datasheet says the Vcc should be between 3.3V and 6V. My code looks like this: void setup() { Serial.begin(9600); initBTModule(); delay(delayReset); pinMode(RED_LED, OUTPUT); } void loop() { digitalWrite(RED_LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(2000); // wait for a second digitalWrite(RED_LED, LOW); // turn the LED off by making the voltage LOW delay(2000); // wait for a second } // Sets up the Sparkfun Bluesmirf Silver Bluetooth module void initBTModule() { delay(2000); sendUART("$$$"); // enter command mode delay(200); sendUART("SN,Kanarek0000\n"); // set name of the device delay(200); sendUART("SP,kanarek0000\n"); // set security PIN code delay(200); sendUART("SU,96\n"); // set baud rate to 9600 delay(200); sendUART("R,1\n"); // reset device for changes to take effect delay(3000); } // Sends a char sequence using the hardware UART // pin 1.1 RX // pin 1.2 TX void sendUART(char msg[]) { Serial.print(msg); delay(3000); } After I upload the code however, nothing happens. After entering the Bluesmirf's command mode ($$$) it's power LED should start blinking rapidly, but it doesen't. When I tried with Arduino UNO and entering the commands manualy using the Serial Monitor (loop was constantly waiting for serial communication), It worked (With Arduino I was using the Software Serial however). I don't know if there is a problem with the AT commands or the code. Any help will be greatly appretiated! Thanks! Did you get it to work??? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.