Comments (8)
@DanaEpp - Thanks for filing this issue.
As this pertains to the azure-iot-gateway-sdk, please file the issue under that repo:
https://github.com/Azure/azure-iot-gateway-sdk/issues
from azure-iot-sdk-csharp.
From @olivierbloch on November 11, 2016 22:39
@tameraw
This actually pertains to the DeviceExplorer tool, not the the gateway SDK.
Edited the title and reopened the issue
from azure-iot-sdk-csharp.
From @sergaz-msft on November 18, 2016 16:38
Hello @DanaEpp I will have a look at this. Just let me know the branch you are using and if when you use the compiled version (.msi) can you send the message to the device with the TimeStamp?
from azure-iot-sdk-csharp.
From @DanaEpp on November 20, 2016 16:38
I was having this problem with both the shipping MSI as well as the custom build we had for the IoT Hackathon during MVP Summit.
The message I was sending was simply:
{"type": "write_once","characteristic_uuid": "F000AA65-0451-4000-B000-000000000000","data": "AQ=="}
But it would fail on any message I would send. If I checked the timestamp checkbox in the UI, it would inject it in the beginning of the message and screw up the JSON.
from azure-iot-sdk-csharp.
From @sergaz-msft on November 25, 2016 14:23
Hi @DanaEpp, thanks for the details. That is a normal behavior from Device Explorer if you are using it as is. Have a look at Device Explorer Code and you can see the following in MainForm.cs
private async void sendMessageToDeviceButton_Click(object sender, EventArgs e)
{
try
{
if (checkBox1.Checked)
{
if (string.IsNullOrEmpty(textBoxMessage.Text))
{
cloudToDeviceMessage = DateTime.Now.ToLocalTime().ToString();
}
else
{
cloudToDeviceMessage = DateTime.Now.ToLocalTime() + " - " + textBoxMessage.Text;
}
}
else
{
cloudToDeviceMessage = textBoxMessage.Text;
}
...
Meaning that we are not sending the message in a JSON Format.
var serviceMessage = new Microsoft.Azure.Devices.Message(Encoding.ASCII.GetBytes(cloudToDeviceMessage));
You can customize Device Explorer very easily and encode the message to a JSON format.
Let me know if that helps?
from azure-iot-sdk-csharp.
From @DanaEpp on November 26, 2016 3:6
Have you actually tried it? If you select the timestamp button and look at the message firing across the wire, its blowing up on the line of code I showed. If you look at the JSON received in the SDK, it is indeed not in a format it can understand.
Maybe I am missing something, but I am not sure WHY injecting the timestamp should break what is being sent.
from azure-iot-sdk-csharp.
From @olivierbloch on November 28, 2016 15:55
I agree with you @DanaEpp
@sergaz-msft , I've added a bug for resolving this in our backlog.
from azure-iot-sdk-csharp.
The changes were committed on the master branch.
cde6403
from azure-iot-sdk-csharp.
Related Issues (20)
- [Bug Report] ModuleClient messages aren't routed when a DeviceClient is open at the same time HOT 2
- [Bug Report] Owner and Contributor roles fail with 'is not authorized for GET on /twins/device_id', "IoT Hub Data Reader" is explicitely required
- [Bug Report] ModuleClient.SetConnectionStatusChangesHandler does not catch network changes HOT 6
- [Bug Report] Querying jobs from some IoT Hubs returns an unexpected ArgumentException HOT 3
- [Bug Report] [v2] Multiple calls to direct methond after reconnect HOT 4
- Connecting to IOT hub / throws errors HOT 2
- [Bug Report] JsonConvert.DefaultSettings = JsonSerializerSettingsInitializer.GetJsonSerializerSettingsDelegate() affects settings globaly HOT 3
- [Technical Question] Device provisioned with DPS always shown as "X509 self-signed" instead of "Certificate Authority"
- [Bug Report][v2] [IoTSDK] Issue with getting the Provisioning device client with symmetric key sample to work. HOT 1
- [Bug Report] [IoTSDK] Issue with IotHubUnauthorizedAccess only when using X.509 Cert to GetFileUploadSasUriAsync[Bug Report]
- [Technical Question] Device sometimes stops receiving CloudToDeviceMessages
- [Bug Report] JsonConvert.DefaultSettings is being modified HOT 2
- After Creating Child Device With Twin, Parent Device wont show child device HOT 1
- Simple logic error in FileUploadNotificationReceiverSample.cs - inverted check for null HOT 1
- After Creating Edge Device returned device ETag includes double quotes
- [Technical Question] How to use Device Registration Status Lookup API HOT 2
- Not able to restart the custom edge module while using the inbuilt "RestartModule" direct method of $edgeAgent from custom iot edge module. HOT 14
- How can parent child relationship be established between Iotdevices without utilizing azure Iotedge ?? HOT 2
- Json Format Exception to get payload from Direct Method Request and Twin Json Wrongly formatted
- [Bug Report] Cannot invoke direct methods with payload in IotEdge devices. HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-iot-sdk-csharp.