Amp 0 Posted January 7, 2015 Share Posted January 7, 2015 EDIT: Original thread posted inappropriately in announcement forum. I can't see the option to delete that thread or move it, so I'm double-posting it here, and encouraging moderators to delete the original thread, and apologizing for my mistake. Hey guys, I'm having trouble getting an HC06 properly interfaced to my Tiva C Launchpad. The tl;dr version is that Transmitting from the Tiva (seems to) work as desired, but receiving from my Android phone using BlueTerm causes issues.I modified the qs-rgb example in TivaWare (Downloaded as of yesterday, but can't remember version number) to transmit via UART1, which I've connected to my HC06, instead of UART0.See attachment 1.png, the seemingly random string that is being echoed back to me is the result of trying to send "help<enter>" See the modified qs-rgb.c here: http://pastebin.com/aAp9vVqm EDIT: Fitting the whole file into the post made it way too long, I think. So Pastebin'd. I can re-edit the code back in if desired. Sending "z" or 0x7A is received by the UART as 0x00000170 before truncating it to a char-size 0x70. For completeness sake, I've compiled a list of characters and how they are received in memory. I typed "zxcvbnm" into Blueterm and these are the values that were receieved by the UART: 0x00000170 0x00000170 0x00000142 0x00000164 0x00000140 0x0000014C 0x00000148 If I've got my ASCII correct, this is what should have been received. 0xXXXXXX7A 0xXXXXXX78 0xXXXXXX63 0xXXXXXX76 0xXXXXXX62 0xXXXXXX6E 0xXXXXXX6D Anyone got any ideas what could be going wrong? Some of my initial research indicates that there might be a bug in TivaWare regarding the setting up of some clocks? How might I go about correcting that? Quote Link to post Share on other sites
Lyon 3 Posted January 8, 2015 Share Posted January 8, 2015 Hi, Please see this link: http://www.elecfreaks.com/wiki/index.php?title=Bluetooth_Bee#Programming It is stated that your device is/ has AT compatible protocol, so your commands should be prefixed by AT. The link has a test program written in Energia, you may try that. As for your code, while you claim starting with qs-rgb, your file is uart-stdio, which may be unsuitable for your purpose. Depending on ypur real application, you must make new software functions to include these AT commands. L 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.