arcon19 1 Posted March 11, 2016 Share Posted March 11, 2016 Hello, So I'm currently trying to setup and interface with an HM-11 Bluetooth Module and i currently cant receive any response from the module. I basically just want pass data between two of these modules using these two with one set as a master and another as a slave. Unfortunately I cannot even send AT commands and receive responses confirming that the setup is correct. Quote Link to post Share on other sites
energia 484 Posted March 11, 2016 Share Posted March 11, 2016 W'll need a bit more info to help out. 1: Which LaunchPad are you using? 2: How/to what pins is the HM-11 connected? 3: Which version of Energia are you using? Robert Quote Link to post Share on other sites
arcon19 1 Posted March 12, 2016 Author Share Posted March 12, 2016 Hi there, Sorry about that, total noob here. 1. I am using the MSP430g2553 2. I have the RX(MSP430) to the TX of the HM-11 and vice versa 3. My current Energia version is 0101E0016 Here is a sample of my code #include <SoftwareSerial.h> SoftwareSerial mySerial(P1_1, P1_2); // RX, TX void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only } Serial.println("Hello world!"); // set the data rate for the SoftwareSerial port mySerial.begin(9600); // set master } void loop() { // run over and over // set the data rate for the SoftwareSerial port mySerial.print("test I am master "); if (mySerial.available()) { Serial.write(mySerial.read()); } if (Serial.available()) { mySerial.write(Serial.read()); Serial.println(Serial.read()); } } Here's a link to the AT commands https://www.seeedstudio.com/wiki/images/c/cd/Bluetooth4_en.pdf Heres a photo of the response I'm getting from AT https://imgur.com/yRmcqFH My baud is set to 9600 and I'm on COM3 My ultimate goal is to connect two hm-11s using two msp430g2553s and have them communicating and seeing the communication between the two via realterm, putty etc. Quote Link to post Share on other sites
dubnet 238 Posted March 13, 2016 Share Posted March 13, 2016 If you are using the G2 v1.5 Launchpad, have you rotated the RX and TX jumper 90 degrees? Also, I see that you are assigning software serial to the hardware serial port pins on the G2 Launchpad. Please see the example program for software serial in your Energia folder at: ....\energia-0101E0016\hardware\msp430\libraries\SoftwareSerial\examples\SoftwareSerialExample. The example assigns pins 1.4 and 1.3 for the software serial port. If you can you may also want to try some of the other Launchpad models that have two or more hardware serial ports (e.g. MSP430F5529, Tiva Launchpad or MSP432 Launchpad). 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.