How to empty response issue from any machine in AWS IoT? - protocol-buffers

Asin the Screenshots I set up my whole AWS IoT Core Server as MQTT Broker but I am getting an empty response from my machine . any suggestions to solve this ??
This response is in Hex format as default need to decrypt(decode) this using Protocol buffers files.
I am expecting number of fields as response like success status , slot number
,rl_type
,rl_mode
,rl_conn
,rl_status
,rl_csq
,rl_rsrp
,rl_sinr ect.

AWS IoT Core now supports decoding protocol buffer directly within AWS IoT Rule Engine. Please have a look at the announcement here: https://aws.amazon.com/about-aws/whats-new/2022/12/aws-iot-core-rules-engine-google-protocol-buffer-messaging-format/

Related

Influxdb - Difference between bind adress in [graphite] and [http] of config file

I need to understand what is the difference between Graphite bind address 2003 and http service bind address 8086.
I'm implementing jmeter--influxdb --grafana for real time result.In Graphite im enabling bind address 2003 and in the jmeter backend listener im using 8086 as the port.
Im not able to use influx CLI.
Im able to post the result to influxdb.
When i do above process along with-- enable [http] and enable bind address 8086.Im able to access Influx CLI and also im able to post the results to influxdb using the port 8086.No where in jmeter im mentioning 2003 which im enabling at [graphite].
Even in grfana im using http://localhost:8086 and not 2003.
I would like to know ,what actual bind address mean ?
How these two bind address make difference ?
Though in the first case i dont enable http service i'm using 8086 as the port in jmeter backend listener.How it works ?
8086 is HTTP endpoint
2023 is Graphite endpoint
Graphite is a special protocol which provides simple way of sending and plotting data.
In JMeter you have choice of:
InfluxdbBackendListenerClient which uses HTTP protocol and 8086 endpoint
GraphiteBackendListenerClient which uses Graphite protocol and 2023 endpoint. Theoretically you can use the GraphiteBackendListenerClient with any other application which uses Graphite protocol, not necesesarily InfluxDB
The actual choice is up to you.
Instructions for the InfluxDbBackendListenerClient
Instructions for the GraphiteBackendListenerClient

Getting error while getting device data from watson iot platform using Rest API

I have added 2 type of devices in Watson-Iot platform, one is Iot-Bridge and one is gateway.
When I make the API call to get device info for gateway type of device, it gives me the information but same type of call for Iot-Bridge type device says NotFound.
e.g. https://internetofthings.ibmcloud.com/api/v0002/organizations/{orgId}/device/types/gateway01/devices/{deviceId}
gives device Info but below call gives NOT FOUND, however there is a device by that name as /bulk/devices gives list of all devices.
https://internetofthings.ibmcloud.com/api/v0002/organizations/{orgId}/device/types/iot-bridge/devices/{deviceId}
Can anyone provide any idea?
Also how can I get all the information for data sent by these devices to Iot Platform? API endpoint is given but its giving Bad Request.
I am glad to hear you identified the device info endpoint was checking for cases sensitivity and resolved the problem by correcting the case of the device type name.
An application can subscribe to monitor the status of one or more devices, for example:
Subscribe to topic iot-2/type/device_type/id/device_id/mon
Note: To subscribe to updates from more than one device, use the MQTT "any" wildcard character (+) for any of the following components:
device_type
device_id
For managed devices, you can use the API to get log connection information to determine when managed devices have connected and disconnected.
You may find this recipe for displaying status of devices useful: https://developer.ibm.com/recipes/tutorials/display-status-of-registered-devices-on-watson-iot-platform/

Connecting ibm bluemix watson IoT using erlang mqtt websocket client on port 443

