kamalesh 0 Posted December 7, 2017 Share Posted December 7, 2017 I am using a MSP430FR2311 launch pad and i am trying to send AT commands through RX and TX to SIM800 and Receive Response from the SIM800 module. But am not able to get the response and not able to use SoftwareSerial in Energia for MSP boards. Can Anyone help with this problem ? Thank you in advance. #include <String.h> void setup() { pinMode(RED_LED , OUTPUT); Serial.begin(9600); //Serial.print(F("AT\r")); while(Serial.available()==0); val1 = Serial.readString(); Serial.print(val1); Serial.print("\r"); delay(100); } void loop(){ //do nothing if(Serial.available()) { String val2 = Serial.readString(); line += String(val2); Serial.print(line); if (line.indexOf("OK") >= 0) { digitalWrite(RED_LED,HIGH); } } } Since we cant use both the Debugging UART (Serial Monitor) and Application UART (TX and RX) at the same time , I am checking the received Response for the string "OK" . and if OK is there the RED led goes high. Quote Link to post Share on other sites
Rei Vilo 695 Posted December 7, 2017 Share Posted December 7, 2017 The MSP430FR2311 has only 4 kB of Flash / FRAM and 1 kB of RAM, and is not officially supported by Energia. The SoftwareSerial library may require more space. Go for a LaunchPad with more memory and officially supported by Energia. Quote Link to post Share on other sites
Rei Vilo 695 Posted December 7, 2017 Share Posted December 7, 2017 Please refer to 25 Functions for 25 Cents: Communication Functions. zeke 1 Quote Link to post Share on other sites
energia 484 Posted December 7, 2017 Share Posted December 7, 2017 The FR2311 only has one UART. To be able to use pins 3 and 4 with an external device you have to remove the RX/TX jumpers from the board. Note that you will not be able to both communicate with the SIM800 and do debug to the Serial terminal. Is there any specific reason to use the FR2311? If not, then I would suggest upgrading to a MSP-EXP430F5529LP LaunchPad: This LaunchPad has 2 serial interfaces. You can then use Serial.xyz for debugging and Seria1.xyz for communicating with the SIM800. 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.