|
|
08-24-2011
, 08:07 AM
|
|
Posts: 358 |
Thanked: 485 times |
Joined on Jan 2009
|
#2
|
| The Following User Says Thank You to jackburton For This Useful Post: | ||
|
|
08-24-2011
, 09:30 AM
|
|
|
Posts: 74 |
Thanked: 45 times |
Joined on Apr 2010
@ Italy
|
#3
|

| The Following User Says Thank You to djdas For This Useful Post: | ||
![]() |
| Thread Tools | Search this Thread |
|
I faced a problem when implementing bluetooth serial port to my N900. I managed to bind the serial port to rfcomm0, but when i open and write something, the data is physically transmitted after i close the file. Any idea how to send the data directly as soon as possible? Thanks in advance.
here is my code.
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindow)
{
rfcomm = fopen("/dev/rfcomm0","a");
ui->setupUi(this);
}
void MainWindow:
{
fputc('H',rfcomm); // no data transmitted
}
MainWindow::~MainWindow()
{ fclose(rfcomm); // all accumulated data is transmitted after i call this routine
delete ui;
}