iot

Spring Boot application freezes after a day

a 夏天 提交于 2019-12-23 16:35:41
问题 I have a Spring Boot application running on two servers. It accepts file upload requests (approx 1 KB) via Controller from 1000s of IOT devices. Additionally there is a TCP Listener which also accepts GPS data as a Stream from these IOT devices. I have setup the Tomcat max thread count to 3000 on one server and 5000 on a larger VM. After a day or two my Spring Boot application freezes, i.e. it stops responding to any further API calls. One reason, I suspect is that the IOT devices are not

Android thing: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/things/pio/PeripheralManager;

杀马特。学长 韩版系。学妹 提交于 2019-12-23 13:56:07
问题 Android thing run time exception: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/things/pio/PeripheralManager; Manifest file: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.androidthings.simplepio"> <application android:allowBackup="true" android:icon="@android:drawable/sym_def_app_icon" android:name="android.support.multidex.MultiDexApplication" android:label="@string/app_name"> <uses-library android:name="com.google

purpose of Azure iot hub device-to-cloud partitions

自作多情 提交于 2019-12-23 07:16:24
问题 When creating a new Azure IOT Hub you are asked how many device-to-cloud partitions you need. You can select between 2-32 partitions for standard tiers. I understand that the SKU and number of units determine the maximum daily quota of messages that you can send to IOT Hub. And that it is recommended to shard your devices into multiple IOT hubs to smooth traffic bursts. However, device-to-cloud partitions need clarification. 1>> What is the purpose of those device-to-cloud partitions under a

Android AllJoyn: Connection with second machine gives error of BusAttachement

隐身守侯 提交于 2019-12-23 07:06:05
问题 I have developed application for two different sensors. They are working fine separately but when I try to use them togather and create two diffent buses than Alljoyn gives this exception. org.alljoyn.services.common.BusAlreadyExistException: The object has been set previously with a BusAttachment. Below is my source code for connection. Can anyone tell me why I'm having this issue. private void connect() { org.alljoyn.bus.alljoyn.DaemonInit.PrepareDaemon(getApplicationContext()); bus = new

Contiki UDP packet transmission duration with CC2538

故事扮演 提交于 2019-12-22 12:33:15
问题 Could someone explain me what is going on within the Contiki-OS when it transmits an UDP packet? Here is the current consumption of my device in details running with the CC2538 chip: My question is: why it takes so long to transmit an UDP broadcast packet (about 250ms) knowing that theoretically at 250kbps the packet of 408 bits length should be transmitted in approximately 2ms? I'd understand if the transmission last lets say ten milliseconds but here the difference is huge. I use the

Totally Disconnect a Bluetooth Low Energy Device

◇◆丶佛笑我妖孽 提交于 2019-12-22 05:13:41
问题 I connect to a BLE device with the connectGatt() method in Android. This works great. When I disconnect I use the following: private void disconnectDevice() { gatt.disconnect(); } When I receive the callback I do a close. private BluetoothGattCallback gattCallback = new BluetoothGattCallback() { @Override public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) { switch (newState) { case BluetoothProfile.STATE_CONNECTED: Log.d("BLED-GATT", "STATE_CONNECTED");

Nearby Message API MessageLisenter is not triggerd

谁说胖子不能爱 提交于 2019-12-21 23:57:38
问题 I am working on IoT project with NXP i.MX7D . In this project I used Google Nearby API to publish data from companion app to the things app . I have followed this project nearby-kotlin . I have followed almost exactly as this repo . but in my case both of my app is publishing is subscribing successfully . Here are my code for two activity first one is companion app's MainActiviy.kt and second one is for the activity running on the NXP i.MX7D class MainActivity : AppCompatActivity(),

MQTT over websocket in python

主宰稳场 提交于 2019-12-21 21:56:05
问题 is there any support in python to subscribe on mqtt broker with port 8080 import sys import paho.mqtt.client as mqtt def on_connect(mqttc, obj, flags, rc): print("rc: "+str(rc)) def on_message(mqttc, obj, msg): print(msg.topic+" "+str(msg.qos)+" "+str(msg.payload)) def on_publish(mqttc, obj, mid): print("mid: "+str(mid)) def on_subscribe(mqttc, obj, mid, granted_qos): print("Subscribed: "+str(mid)+" "+str(granted_qos)) def on_log(mqttc, obj, level, string): print(string) mqttc = mqtt.Client()

Node-RED, IOT Foundation Out Node Not Sending Commands

放肆的年华 提交于 2019-12-21 20:34:02
问题 I have a Node-RED application that is bound to an IOT Foundation (iotf) service. I can receive events from devices and handle them appropriately. However, I am now interested in sending commands back to my devices and am having some problems. Nothing is showing up at the device, but by creating an IOTF in node, I can confirm that the command is passing through iotf. I can definitely get commands to pass through iotf using pure python, as the follow code works well: Client code: #!/usr/bin

IoT request response protocol

丶灬走出姿态 提交于 2019-12-20 09:59:57
问题 We need to build a server that can communicate with some embedded devices running a variant of Android. We need to be able to send commands to the device, and receive a response. A simple command might be asking the device for it's status. We won't have HTTP, so we need to have the client/device establish a connection with the server. We were considering using MQTT as it has a lot of nice properties (QoS, lightweight, built for IoT), but it doesn't natively support a request response workflow