customized gateway device implementation

Topics about the Software of Revolution Pi
Post Reply
songha
Posts: 27
Joined: 02 Jul 2021, 12:48

customized gateway device implementation

Post by songha »

Hello all,

I have a question as follows:
I want to build a customized module (like gateway modul) and connect to the revpi core/connect via Pibridge. However, the IN/OUT data between my device and the revpi core is 1024 bytes per way instead of 512 bytes payload like a traditional gateway. At this point, I don't know where to start. Should I modify the source code/image of the revpi core so that it can implement my device as a revpi family device? If so, where should I start?

Thank you very much!
u.biakoup
Posts: 212
Joined: 14 Apr 2022, 13:04

Re: customized gateway device implementation

Post by u.biakoup »

Hello Songha,
Thank you to be member of this community and for sharing your application with the RevPi. The RevolutionPi project is built on the idea of sharing and discussing knowledge across the community.
All relevant and important documents regarding the Revpi and the surrounding modules are located here. There you can find Datasheets, circuit Diagrams, Drivers and many other Documents.
You want to exchange data between different interfaces and wonder if this is possible and how? Just take a look at our Revolution Pi Gateway Tutorial

Best Regards

Ulrich Kouatang Biakoup | Technical Support
songha
Posts: 27
Joined: 02 Jul 2021, 12:48

Re: customized gateway device implementation

Post by songha »

Hi biakoup,
thank you for your help!
Can you give me a more specific approach? For example, how can I modify a gateway module and the source code of revpi controller so that it can exchange more than 512 bytes each way (IN/OUT) in each cycle on the ethernet of pibridge between them?
u.biakoup
Posts: 212
Joined: 14 Apr 2022, 13:04

Re: customized gateway device implementation

Post by u.biakoup »

Hello Songha,
Could please tell me exactly what kind of Gateway you want to build? Kunbus has many Ethernet-based gateways for industrial communication: Profinet, EtherCAT and Ethernet/IP.

Best Regards

Ulrich Kouatang Biakoup | Technical Support
songha
Posts: 27
Joined: 02 Jul 2021, 12:48

Re: customized gateway device implementation

Post by songha »

Hello biakoup,

my device is a modified gateway Profinet RTI.
A normal Profinet gateway device transmits 512 bytes of payload to the controller and receives 512 bytes from the controller in a cycle. But, my device expects to send and receive 1024 bytes in each direction in each cycle. If my device intentionally sends 1024 bytes to the controller, the recieved payload will be cut in half. So it is necessary to edit the source code of the controller to accept 1024 bytes from my device and store the whole packet in memory. But i don't know how to do that.

Thank you for your help!
u.biakoup
Posts: 212
Joined: 14 Apr 2022, 13:04

Re: customized gateway device implementation

Post by u.biakoup »

Hello Songha,
The Modification of the device is not possible. The 512 bytes is the upper limit for each I/O direction. If you need more data, you have to use a second Gateway. Depending on the field bus used, the limit may be smaller than 512 Bytes.

Best Regards

Ulrich Kouatang Biakoup | Technical Support
songha
Posts: 27
Joined: 02 Jul 2021, 12:48

Re: customized gateway device implementation

Post by songha »

Hello biakoup,

actually I have modified the gateway module so that it can receive and send 1024 bytes IN/OUT. The remaining problem is the controller. Why does the controller (RevPi connect, Revpi core) limit the number of payloads that can be received or sent to 512 bytes? Is it really not possible to modify the source code of the controller?

Best Regards
Song Ha
Researcher at Uni BW Hamburg
u.biakoup
Posts: 212
Joined: 14 Apr 2022, 13:04

Re: customized gateway device implementation

Post by u.biakoup »

Hello Songha,
I am wondering, how you made the modification.
There are two definitions in the project of the unit:

#define FB_INPUT_INTERFACE_LEN 512
#define FB_OUTPUT_INTERFACE_LEN 512
This sets the sizes of the buffers for the data.
Could you please post here, how you modified the gateway so that it's possible? It will be very nice for the community. The RevolutionPi project is built on the idea of sharing and discussing knowledge across the community.
If you want to customise something on the RevPi side, you have to customise the kernel driver (piControl). We can't give help & support here either, as such a device is outside our specification. The sources can be found on our GitHub account.

Best Regards

Ulrich Kouatang Biakoup | Technical Support
Post Reply