Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Bluetooth serial port communication between e72 and a bluetooth module
QtWS25 Last Chance

Bluetooth serial port communication between e72 and a bluetooth module

Scheduled Pinned Locked Moved Mobile and Embedded
24 Posts 2 Posters 11.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • - Offline
    - Offline
    -pZq-
    wrote on last edited by
    #1

    Hi,

    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.

    First:
    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.

    Br.
    pZq

    Br.
    pZq

    1 Reply Last reply
    0
    • - Offline
      - Offline
      -pZq-
      wrote on last edited by
      #2

      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:
      "Hyperterminal":http://blog.nerdstogeeks.com/2009/06/hyper-terminal-for-vista-and-windows-7.html

      Still i need the help with the s60 5th edition coding through qt creator or what ever to create the E72 Software.

      Br.
      pZq

      1 Reply Last reply
      0
      • F Offline
        F Offline
        favoritas37
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • - Offline
          - Offline
          -pZq-
          wrote on last edited by
          #4

          Hi,

          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 ?

          Br
          -pZq-

          Br.
          pZq

          1 Reply Last reply
          0
          • F Offline
            F Offline
            favoritas37
            wrote on last edited by
            #5

            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).

            :)

            1 Reply Last reply
            0
            • - Offline
              - Offline
              -pZq-
              wrote on last edited by
              #6

              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.

              Br.
              pZq

              1 Reply Last reply
              0
              • F Offline
                F Offline
                favoritas37
                wrote on last edited by
                #7

                You are always welcomed.

                1 Reply Last reply
                0
                • - Offline
                  - Offline
                  -pZq-
                  wrote on last edited by
                  #8

                  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 ?

                  Br.
                  pZq

                  1 Reply Last reply
                  0
                  • - Offline
                    - Offline
                    -pZq-
                    wrote on last edited by
                    #9

                    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

                    Br.
                    pZq

                    1 Reply Last reply
                    0
                    • - Offline
                      - Offline
                      -pZq-
                      wrote on last edited by
                      #10

                      oh c.r.ap!
                      -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 ?

                      Br.
                      pZq

                      1 Reply Last reply
                      0
                      • F Offline
                        F Offline
                        favoritas37
                        wrote on last edited by
                        #11

                        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.

                        1. Connect the mobile to your pc. Using Nokia Suite double click the QuteMessenger and it will initiate the installation.

                        2. 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.

                        1 Reply Last reply
                        0
                        • - Offline
                          - Offline
                          -pZq-
                          wrote on last edited by
                          #12

                          ok, thanks.

                          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 ?

                          Br.
                          pZq

                          1 Reply Last reply
                          0
                          • - Offline
                            - Offline
                            -pZq-
                            wrote on last edited by
                            #13

                            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

                            Br.
                            pZq

                            1 Reply Last reply
                            0
                            • F Offline
                              F Offline
                              favoritas37
                              wrote on last edited by
                              #14

                              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.

                              1 Reply Last reply
                              0
                              • - Offline
                                - Offline
                                -pZq-
                                wrote on last edited by
                                #15

                                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.

                                Br.
                                pZq

                                1 Reply Last reply
                                0
                                • - Offline
                                  - Offline
                                  -pZq-
                                  wrote on last edited by
                                  #16

                                  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.

                                  Br.
                                  pZq

                                  1 Reply Last reply
                                  0
                                  • F Offline
                                    F Offline
                                    favoritas37
                                    wrote on last edited by
                                    #17

                                    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.

                                    1 Reply Last reply
                                    0
                                    • - Offline
                                      - Offline
                                      -pZq-
                                      wrote on last edited by
                                      #18

                                      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 !

                                      Br.
                                      pZq

                                      1 Reply Last reply
                                      0
                                      • - Offline
                                        - Offline
                                        -pZq-
                                        wrote on last edited by
                                        #19

                                        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

                                        Br.
                                        pZq

                                        1 Reply Last reply
                                        0
                                        • - Offline
                                          - Offline
                                          -pZq-
                                          wrote on last edited by
                                          #20

                                          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

                                          Br.
                                          pZq

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved