lappenkaese 0 Posted May 20, 2016 Share Posted May 20, 2016 Thanks, RobertWoodruff Now I get it, there is indeed only one UART on MSP430G2553... As I cannot use CSS (no linux support for Launchpad), I have to configure HC05 blind via AT commands (I tried using your code for this). Thing is, I cannot get HC05 to even broadcast a bluetooth device I am totally stuck, as I have never worked with bluetooth before. Maybe I am missing something fundamentally? Edit: Maybe I should configure HC05 via USB to TTL converter first and then check if it is working - thing is, the converter is at my parent's and I cannot get it for a whole week - at least Quote Link to post Share on other sites
RobertWoodruff 7 Posted May 22, 2016 Author Share Posted May 22, 2016 The only way I could figure how to develop the code to interface Launchpad (with single UART MCU) and HC-05 was to download and use CSS on Windows. Otherwise there is just not an effective way to debug what is happening between the MCU and HC-05. Now with all that plumbing in place it is impressive what can be accomplished with the MCU as a control processor and the HC-05 as the means of external communication with the controller. (We are also building an Android app as the human interface to the control system. The Android communicates to the MCU via the BT connection). Try to get CSS on Windows if you can, my recommendation. Quote Link to post Share on other sites
lappenkaese 0 Posted May 22, 2016 Share Posted May 22, 2016 Many thanks for your help. I set up a VM with Win7 and got CCS6 running. Thing is, when I do as you did and flash your code I cannot see any "OK" output from debugger on RX. It receives stuff, but only like '0x0A' and stuff. How do you monitor RX exactly? And by doing so, you have Jumpers J3 (RX+TX) pulled, right? Quote Link to post Share on other sites
RobertWoodruff 7 Posted June 2, 2016 Author Share Posted June 2, 2016 RX can be monitored by watching, with the CSS debugger, what characters are coming in from the UART interrupts being placed in the "ring_buffer" (HardwareSerial.cpp in Energia). They can also be reliably seen by watching, again with the debugger, the traffic to your serialEvent routine. It is a little tricky because the debugger sort of interferes with the ISRs used to capture the RX traffic. /** From BT device on UART*/void serialEvent(void) { while(Serial.available()) { int cInt = Serial.read(); /* fetch next char from the UART buffer */ command.addChar(cInt); if (command.commandIsAvailable()) /* Call the command processor */ commandProcessor.processCommand(command); }} Hopefully this helps, at least a little bit 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.