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

Infinite send loop by s-net payload size > 131 Bytes (hdlc payload size > 142 Bytes) #1

Open
Tonacatecuhtli opened this issue Nov 21, 2016 · 1 comment

Comments

@Tonacatecuhtli
Copy link

Tonacatecuhtli commented Nov 21, 2016

If you send an send a s-net(R) message with an s-net application payload size bigger than 131 Bytes (hdlc palyload size > 142 Bytes) the hdlcd stats sending this message in a infinite loop.

Setup:
s-net Master connected to the PC via hdlcd and snet-gateway.
Message send with WSN Presets and hdlcd-hexinjector.
e.g. 143 Byte hdlc injector message
>hdlcd-hexinjector.exe -c //./COM124@localhost:4999 -p "00 00 40 02 3f f7 00 09 17 00 06 00 00 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82 83 84"

@Tonacatecuhtli Tonacatecuhtli changed the title invinite send loops by s-net payload size > 131 Bytes (hdlc payload size > 142 Bytes) invinite send loop by s-net payload size > 131 Bytes (hdlc payload size > 142 Bytes) Nov 21, 2016
@Strunzdesign
Copy link
Owner

Strunzdesign commented Nov 22, 2016

Thanks for your report. This issue is not a bug of the HDLCd, but an issue of the downgraded HDLC protocol the s-net tag currently implements. Here, the node does not handle I-frames correctly that exceed the MTU due to missing HDLC session support. We have to switch to an implementation of "vanilla HDLC" in the very near future in order to handle this problem correctly. Such a change will affect the HDLCd as well, but we have to implement the missing pieces both for the s-net tags and the HDLCd at the same time. As long as the HDLCd does not receive a valid S-RR-frame regarding a transmitted I-frame, it will retransmit that frame forever causing a freeze of communications.

I keep this ticket open until we finally implemented and switched to vanilla HDLC. Until that, please avoid sending s-net packets that exceed the MTU of the tag ;-)

@Strunzdesign Strunzdesign changed the title invinite send loop by s-net payload size > 131 Bytes (hdlc payload size > 142 Bytes) Infinite send loop by s-net payload size > 131 Bytes (hdlc payload size > 142 Bytes) Nov 22, 2016
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