質問編集履歴

1

didConnectPeripheralが呼ばれなくて困っています。

2016/09/30 08:09

投稿

hirox
hirox

スコア8

test CHANGED
File without changes
test CHANGED
@@ -1,18 +1,18 @@
1
- 実現したいことですが、
1
+ 実現したいこと
2
2
 
3
- Surface pro4をペリフェラル側
3
+ Surface pro4をペリフェラル側
4
4
 
5
5
  iPad airをセントラル側で、
6
6
 
7
- ペアリングなしで、データの送受信をしたいと考えております。
7
+ ペアリングなしで、データの送受信を
8
+
9
+ させたいと考えております。
8
10
 
9
11
 
10
12
 
11
- BluetoothAPIsやBluetoothGATTGetServicesので実装できそうで
13
+ 情報が少困っていま
12
14
 
13
- 情報が少なく、困っている状況です。
14
-
15
- 何か良い解決策はありませんでしょうか
15
+ 解決策はありませんでしょうか
16
16
 
17
17
  そもそも、実現が不可能なことなのでしょうか?
18
18
 
@@ -20,24 +20,62 @@
20
20
 
21
21
 
22
22
 
23
- Surface pro4
23
+ 開発環境
24
24
 
25
- Windows10
25
+ Surface pro4
26
26
 
27
- Bluetoothバージョン 4.0
27
+ Windows10
28
28
 
29
+ Bluetoothバージョン 4.0
30
+
29
- 開発環境 Microsoft Visual Studio Community 2015 C/C++で実装
31
+ Microsoft Visual Studio Community 2015 C#/C/C++
32
+
33
+ 参考にしたプログラム
34
+
35
+ https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BluetoothAdvertisement
36
+
37
+ https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BluetoothLEClient
38
+
39
+ https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing
30
40
 
31
41
 
32
42
 
33
- iPad air、iPad air2
43
+ iPad air、iPad air2
34
44
 
35
- iOSバージョン 8 以降
45
+ iOSバージョン 8 以降
36
46
 
37
- Bluetoothバージョン 4.0、4.2
47
+ Bluetoothバージョン 4.0、4.2
38
48
 
39
- 開発環境 XCode8.0 Objective-cで実装
49
+ XCode8.0 Objective-c
50
+
51
+ フレームワークのCoreBluetoothを
52
+
53
+ 利用したいと考えております。
40
54
 
41
55
 
42
56
 
57
+ Windows側(ペリフェラル)
58
+
59
+ 以下を参考に、アドバタイズをトリガーとして接続をして、Characteristicsでデータの送受信をしたいと
60
+
61
+ 考えていますが、反応しません。
62
+
63
+ https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BluetoothAdvertisement
64
+
65
+
66
+
67
+ iOS側(セントラル)
68
+
69
+ アドバタイズは、受信できるが、その先の接続するメソッドが成功も失敗も呼ばれない状況です。
70
+
71
+ ペリフェラル接続の成功メソッドが呼ばれない。
72
+
73
+ didConnectPeripheral:(CBPeripheral )peripheral { 省略 … }
74
+
75
+ ペリフェラル接続の失敗メソッドが呼ばれない。
76
+
77
+ didFailToConnectPeripheral:(CBPeripheral )peripheral error:(NSError *)error { 省略 … }
78
+
79
+
80
+
43
- よろしくお願いいたします。
81
+ ご教授、宜しくお願いします。