GithubHelp home page GithubHelp logo

Comments (8)

tameraw avatar tameraw commented on May 31, 2024

@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.

tameraw avatar tameraw commented on May 31, 2024

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.

tameraw avatar tameraw commented on May 31, 2024

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.

tameraw avatar tameraw commented on May 31, 2024

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.

tameraw avatar tameraw commented on May 31, 2024

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.

tameraw avatar tameraw commented on May 31, 2024

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.

tameraw avatar tameraw commented on May 31, 2024

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.

asergaz avatar asergaz commented on May 31, 2024

The changes were committed on the master branch.
cde6403

from azure-iot-sdk-csharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.