I'm developing a multi-part solution that consists of an iOS application and OS X application which communicate over Bluetooth Low Energy. Everything works fine and I can send moderate amounts of text between the iPhone and my MacBook. I would like to be able to send larger amounts of data, such as an image, from the iPhone to the MacBook. I'm able to do this but it takes about 50 minutes for the transfer of 1 image, compressed as a JPEG with a 0.2 quality (on a scale of 0-1). Part of the problem is that in the iOS application when the central connects, it reports an maximum packet length of 20 bytes (plus 3 bytes for header). In iOS 7, the changed the MTU so it's not a hardcoded 23 bytes. I cannot find anywhere that would allow me to specify a higher MTU on my MacBook or in the IOBluetooth framework.

I found a constant value in one of the bluetooth header files in the framework that specifies the MTU as 23 (20 + 3 for header), which leads me to believe this is just something hard coded into the framework that should be able to be changed somehow.

An alternative would be to use BLE to negotiate some other form of transfer between the systems. Ultimately, the transfer shouldn't be required to go over the Internet (the way Bump does it) but if a direct WIFI or Bluetooth connection could be used without requiring any user configuration, that would work.

  • 1
    MTU is defined in the link level by the bluetooth standard, and BT is designed to be low bandwidth (80kb/s-2Mb/s) anyway – ratchet freak Nov 21 '13 at 2:06
  • Even at 2Mbps it should take a couple of seconds to transfer a high resolution photo... not 50 minutes to transfer a low resolution one. The adapter I have says it's capable of 3Mbps. The application is to allow a user to walk up to a kiosk and send a photo to it from their device. Similar to how Bump works except that Bump sends the data to their servers on the Internet and then back down to the destination even if the devices are only a foot apart. The kiosk may not have an Internet connection. – Dewey Vozel Nov 21 '13 at 13:03
  • 4
    I'm voting to close this question as off-topic because it is about hardware configuration and network settings. – GlenH7 Mar 8 '15 at 0:13
  • 1
    I vote that you're crazy :) I'm not working on this project anymore, but I stand behind the question being a programming question. Just because a program interfaces with hardware doesn't mean it's not a program. – Dewey Vozel Mar 9 '15 at 12:23

BLE max datarate limits you to your 23 packet size. you need to change to Standard bluetooth to get the 2Mbps datarates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.