B4X FEED BLE Chat - Connecting Android and iOS

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: BLE Chat - Connecting Android and iOS است. این موضوع تا کنون 83 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع BLE Chat - Connecting Android and iOS
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
83
پسندها
0
آخرین ارسال توسط PracticalSoft
وضعیت
موضوع بسته شده است و نمی‌توان پاسخ جدیدی فرستاد.
Jun 6, 2020
11,593
4,507
This example is based on the new PeripheralManager type introduced in iBLE v2.00.
Please start with this tutorial:

There are three programs: BlePeripheral, BleCentral_iOS and BleCentral_Android

BlePeripheral is the one that implements the peripheral role.
The other devices will connect to the peripheral and communicate with it. The peripheral will relay the messages to all connected devices.

The code is quite simple. I will go over some interesting points:
- The peripheral stores the connected central ids in a Map (as keys). This makes it easy to add or remove centrals without needing to deal with duplicates.

- The centrals maintain a list with the messages that need to be sent. Only one message can be sent at a time so when WriteComplete is raised the next message is sent.

- In B4i we need to call WriteWithResponse instead of Write as a response...



 

وضعیت
موضوع بسته شده است و نمی‌توان پاسخ جدیدی فرستاد.
عقب
بالا