- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to serial print string via bluetooth device, there is only uart putchar option.
condition-
I am transmitting a word to bluetooth device via uart.
Synchronously I would like to receive a continuous string[size n] from the bluetooth device without any break from transmission data.
For eg. I transmit "hello" from psoc over uart
and would like to receive any string eg. "Apple"
what i get : helloAhellophellophellolhelloe..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
simple uart tranmit receive using psco 4 protype kit, trogh pins 7.0 for rx and 7.1 for tx. I receive data "HELLO" in my bluetooth device(HC05) terminal however receive data not showing up on serial window connected to com port of psoc.
#include <project.h>
#include "string.h"
int main()
{
CyGlobalIntEnable; /* Enable global interrupts. */
UART_Start();
char8 rxData;
//int i;
//Tx_Start();
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
for(;;)
{
UART_UartPutString("HELLO");
//Tx_PutString("H");
CyDelay(1000);
rxData = UART_UartGetChar();
if (rxData){
UART_UartPutChar(rxData);}
CyDelay(1000);
/* Place your application code here. */
}
}
/* [] END OF FILE */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems like you are sending the HELLO in a for loop.
You are only waiting to get a single char, not the complete string.
Either you can have a counter to wait until all the char is received or to check for a special character as end of string.
Thanks
JOBIN GT