MQTT over Websocket protocol
I'm trying to connect IBM Watson IoT service using erlang mqtt websockets on port 443(ssl/tls). But, I was receiving error.
The IBM dos(https://console.ng.bluemix.net/docs/services/IoT/iotplatform_task.html#devices) says that it support websocket connection. There is no mention of the websocket usage(tutorials/guide) except normal tcp connection(which i was successfull at getting conected).
I want a simple step by step doc like the Amazon IoT (http://docs.aws.amazon.com/iot/latest/developerguide/protocols.html) for websocket connectivity as a client application.
I'm figuring about the URL/URI which I think might be improper i.e ws(s)://host:port/path.
Currently, i'm giving it as wss://fybr123mqtt.mybluemix.net
(where fybr123mqtt is my application name).
What is the host, port & path for connecting to IBM Watson IoT through mqtt ?
And how to send other parameters like 'client_id', 'username', 'password', 'authentication token' along with the HOST ?
Also, suggest some erlang websocket client for mqtt and also mention simple steps to access the websocket server. Erlang mqtt client (emqttc) does not support websocket.
The connection process is clearly described here:
console.ng.bluemix.net/docs/services/IoT/devices/mqtt.html
The URL that you mentioned is not correct: wss://fybr123mqtt.mybluemix.net
On Step 2: Connecting your devices to Watson IoT Platform from console.ng.bluemix.net/docs/services/IoT/iotplatform_task.html#devices it says the following:
The following information is required when connecting your device:
URL: org_id.messaging.internetofthings.ibmcloud.com
Where org_id is the ID of your Watson IoT Platform organization.
Port:
1883
8883 (encrypted)
443 (websockets)
Device identifier: d:org_id:device_type:device_id
This combination of parameters uniquely identifies your device.
Username: use-token-auth
This value indicates that you are using token authorization.
Password: Authentication token
This value is the unique token that you defined or that was assigned to your device when you registered it.
The org_id, device_type, device_id and password are provided after you complete Step 1: Registering your device with Watson IoT Platform
Note: The clienID is Device identifier: d:org_id:device_type:device_id
I successfully used mqttfx, eclipse paho, mosquitto and there are a lot of other free mqtt clients that you can use.
Also, there are good tutorials (recipes) that can help you get starter with IBM's client libraries in Java, Pyhton, etc. As examples you can have a look on:
"ibm.com/developerworks/cloud/library/cl-mqtt-bluemix-iot-node-red-app/"
Here is an example for gateway device type with mosquitto
"developer.ibm.com/recipes/tutorials/using-mosquitto-as-a-gateway-for-watson-iot/"
Lets not forget the client nodes from NodeRed, that are very easy to use.
Let me know if you still need help on this.
Thanks,
Daniel
Url: wss://6DigitOrgID.messaging.internetofthings.ibmcloud.com:8883
It works fine using NodeJS. I don't specify a further endpoint.
[BaseClient:connect] Connecting to IoTF with host : wss://6DigitOrgID.messaging.internetofthings.ibmcloud.com:8883
[DeviceClient:connect] DeviceClient Connected
connected
[DeviceClient:publish] Publishing to topic iot-2/evt/myevt/fmt/json with payload {"radiation":1} with QoS 2
This is based off the sample client code with "enforce-ws" : true
I modified that client and tested with 443 also:
[BaseClient:connect] Connecting to IoTF with host : wss://6DigitOrgID.messaging.internetofthings.ibmcloud.com:443
[DeviceClient:connect] DeviceClient Connected
connected
[DeviceClient:publish] Publishing to topic iot-2/evt/myevt/fmt/json with payload {"radiation":1} with QoS 2
I don't know of any samples for erlang.

switch between video streaming

I am struggling with switching between multiple live streams. For example, I have five live streaming servers streaming(HTTP or RTSP) and I want to put some broker between those (five) streaming sources and destination so that output to the destination would be one video streaming (later I may change the streaming source again using switch). Broker plays role of switcher, My question is, is there such open source "switcher"? Or how this technology works?
here is link to similar question but I want some open source or some brief guidance about how it could be implemented: http://forums.creativecow.net/thread/117/858680
Thank You in advance
That answer can be an archive for the researchers
First Suggestion or Solution(Multicast Router)
You can use a Router or L3 Switch which is support IGMP protocol. That Router or L3 Switch must support IGMP protocol you can structure multicast IP address. You can configure L3 to switch all streaming. Multicast Ip address works within 224.0.0.0 to 239.255.255.255 and works based on device' mac address. You can create different multicast Ip address for the different type of switching scenarios. After finished Router or L3 Switch configuration, you only change IP address to switch streaming into your program. (I didn't mention Broadcast. Broadcast send data to all points. Multicast send data to certain points.)
Second Suggestion or Solution(Programming)
I am using Vlc.Dotnet wrapper for using the Vlc and libvlc libraries. It's open source. RTSP streaming is based on IP address and port number. I don't know any open source switch but you can write one of them for you with use Vlc.dotnet wrapper. You build 5 Streaming server and 1 control server. The Streaming Server's destination should be Control Server's IP. and you can control all data from control server with your basic switch program.
5 Streaming Servers : Sends data to Control server
1 Control Server : Controls and Switches data
I prefer to use Router or L3 Switch for make that. Because it's easier.

Sending image from server to client

How to send image from server to client through bluetooth in j2me?
If you are in control of both the server and client, then you don't need to worry about the complexities of OBEX. You can create your own lightweight protocol that does only what you need.
If you are new to Bluetooth on J2ME, start by reading about JSR 82. You'll want to create an RFCOMM/SPP connection between your client and server.
Next is the matter of sending an image over a serial connection in J2ME. If you have the image loaded as a javax.microedition.lcdui.Image, you'll need to obtain the ARGB pixel data using Image.getRGB().
This gives you an int array, which you'll need to send over the SPP connection (look at DataOutputStream.writeInt()), and rebuild at the other end using Image.createRGBImage().
HTH.
I've found the avetana Bluetooth libraries to be a bit unstable, and found BlueCove to be a better proposition. As mentioned, OBEX is the OBject EXchange protocol to use, and the docs are all over the internet.
If you look into "apps\BluetoothDemo\src\example\bluetooth\demo" folder of Sun WTK 2.5.x installation folder, you can find BTImageServer.java and BTImageClient.java source codes.
It uses serial profile to send image data from server to client. I think you can easily understand by looking it.
If you mean OBEX, try avetana (obex implementation on JSR-82) - it includes some example.

Resources