-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Add s2opc (OPC UA implementation) module to Zephyr #25046
Comments
cc @carlescufi @puchm. Request for a module sent. |
To test the module (at your own risk, it is a beta version). 1/ Add the following lines into
2/ run 3/ go to directory |
It would not be a big task to create IPv4 join/leave multicast support. Atm I am quite busy with other areas but I can help if someone wants to implement this. |
@vla3913 the revision "plu_poc_zephyr_imx6_rebase" is not in the repo anymore... Which should I use instead? I tried "zephyr" but that got me an error when building. |
@puchm. Yes you are right: the branch was renamed this morning to be closer to Zephyr standard. I am going to update the content of the issue.
and for qemu_x86:
|
@puchm which Zephyr revision do you use ? We develop against Zephyr revision 2.2. |
However, if i am not wrong, QEMU x86 emulator doesn't support Ethernet so I don't think it's the good platform to test the library. |
qemu_x86 most definitely supports Ethernet. We have Intel e1000 driver in Zephyr which is also supported by Qemu. You can setup TAP Ethernet device in Linux and connect that to Zephyr running in Qemu, this is very useful in testing. |
@jukkar, it's really good news ! |
@vla3913 Ethernet seems to be missing from supported features list, but if you scroll down, the networking support is mentioned separately. |
@vla3913 I was using Zephyr 2.2.99, I switched to 2.2.0 and it worked. |
The zephyr documentation describes how to setup qemu<->host communication using Ethernet here https://docs.zephyrproject.org/latest/guides/networking/networking_with_host.html
Was there something in 2.2.99 that did not work, or did you just want to use the 2.2? |
Bridging is only needed if you want to connect two Zephyr instance (for example two Qemu) to each other. |
@puchm, you are absolutely right, we are working on the subject. Following the advice of @jukkar, I compiled in qemu-x86 and added a zeth interface. |
Sorry for the late reply.
What I did is I ran Zephyr net-tool's |
@jukkar, we run into structure and functions prototypes which seem to be modified since revision 2.2 (aka
then, launch net-tool in a terminal:
and finally run the binary:
What I mean is that I am able to exchange Ethernet messages with the Zephyr application running in Zephyr but the OPC UA communication is not established because of an mbedtls initialization error i do not have on real hardware (
|
The 2.3 release will contain big changes for timeout functionality so functions like |
Thanks, I just updated the code to be compliant with 2.3rc1 (although I have seen some items which will need a little additional cleanup). Non regression tests ok on omx1064 with this new version. |
I have difficulties with qemu x86 entropy pool for mbedtls. Do you know who I can contact on the subject ? |
|
@ceolin is probably the best contact here |
@ceolin, is it possible to contact you with some quick questions on the subject ? |
of course :) just let me know how can I help you. |
@ceolin, Hello. I am trying to access hardware entropy device to get entropy for mbedtls. I use this code:
With CONFIG_ENTROPY_NAME equal to TRNG, it is working fine on imx 1064. |
We don't have entropy drivers for qemu and native posix. AFAIK qemu can export an entropy source through VIRTIO device but we never implemented a driver for that. Do you really need access the entropy device ? Can't you use the random subsystem ? we do have CSPRNG and PRNG APIs. You can select the entropy device as backend for the random number generator for productions and use a non-secure version when developing on qemu. |
@ceolin , thanks for your reply. I am going to try to take it into account. |
We have made additional progress. It is now also running on native_posix. |
Before this module is created we need to decide if we want to support both S2OPC and open62541 or just one of them. |
In my opinion it would be better to support both. open62541 seems like it needs some more work until it works on Zephyr but S2OPC does not have a free-to-access documentation. |
We have made further progress: In order to achieve it, we have modified the multicast UDP Zephyr functions:
We also have added signature and encryption mechanisms on PubSub exchanges. |
I just saw the Zephyr S2OPC presentation in Zephyr Developer summit, and want to comment that the IPv4 multicast support (IGMP) is now supported in upstream Zephyr 2.6. I hope this helps with S2OPC Zephyr integration. |
@nashif @MaureenHelm This issue is unrelated to OSDP, and we still need to come to a conclusion on OPC UA,. |
Great ! Thanks for you feedback. we are going to try this out. |
New supported boards including:
|
@AndreyDodonov-EH Thanks ! |
S2OPC is now compliant with Zephyr 3.2. |
This issue, marked as an RFC, was opened a while ago and did not get any traction. It was just assigned to you based on the labels. If you don't consider yourself the right person to address this issue, please re-assing it to the right person. Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason. @vla3913 you are also encouraged to help moving this issue forward by providing additional information and confirming this request/issue is still relevant to you. Thanks! |
This issue has been open for a long time. @vla3913 are you planning to submit the code to upstream? |
Hello @jukkar, S2OPC can run on Zephry (see https://gitlab.com/systerel/S2OPC/-/wikis/compilation/Zephyr-compilation) and we maintain it. |
Having it as an outside module is fine and if you have everything working ok, I think we can close this one then. |
Ticket closed as module is external to Zephyr. See https://gitlab.com/systerel/S2OPC/-/wikis/compilation/Zephyr-compilation |
Introduction
s2opc is an open-source implementation of the OPC UA protocol.
Zephyr and S2OPC have some common points:
S2OPC nano server has been certified by the OPC Foundation.
On the security aspect, a CSPN evaluation is in progress at the initiative of the ANSSI (https://www.ssi.gouv.fr/en/).
Problem description
OPC UA is the machine to machine protocol of industry 4.0. If Zephyr target is IOT products, it is important to have an OPC UA library and if possible, a library which share its concerns (safety, security, open-source, ...).
Proposed change
S2OPC, hosted on Gitlab used to run on Linux, Windows, FreeRTOS or VX Works.
We ported the library on Zephyr. The result is available on the Gitlab.
There are still some modifications/improvements to be done but we would like to share our first results.
Detailed RFC
S2OPC sources contain a directory
src/Common/helpers_platform_dep
which contain all platform dependent code (timers, threading, etc ...). There is sub-directory per supported platform.A
Zephyr
sub-directory has been created and we tried to map our abstraction layer to Zephyr API.OPC UA contains two different mechanisms:
A demo server, result of the porting activity has been successfully tested on imx1064 with Zephyr 2.2.
We plan to test qemu_x86 and others hardware architectures using Renode.
Proposed change (Detailed)
We suggest using S2OPC for the name of the module.
The project is hosted on Gitlab but we have a GitHub mirror.
In order to facilitate future maintenance, our favorite option would be the creation of the branch
zephyr
on Gitlab which is mirrored on GitHub and you can integrate into Zephyr but we are open to discussion.At first, we suggest submitting the library code plus a demo server as a sample.
It is running successfully on Zephyr zephyr-v2.3.0-520-gba0a791635c9 with imx 1064 and native_posix
Dependencies
s2opc main dependencies are:
Concerns and Unresolved Questions
We have still some unresolved issues including:
Alternatives
N/A
The text was updated successfully, but these errors were encountered: