question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OneWire protocol doesn't work well on Windows IoT Core

See original GitHub issue

Describe the bug

DHTxx running in 1-wire mode with DHT22 misses some conversions. Also runs on Raspian on the RPi but blocks with no response to Dht22 instantiation on IoT-Core.

Steps to reproduce I’ve create a sampler app on GitHub djaus2/DNETCoreGPIO.

See code in repository as above.

Expected behavior

Expect to see temperature and pressure displayed.

Actual behavior

On Raspian some conversions report failure. Most succeed. On the IoT-Core doesn’t get past Dht22 instantiation.

Versions used I am using the Nuget Packagaes

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Iot.Device.Bindings" Version="1.1.0-prerelease.20153.1" />
    <PackageReference Include="System.Device.Gpio" Version="1.1.0-prerelease.20153.1" />
  </ItemGroup>

Add following information:

  • dotnet --info on the machine being used to build [192.168.0.11]: PS C:\share\DNETCoreGPIO> dotnet --info .NET Core SDK (reflecting any global.json): Version: 3.1.101 Commit: b377529961

Runtime Environment: OS Name: Windows OS Version: 10.0.17763 OS Platform: Windows RID: win10-arm Base Path: c:\Quickstarts\dotnet\sdk\3.1.101\

Host (useful for support): Version: 3.1.1 Commit: a1388f194c

.NET Core SDKs installed: 3.1.101 [c:\Quickstarts\dotnet\sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.App 3.1.1 [c:\Quickstarts\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.1 [c:\Quickstarts\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download

  • Version of System.Device.Gpio package … As above
  • Version of Iot.Device.Bindings package (not needed if bug is in System.Device.Gpio) … As above

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
djaus2commented, Mar 18, 2020

Ok I will do it seeing I started this.

David Jones MVP


From: Jose Perez Rodriguez notifications@github.com Sent: Thursday, March 19, 2020 4:26:42 AM To: dotnet/iot iot@noreply.github.com Cc: David Jones (MVP) davidjones@sportronics.com.au; Mention mention@noreply.github.com Subject: Re: [dotnet/iot] OneWire protocol doesn’t work well on Windows IoT Core (#1010)

@Ellerbachhttps://github.com/Ellerbach would either you or @djaus2https://github.com/djaus2 be able to add few lines on the README of DHT to say that OneWire doesn’t work well in Windows, and perhaps some instructions on how to set it up with Two Wires? Perhaps after doing that we can then close this issue as documentation for now and ping the WINRT team about this to see if they can do anything to improve this scenario in Windows.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/dotnet/iot/issues/1010#issuecomment-600762705, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2EIZDDQI4KFLSDCTQRDRID75FANCNFSM4LI5JNAQ.

0reactions
djaus2commented, Mar 24, 2020

Conclusion is that 1-wire will not work with Win 10 IoT-Core as the OS cannot switch the pin fast enough between output and input (or viz). There are some fixes which use two GPIO pins. One for input and one for output., but that then would not be 1-wire. Nb: The 2-wire “fix” is discussed here: GPIO OneWire DHT11/22 reader and here: hackster.io

Read more comments on GitHub >

github_iconTop Results From Across the Web

DS18B20 Temperature Sensor / 1-Wire on Windows 10
The RPi doesn't "natively" support 1-wire. There is a software implementation of the protocol for one (possibly more) operating systems that run on...
Read more >
Problem with 1-Wire devices not showing up on GPIO4
For a project I want to implement 1-Wire communication in a Raspberry Pi Zero W. The goal is to use a Maxim Integrated...
Read more >
Beer IoT: Measuring temperature with Windows 10 ...
In practice I use this solution to monitor the freezing of eisbock beer. Making 20l of beer freeze takes time. Depending on weather...
Read more >
Guidelines for Reliable Long Line 1-Wire Networks
This document discusses various aspects of 1-Wire networks and provides design guidelines for their reliable operation.
Read more >
Setting up Windows 10 for IoT on your Raspberry Pi 2
Installing Windows 10 on your Raspberry Pi 2 · Go to the Windows Embedded Connect site and sign in. · Pick the Build...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found