Can iphone bluetooth connect with android

Communicating between iOS and Android with Bluetooth LE

I’ve got a working app using CoreBluetooth to communicate between an iPad (central) and iPhone (peripheral). I have one service that has two characteristics. I have a Nexus 7 running the latest Android 4.3 with BTLE support. Android is a bit late to jump on the BTLE bandwagon but it appears they are approaching it similarly to how iOS did, where initially they only support acting as a central with the peripheral mode coming in a later version. I can load the sample Android BTLE app and browse for nearby peripherals. With my iPhone advertising as a peripheral I can see the value from CBAdvertisementDataLocalNameKey in the list of nearby peripherals on the Android side. I can connect to the iPhone and the Bluetooth symbol turns from light gray to black when the connection is made. The connection always lasts exactly 10 seconds and then disconnects. On the Android side I’m supposed to see a list of available services and characteristics appear immediately upon connection. I’ve proved the Android code is setup correctly because I can connnect it to the TI CC2541DK-SENSOR hardware that I have and all services and characteristics are listed upon connecting to it. I’ve spent the last few days troubleshooting the issue with no success. The problem is I can’t determine which device is experiencing an error and thus causing the disconnection. There are no callbacks from CBPeripheralManagerDelegate during the connection phase or service discovery phase so I have no idea at what point an error occurs (if the error is on the iOS side). On the Android side a method is called to initiate service discovery however their callback «onServicesDiscovered» is never called which is perplexing. Is there any way I can dig into the guts of the BTLE communication on the iOS side to see what’s going on and determine what error is taking place?

You should buy a BLE dongle and use TI’s packet sniffer solution: ti.com/tool/packet-sniffer What you mention sounds weird. Also, try this app: itunes.apple.com/tr/app/ble-utility/id606210918?mt=8 It makes it easy to simulate services on the i* device. If that succeeds, then the issue is most probably in your code. If that fails, then deeper inspection is required.

@allprog I downloaded the BLE Utility app as well as LightBlue, both apps experienced the same results as my custom app. I found another thread that links here: code.google.com/p/android/issues/… It appears as if this could be an low level implementation bug on the Android side, but it has yet to be confirmed.

I encountered the same issue, Nexus 4 on 4.3 connecting to iPhone 5 acting as peripheral using LightBlue. Could connect but device discovery never finished and would disconnect. Updated the Nexus 4 to 4.4 (Build number KRT16S) and connection and discovering services works. Was able to read and write characteristics as well.

Читайте также:  Блютуз наушники нокиа настроить

Источник

Transfer data between iOS and Android via Bluetooth?

I’ve been reading up on how to transfer data between iOS devices over Bluetooth using GameKit. I’m not writing a game, per se, but do have a need to transfer a small amount of binary data between two devices. Between two iOS devices, this is easy enough. However, I was wondering if it is possible to transfer data between an iOS device and an Android device via the same mechanism. Has anyone come across documentation/tutorial that would explain how to do this? Is it even technically possible? Or has Apple put in some sort of restriction that would prevent this? The other option I discovered was Bonjour over Bluetooth. Would this be a more suitable option for this type of operation?

I added the Bump API to my answer as it looks to be a very appealing way to implement data transfer for small payloads.

3 Answers 3

This question has been asked many times on this site and the definitive answer is: NO, you can’t connect an Android phone to an iPhone over Bluetooth, and YES Apple has restrictions that prevent this.

Some possible alternatives:

  1. Bonjour over WiFi, as you mentioned. However, I couldn’t find a comprehensive tutorial for it.
  2. Some internet based sync service, like Dropbox, Google Drive, Amazon S3. These usually have libraries for several platforms.
  3. Direct TCP/IP communication over sockets. (How to write a small (socket) server in iOS)
  4. Bluetooth Low Energy will be possible once the issues on the Android side are solved (Communicating between iOS and Android with Bluetooth LE)

Coolest alternative: use the Bump API. It has iOS and Android support and really easy to integrate. For small payloads this can be the most convenient solution.

Details on why you can’t connect an arbitrary device to the iPhone. iOS allows only some bluetooth profiles to be used without the Made For iPhone (MFi) certification (HPF, A2DP, MAP. ). The Serial Port Profile that you would require to implement the communication is bound to MFi membership. Membership to this program provides you to the MFi authentication module that has to be added to your hardware and takes care of authenticating the device towards the iPhone. Android phones don’t have this module, so even though the physical connection may be possible to build up, the authentication step will fail. iPhone to iPhone communication is possible as both ends are able to authenticate themselves.

Источник

Как перекинуть фото с iPhone на Android через Bluetooth: можно или нет?

WiFiGid

Всем привет! Сегодня я расскажу вам, как через блютуз передать с Айфона на Андроид фото, документы, файлы, видео и музыку, и можно ли вообще это сделать. И тут сразу встает проблема, так как прямым способом передать файлы по Bluetooth почти невозможно, как это можно спокойно сделать на том же Android.

Почему так происходит? Да потому что якобы компания Apple борется с пиратством. Они боятся, что вы будете перекидывать фильмы, музыку и файлы, которые по правами принадлежат не вам. Это официальный ответ яблочной компании. Но на деле же это обычное вранье.

Читайте также:  Asus n56jr bluetooth driver

Правда в том, что компания хочет, чтобы вы и ваши друзья, а также родные, близкие, соседи, друзья, собака и ваш кот – все покупали только устройства яблочной компании. Таким образом вы будете затянуты в закрытую экосистему, откуда уже не выбраться. Перекинуть те же фото можно с помощью AirDrop, которую поддерживают только продукты компании Apple. Передать фото конечно можно, но не по Bluetooth – об этом я коротко расскажу в статье ниже.

ПРИМЕЧАНИЕ! На самом деле можно конечно перекидывать все что угодно и через «Голубой зуб», но есть небольшой маленький нюанс – об этом смотрите последнюю главу этой статьи.

Передача фото

Так все же, как перекинуть фото на iPhone, не используя Bluetooth? Можно сделать это несколькими способами:

  • Если вы не хотите, чтобы фото сжималось, то проще всего сделать это по почте. Откройте галерею, далее нажмите по кнопке «Выбрать», выделите фотографии, которые вы хотите передать, нажмите на кнопку передачи и выберите из списка «Почту». Далее все просто, вводим почтовый ящик Google, который привязан к смартфону. И тут вы можете опять столкнуться с проблемой: при передаче фотографий реального размера, есть ограничение в 24 МБ (спасибо компания Apple). Так что, если у вас много фоток, придется разбивать передачу на несколько частей.

Как перекинуть фото с iPhone на Android через Bluetooth: можно или нет?

  • Следующий способ – это использовать приложение iCloud на Android. Вы скачиваете его с Google Play, запускаете, генерируете код на своем iPhone для подключения и авторизации. А уже потом скачиваете фото, но уже с облака.

Как перекинуть фото с iPhone на Android через Bluetooth: можно или нет?

  • Можно попробовать использовать облако из браузера. Открываем браузер на Андроид, заходим по ссылке – icloud.com . Авторизовываемся и скачиваем фото.

Как перекинуть фото с iPhone на Android через Bluetooth: можно или нет?

  • Можно использовать и любой мессенджер, но есть проблема – они все сжимают фотографии. Если вам этого достаточно, то просто отправьте фото в чат. Если вам нужно отправить картинку с полным разрешением и без сжатия, то лучше использовать Telegram. При отправке следует использовать отправку фотографии как файл и сжатия не будет.

Как перекинуть фото с iPhone на Android через Bluetooth: можно или нет?

  • SHAREit – специальное приложение, которое передает данные не по Bluetooth, а по Wi-Fi. Скачиваем оба приложения, сначала на iPhone, а потом на Android. Инструкцию можно посмотреть в видео ниже.

Передача файлов (игры, музыку, книги, документы)

И тут встает проблема открытости системы iOS. Тот же Android имеет открытую систему, поэтому вы спокойно можете работать с файлами, передавать их кому угодно. В iOS «из-за соображения безопасности» компания Apple закрыла доступ к файловой системе. Ах, да – конечно же еще из-за того, чтобы вы не стали пиратом, не катались на корабле, не пили ром, не кричали «Йо-хо-хо» и не перекидывали файлы, которые могут быть не вашими.

ПРИМЕЧАНИЕ! Перекинуть те же приложения через Блютуз можно, но работать они на Android не будут, из-за разности операционных систем.

И тут остается единственный способ – Jailbreak. Jailbreak – это по сути взлом системы iOS, при котором становится доступным файловая система. Также вам становится доступным магазин с дополнительным софтом Cydia. При взломе системы iPhone сразу выходит из гарантии. С другой стороны, если гарантия уже закончилась – то почему бы и нет?!

Там уже можно и файлы через Bluetooth скинуть, и музыку, и работать с документами. В общем все то, что есть в обычном Android. Про Jailbreak можете посмотреть видео ниже, а дальше решать только вам.

Читайте также:  Jbl колонка приложение блютуз

Источник

Is it possible to connect iOS and android device using Bluetooth?

Of what i understood, a Peripheral (Server) can Advertise to a Central (Client). This central is scanning around itself, and then try to find the Server by looking for the UUID of the service advertised.

When i make a Server on Android, it is waiting for a connection (listening), i know the UUID and the mac address of my Server. But when i scan with my iPhone (scanning for the same UUID of course), i can’t find the server.

  • So is there a possibility for the android server to advertise like the Peripheral on iOS?
  • Or maybe a possibility for my iPhone client to connect using the mac address of the server?

Which Android open-source framework are you using for BLE? Do you see it with your iPhone if your do not search for a restrictive list of peripheral? Since TexasInstruments has given main phases for updating firmware over the air through BLE, it should work with big files (I heard that you have to implement some kind of notifications).

3 Answers 3

Q: Is this amount of data limited ? Can we send something like a photo or a PDF?

Bluetooth Low Energy was not optimised for sending large amounts of data, nor is it optimised for streaming. It is more suitable for sending small chunks of data periodically (e.g. temperature readings, time, etc). Please have a look at this answer to understand how BLE transfer is different from classic Bluetooth. That being said, you can still send large amounts of data over BLE, and the amount of data is unlimited. However, this might end up being unreliable and relatively slow.

Q: So is there a possibility for the android server to advertise like the Peripheral on iOS?

Being a server/client is a completely different thing from being a peripheral/central:-

Peripheral/central dictates how the connection is made. A central device should initiate the connection. A peripheral device should advertise and wait for a connection request.

Client/Server dictates how the data is distributed. The Gatt Server holds the data. The Gatt Client can read, write or be notified (getting a continuous stream of readings) of this data. In most cases, the server is also the peripheral, but this is not mandatory.

So to answer your question, yes, the server can advertise like the peripheral on iOS. However, for Android, this feature is not yet available and will be part of the next version (Android L) release. Please see this answer for more information.

Q: Or maybe a possibility for my iPhone client to connect using the mac address of the server?

As far as I know, in coreBluetooth you would need the UUID, not the MAC Address, of a peripheral device to connect to it. You do not need to know the services being advertised from the peripheral device. Your best bet would be to scan for peripheral devices, and then connect to the one with the UUID and/or the advertising data that u know belong to your peripheral.

Источник

Оцените статью
Adblock
detector