Bluetooth serial port communication between e72 and a bluetooth module
i have a bluetooth stick module bought from mikroE.com. The stick claims to talk HCI or SPP.
i'm very new to this qt development and i would want to get some help with this.
Is there a simple way ?
Does someone have a ready example ?
Can i do this with Qbluetooth library only ?
The only thing i need for now is an application that for e.g. sends a "hello uController" when a button is pressed on e72 mobile phone and then my module responds with "hello mobile phone"
If i get this working. I can continue without help for quite long, i think :D
So please share your knowledge if you got some.
I have now a working link between pc and dspic (microcontroller) via Bluetooth.
I'm capturing the data sent from the dspic with hyperterminal and it really works.
Download hyperterminal for win7&Vista from:
Still i need the help with the s60 5th edition coding through qt creator or what ever to create the E72 Software.
First of all, E72 has S60 3rd FP2.
Now, since QBluetooth exists in Qt Mobility 1.2, this means (from what i know) that you can't use it on your platform because it is not supported.
What i can suggest is to use "QBluetoothZero":https://projects.forum.nokia.com/qbluetooth . It needs Qt 4.6.3 and newer and works on your platform. For more details please advise the project's wiki page. A project using it can be found in this wiki page: "QuteMessenger bluetooth chat":http://www.developer.nokia.com/Community/Wiki/QuteMessenger_-_Bluetooth_Chat. It uses SPP to exchange chat messages. Respectively, you will be able to send any data you want.
and thank you for your reply.
The QBluetoothZero was compiled yesterday but i have no clue why the libraries shall be compiled... It seemed just that the compilation moved some files into QT SDK folder.
I guess i have to find somewhere that S60 3rd edition FP2, since my QT creator came only with 5th edition and compile that QBluetoothZero to that environment ?
No no the QBluetoothZero is not mandatory to be compiled. In the home screen of the project's page you can download the binaries for Symbian. Then you can use the binaries directly by following the following wiki article: https://projects.developer.nokia.com/qbluetooth/wiki/binaries#Howtouse
Also, the QuteMessenger example that i mentioned uses those binaries as well.
So no you don't have to compile it, you are advised to use the binaries.
To your second question, yes you will compile your program for Symbian 5th but with Qt 4.6.3. The version of Qt is mandatory because Qt 4.7.3 can't be installed on S60 3rd! If you don't have Qt 4.6.3 installed then got the the Qt Maintenance tool (Qt Creator -> Help -> Start Updater -> Package Manager -> Development Tools -> Symbian Toolchains -> S60 5th ed. -> Qt 4.6.3 for Symbian).
Thank you very much for the post.
I will read that howto.
I will return latest when my intentional program is working to post how it was made but most likely i will return quite soon when i'm jammed with something.
You are always welcomed.
I'm back and stuck.
I cant select symbia 4.6.3 from dropdownlist of the compiler. Only 4.7.4 synbian anna is selectable (debug/release)
I have installed the 4.6.3 symbian compiler but i can't select it ?
To fast to write the last post. I found it. Let's continue.
It could be found in the projects sheet on the left hand side. => edit build configuration => add
-there is problems with device debugger. CODA won't work and the only way this document says is to install QT sdk 1.1.2 , then i can use TRK debugger.
I must try this tomorrow.
Even though, I can BUILD the qutemessenger withouth errors or warings, but how am i able to move the built application into my phone for testing purposes ?
Till you make TRK work you can do the installation manually. First you need to generate the QuteMessenger.sis installation file. That will be created if you press Run to your project regardless if CODA/TRK/etc works. That willl generate the installation file
Then there are several ways to do the manual installation.
Connect the mobile to your pc. Using Nokia Suite double click the QuteMessenger and it will initiate the installation.
Move the QuteMessenger.sis to your mobile either by connecting it by cable or by Bluetooth. Locate the file and initiate the installation through your mobile.
There is still a problem. I can't find the QT sdk 1.1.2 installation file. The document states that i cannot update my current 1.1.4 to 1.1.2, or i can but the TRK wont then work. So i need a clean QT SDK installed.
Didn't find it yesterday after 30min sailing on google. Maybe it can be installed in the QT creator installation custom installation mode ?
This is so hebrean (the coding of symbian apps)...
If i just could turn the qutemessenger to bind connection between PC and phone and then the text that is wirtten in inputbox would be sent to PC. Then i would party party!
i'll just have to bang my head against the table :P
All you have to do to achieve that is just to change the selected Serial Port Protocol (SPP) to the one used by your PC and you will be ready. Normally there are not that many SPP, actually most of the times only one so the first SPP that you discover through Service Discovery on the PC will propably work fine.
The problem is that even if i connect this quteapplication to the discovered bt-module or the pc, the q
utemessenger will not change into the chat mode. Maybe the qutemessenger waits for a confirmation from the server side before it switches to the chat mode.?
I can sometimes see the start chat option but when pressed, qutemessenger does nothing.
I found one interresting thing in the code => service name that i had not set on the bluetooth module.
I set the servicename to SPP and changed the expectedservicename as SPP in qutemessenger code.
I'll have to test this tomorrow.
I somehow assume that this Qutemessenger can not be paired with pc because in pc we also would need to set the servicename, and i have no clue how to set the service name on pc without a PC application...
I'll pass the result of how the matched servicenames worked, or if it didnt work.
The comparing between the service names was just to separate the multiple Serial Port Protocols and select the custom one we have created. Connecting to the PC of course is possible. As i said in a previous post of mine, to connect to the PC by Serial Port Profile you can as well ignore the comparing of the service names. Initiate a Service Discovery to the PC and the first SPP service that you will find, connect to it. That's all, no naming comparing or anything else.
Ok, i have still a little hard to find where the comparison of the services is made so that i remove the code lines (symbian or QT is new for me, 1 week experience) i'm gettin a little grip on it.
Is the comparison in qutemessenger.cpp or the clien.cpp file ?
Or is it even the code lines i just discovered => the exprectedServiceName codes ?
aaa. while asking question i found it :D
if (QString::compare(exprectedServiceName, serv.getName()) == 0) ...
I'll have to play around. This is so rewarding !
Thank you for help so far. I'm learning... close, but no cigar !
once i had it working with the BT module... Then i tried to get pc connection to work and later on with same settings, i couldn't get the connection to BT module any more. Always when the cell phone asks for the bt-module password => qutemessenger just quits.
Nerve wrecking, once and again. I have to sleep over the night and see bad dreams :P
Btw. I couldn't connect to PC, i tried to find a serial port protocol from the PC Bluetooth device, but found only the bluetooth serial modem or similar.
Well i don't really need the PC, but if i get it to work with pc, then it will work with the module and its more easy just play around with PC and mobile than its with playing with the BT module (which is for now a breadboard jungle).
If you happen to know how i can communicate PC with mobile (qutemessenger) just tell me.
When i turn on the bluetooth module (pc module) i have like 3 or 4 different comports available. Some are configurable, and some are not.
It seems that the qutemessenger is configuring the SPP protocol on a different way, because as i earlier said, i can connect diy BT module to talk with PC BT module. (even though i removed the comparison of service names).
If you are interrested in the PC <=> mobile communication, you could do a fast try comparing the untouched qutemessenger code and what you did to get it working on PC.
Well, maybe your not interested but just incase you would be :D