×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    12

    Question sending data over Bluetooth: problematic if data size exceeds some Kilobytes !!??

    Hi All,
    I am working on the following: I have a microcontroller and a Nokia N70 mobile phone that communicate with each other over virtual COM port (phone: SPP). I send from the phone a command that is executed by the microcontroller and i get the textual result. This works fine. I have also implemented rotuines for sending/receiving files from phone to MC and vice versa. Sending files from phone to MC works very fine with files of nearly any size. On the other side there is a strange problem when trying to receive (file) data from MC. If data size exceeds some few kilobytes (according to my tests less or more 5 or 6 kbytes), the phone application hangs and blocks !? Receiving small files up to 2-3 kbytes works fine. When using another communication programm written for a notebook i receive the entire file of any size --> it is a nokia problem.... I have heard and read that some Nokia phone have this problem? Has anyone had these problems? Are there good workarounds?

    PS: I open a FileConnection for SPP profie and then using "openOutputStream" and "openInputStream". As i said i can communicate very well and even send data files, BUT receiving relativ big data sizes makes problems!!!!???


    PPS: I read data bytewise with "myInputStream.read()" and write the read byte
    directly to file. I do this in a loop until file content (i get file size at the very beginning) is read.


    I am thankful for every help.....


    Best regards,
    Huss
    Last edited by huss81; 2008-06-11 at 23:30.

  2. #2
    Registered User
    Join Date
    May 2008
    Posts
    12

    Re: sending data over Bluetooth: problematic if data size exceeds some Kilobytes !!??

    Hi,

    The problem is solved :-). It seems that receiving relatively big amount of data all at once "freezes" the bluetooth protocol stack. I changed my file transfer routines such that after each 512 bytes of data the receiver acknowledges the sender with a "CONTINUE_FILE_TRANSMISSION"-Signal (1Byte). After that the sender proceeds his work. I can know send and receive files of nearly any
    size. I hope this might help some one who is having the same problem...



    Bye,
    Huss

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: sending data over Bluetooth: problematic if data size exceeds some Kilobytes !!??

    Hi,
    From stack we can ask maximum supported length and then it can be acted accordingly, see in BT_Sock.H following items.
    KL2CAPGetMaxOutboundMTU,
    KL2CAPGetMaxInboundMTU,

  4. #4
    Registered User
    Join Date
    May 2008
    Posts
    12

    Re: sending data over Bluetooth: problematic if data size exceeds some Kilobytes !!??

    Hi,
    first thanks for your suggestion, but i am writing my phone application in java.. Is there an equivalent class/interface which
    provide this info...



    Best regards,
    Huss

  5. #5
    Registered User
    Join Date
    Jul 2005
    Posts
    190

    Exclamation Re: sending data over Bluetooth: problematic if data size exceeds some Kilobytes !!??

    Quote Originally Posted by huss81 View Post
    Hi,
    first thanks for your suggestion, but i am writing my phone application in java.. Is there an equivalent class/interface which
    provide this info...



    Best regards,
    Huss
    Huss huss huss, Can you please guide me through sending data from Nokia N70 to a microcontroller using bluetooth.

  6. #6
    Registered User
    Join Date
    May 2008
    Posts
    12

    Re: sending data over Bluetooth: problematic if data size exceeds some Kilobytes !!??

    Hi,
    In order to communicate with your MC over Bluetooth, your MC must have obviously a Bluetooth modul. I use in my project the "Bluenicecomm3" modul that is directly wired (hardware) to the pins of one of the UARTs of my MC. This is useful as all what you need to do in your application running on MC is to program the proper Interrupt Service Routine for the corresponding UART where you simply can read the data received over Bluetooth. Sending data is as simple. When this is available you need to use the Java ME Bluetooth classes and interfaces to connect and send/receive data to/from MC. Clarifying what exactly is to be done is difficult to post here. Hava a look at the classes and interfaces in the java package "javax.bluetooth.*". If you then have further precise questins i can help...


    Huss

  7. #7
    Registered User
    Join Date
    Jul 2005
    Posts
    190

    Exclamation Re: sending data over Bluetooth: problematic if data size exceeds some Kilobytes !!??

    Quote Originally Posted by huss81 View Post
    Hi,
    In order to communicate with your MC over Bluetooth, your MC must have obviously a Bluetooth modul. I use in my project the "Bluenicecomm3" modul that is directly wired (hardware) to the pins of one of the UARTs of my MC. This is useful as all what you need to do in your application running on MC is to program the proper Interrupt Service Routine for the corresponding UART where you simply can read the data received over Bluetooth. Sending data is as simple. When this is available you need to use the Java ME Bluetooth classes and interfaces to connect and send/receive data to/from MC. Clarifying what exactly is to be done is difficult to post here. Hava a look at the classes and interfaces in the java package "javax.bluetooth.*". If you then have further precise questins i can help...


    Huss
    Can anyone help on Symbian part for IR communication.

  8. #8
    Registered User
    Join Date
    Jul 2008
    Posts
    1

    Re: sending data over Bluetooth: problematic if data size exceeds some Kilobytes !!??

    hiya huss,

    I am also trying to do some hing of similar nature and trying to send some data from micro controller using blue tooth. How ever my mc is reading from a serial data line. Any chances you can help me out wih that.

    Regards
    Syed

Similar Threads

  1. Sending large amounts of data via bluetooth
    By j1978 in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2004-01-12, 04:40
  2. 3650 data suite and Bluetooth
    By cpseddon in forum General Development Questions
    Replies: 0
    Last Post: 2003-04-21, 10:44
  3. 3650 PC Data Suite & Bluetooth
    By cpseddon in forum Symbian
    Replies: 0
    Last Post: 2003-04-19, 16:04
  4. Using Bluetooth to send data to a nokia 6310 and then sending it over http
    By studentproject in forum Bluetooth Technology
    Replies: 1
    Last Post: 2002-11-01, 09:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×