Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Digital input/outputs iot 2040 #166

Open
soportekenai opened this issue Mar 1, 2021 · 15 comments
Open

Problem with Digital input/outputs iot 2040 #166

soportekenai opened this issue Mar 1, 2021 · 15 comments

Comments

@soportekenai
Copy link

Hi,
I have an iot2040 with the iot2000 input/output module.
I use the analog current inputs to take sensor readings, this works great.

Also I use digital inputs to read activate buttons and outputs to activate relays, with the followings problems:

We have realized that sometimes after a certain time or when we do some deploy in NodeRed, we begin to have problems with the digital in/outputs. They stop working

It also happens to us with the user led, the red led works but no the green led

Now i am activating the digital outputs by running a python from node-red but it is a problem -> time delay, digital input not work...

I use official SD image Siemens:
-NodeRed 0.20.7v
-node-red-node-intel-gpio 1.0.0-iot2000

Thanks

@jan-kiszka
Copy link
Collaborator

Maybe the same issue as in siemens/meta-iot2050#57. We fixed it for the 2050, but we did not backport this pattern yet.

Can you describe the error in more details? Does node-red report anything in the log? Does restarting node-red resolve the problem? Or only rebooting the box?

@soportekenai
Copy link
Author

I only use intel gpio module in node red. because node-red-contrib-iot2000 hasn't got modules to use digital outputs and analog inputs.

Node-red log doesn't show no mistake.

The problem is resolved when restarting node-red (sometimes) or rebooting the box

@jan-kiszka
Copy link
Collaborator

I do not mean node-red-contrib-iot2000. I'm always referring to the node-red-nodes-intel-gpio as they are delivered (i.e. ...1.0.0-iot2000) by meta-iot2000 and our example image.

Let me see if I can easily port the fixes we made for meta-iot2050 also to meta-io2000.

@soportekenai
Copy link
Author

Thank you very much, I await your news

@jan-kiszka
Copy link
Collaborator

I've pushed https://github.com/siemens/meta-iot2000/commits/jan/mraa-node-gpio-update, but it is only build-tested so far. As patches from the IOT2050 applied rather smoothly, it should work, though.

@jan-kiszka
Copy link
Collaborator

Now also tested, and it appears to work fine.

@soportekenai
Copy link
Author

Perfect, thank you very much. Let's try it and I'll tell you

@soportekenai
Copy link
Author

I need your help because I am not sure how to make the changes on my device

@jan-kiszka
Copy link
Collaborator

You will need to rebuild an image from my branch - or port the commits to your version of meta-iot2000. But there is no way around (re)building an image from sources.

@soportekenai
Copy link
Author

Sorry for my ignorance, but I don't know how to make these changes on my iot2040. We downloaded the OS image but I don't know how to rebuild an image from your branch or port the commits to my version of meta-iot2000. Can I modify the files directly? Thanks

@jan-kiszka
Copy link
Collaborator

You could edit the nodes, but you also need a recompiled libmraa. So, have a look at the README that comes with this repo and try to follow the build instructions, either on a supported Linux distro or inside the docker container.

@soportekenai
Copy link
Author

Hi,

We are trying to follow the steps to build the image but we cannot do it.

We need a solution to this problem,
we need you to explicitly attach the steps to follow or send us the image
already created. Excuse me for my ignorance

Captura

@jan-kiszka
Copy link
Collaborator

First, install docker or podman on your Linux machine/VM. Make sure you can use it as the logged-in user.

Then:

git clone https://github.com/siemens/meta-iot2000
cd meta-iot2000
git checkout jan/mraa-node-gpio-update
wget https://raw.githubusercontent.com/siemens/kas/2.4/kas-container
chmod a+x kas-container
./kas-container build kas-example.yml

That said, understanding what went wrong with using kas natively (without a container) would be nice as well. How did you install it? On which distribution/version did you do that?

@soportekenai
Copy link
Author

I have created a Linux 16.04 LTS VM with docker
I have followed your instructions but it gave me error 1
1

I have followed the link below to try to solve
https://docs.docker.com/engine/install/linux-postinstall/

But I get the following error 2
2

I have followed the link below to try to solve
https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket

But I get the following error 3
3

Wouldn't it be easier for you to generate the image and send me a wetransfer or similar?

@jan-kiszka
Copy link
Collaborator

Please see https://support.industry.siemens.com/tf/ww/en/posts/how-to-build-github-example-image/237116/?page=0&pageSize=10, steps 1-6, for setting up a suitable build VM (not only for the IOT2050).

Regarding a prebuilt image, please contact our support directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants