Closed NSURLSession0 closed 3 years ago
Hi Maurice,
did you try sudo ?
I think it needs admin rights for access.
It is a long time since i have written this... But anyway i will help you until it works !
Hi Frank! I forgot to mention that I indeed tried to run it with sudo
. It doesn't help unfortunately. I think this issue is also the reason why controlling the LED (#1) doesn't work.
Any news on this? :)
@Mauricevb now i tried PiTest.Core after moving it to netcore3.1 - works as expected.
Where comes the address "289" come from?
Did you try "PiTest -d" ? The library requires the system to be configured.
Hi Frank! I compiled/published PiTest.Core with NetCore 3.1 as you said and the runtime 3.1 is installed on the Pi (stretch).
Running sudo ./PiTest -d
prints:
So that's working.
However, if I want to change a LED using sudo ./PiTest -y 1 r
, it prints:
PiTest Information: 0 : RevPiLeds: Using address 0x06
But nothing is happening. It just prints that line and the LED stays the same.
The address 289 (my previous comment) comes from my configuration where 289 starts the motor using modbus. This is working with RevPi's PiTest but not with this framework. I assume it's the same issue as the LED not changing.
@Mauricevb ok, so let me ask if some other control software is running in background?
On my device the LEDs can be set as expected....
Mayby someone other is continously resetting the LED state ?
Are you shure no NodeRed or other is running?
That's strange. I am using a fresh stretch installation that came with the RevPi Core 3. I have not installed any other software apart from mono and the dotnet 3.1 runtime.
Since n14s from issue #1 had the same issue, maybe you have something configured differently on your RevPi?
@Mauricevb did you try the original supplied pitest ? DOes that work ?
@Mauricevb now i flashed my RevPiCore new with 2020-06-25-revpi-stretch.img Done initial startup configuration with PiCtory (RevPiCore device only) Copieed PiTest (netcore31 single file published) using VNC
Setting LEDs works as expected - so how to continue here?
@FrankPfattheicher Thank you for trying! Can you share your executable? Maybe it has something to do with the compiling.
@Mauricevb uploaded as a release. See https://github.com/FrankPfattheicher/RevolutionPi/releases/tag/Nov2020
A invalid definition of IOC_VOID in Interop.cs is now fixed. Please retry.
My power supply is not working anymore so I have to wait for a new one. I will get back to you asap :)
Hi @FrankPfattheicher, I just checked the latest version on my RevPi and it works like a charm now! Thank you very much for all your help and patience :)
Great ! Thanks for feedback.
Hi!
I was just testing your framework (thank you for sharing!) and I noticed 'SetBitValue' doesn't do what I expect it to do.
When I run:
piTest -s 289,0,1
It sets the bit at address 289, offset 0 to the value 1.When I try to do the same using this framework I get the following error:
PiTest.exe Error: 0 : PiControl.SetBitValue: Failed to write bit value.
The code I am using:
control.SetBitValue(289, 0, true);
Any idea whether this is a bug or that I am doing something wrong?
Edit: I just noticed none of the commands seem to work. Reading and writing bits result in an error, but calling
control.Reset()
for example also results in afalse
. I guess something is broken. I already looked at PiControl.cs but it everything looks very similar to piControl.h. So it might have something to do with the application not being able to read/dev/piControl0
. I am not sure.