OneWire protocol doesn't work well on Windows IoT Core
See original GitHub issueDescribe 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 inSystem.Device.Gpio
) … As above
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (11 by maintainers)
Top GitHub Comments
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.
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