我正在开发一个硬件设备,它通过BLE将连续的数据流发送到Android应用程序.Android应用程序将此数据作为GATT通知接收,然后处理此数据并将其保存到数据库.
该项目的配置细节如下:
问题
当数据从硬件设备传输到Android手机上运行的BLE数据捕获应用程序时,不会收到所有数据包.它只接收大约35-45个数据包,而预期的数据包数量为50.
更令人惊讶的是,当我们使用BLE数据包嗅探器时,Android手机嗅探和显示的数据之间存在完美匹配(这是不完整/不正确的数据).这让我相信,当连接到Android手机而不是发送所有数据时,硬件的行为会有所不同.
当我们使用与iOS BLE数据捕获应用程序相同的硬件时,数据被正确接收.
我对Android中BLE数据捕获的这种行为感到困惑和无能为力.iOS设备上的应用程序如何能够正确捕获所有数据,而Android手机上的应用程序根本无法正确捕获数据?
在Android上使用BLE应用程序时,有没有人遇到丢包/错误数据的问题?欢迎提出任何意见.非常感谢你的帮助.
Android应用程序使用标准BLE代码通过BLE连接到设备.我正在使用的Android代码如下所示:
import android.annotation.TargetApi;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattDescriptor;
import android.bluetooth.BluetoothGattService;
import android.bluetooth.BluetoothManager;
import android.bluetooth.BluetoothProfile;
import android.bluetooth.le.BluetoothLeScanner;
import android.bluetooth.le.ScanCallback;
import android.bluetooth.le.ScanFilter;
import android.bluetooth.le.ScanResult;
import android.bluetooth.le.ScanSettings;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.nfc.Tag;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import …Run Code Online (Sandbox Code Playgroud) 我正在开发一个实时流应用程序,它需要将信息发送到 AWS Kinesis 流,然后再从那里发送到 AWS Redshift。根据我对文档的阅读和理解,以下是将信息从 Kinesis Streams 推送到 Redshift 的选项:
我发现 Kinesis Connector 选项是将信息从 Streams 移动到 Redshift 的最佳选择。但是,我无法理解我们在哪里部署这个库以及它是如何运行的?这是否需要作为 lambda 函数或作为 EC2 实例上的 java 函数运行。根据自述文件,我无法获得该信息。如果有人成功使用连接器,我将非常感谢您的洞察力。