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] error CS0426: The type name 'Create' does not exist in the type 'ServiceClient' HOT 1
- Building digital twin of the robotic arm [Technical Question] HOT 2
- How do I send data stored in array (floating type) from my robot to IoT hub? [Technical Question]
- [Bug Report] Fails to establish TPM connection HOT 1
- [Technical Question] Security: Check root certificate on device-to-cloud connection HOT 10
- Unhandled exception. Microsoft.Azure.Devices.Client.Exceptions.IotHubException: Request 817bda7c-6fc4-40e0-8946-93eb851fcb12 returned status 403 [Bug Report] HOT 7
- [Bug Report] Send message in batch to multiple outputs using ModuleClient throws HOT 2
- Is it possible to send bulk messages in telemetry from device to IoT hub? [Technical Question]
- [Technical Question] HttpClientHelper error code 400030 HOT 3
- [Bug Report] When try to fetch reported properties after updating the reported property it will return previous version of reported property not the latest one. HOT 2
- [QUERY] How to properly acknowledge IoT hub messages HOT 6
- [feature request] Make DPS Queries testable HOT 2
- MQTT Channel is Closed / Migrating Sample to .net8 caused an issue HOT 5
- DeviceNotFoundException results in InvalidErrorCode (404103) HOT 2
- [Bug Report] v2.0.0 now removed from nuget package HOT 4
- Getting PlatformNotSupportedException on .NET Framework 4.6.1 HOT 3
- [Technical Question] HOT 1
- [Bug Report] HOT 2
- [Bug Report]Edgehub - Unknown feedback message - HOT 3
- Getting Connection Closed on New Connection Error when it was previously not generated HOT 2
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.