-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Multidrop / Master+Slaves on RS485 or similar #26
Comments
Hi, Unfortunately, the full duplex version ( However, you can still write communication using tinyproto's |
Hello, |
Hi @michcfr , According to your picture there are 2 diodes blocking TX line for 2 slave devices. ABM mode is the mode that requires confirmation, so any node in the network must have the ability both to read and send data asynchronously. Your scheme doesn't allow that, thus PS. HDLC NBM and ARM modes have address fields, however in many HDLC implementations the field is not used and usually initialized to either 0xFF or 0x01/0x03. The tinyproto library initializes that field to 0xFF all the time. |
Hello Aleksei, The diodes are not blocking the TX line for the 2 slave devices. Diode exists just for electrical protection reasons only. In the case of tiny_fd, can you please show me in the source code where I can get the address fields? I suppose this is also a fixed value of 0xFF? |
This is my understanding also.
tiny_fd_int.h line 51: I'd like to have simple arrangement and coordinate where the master polls the slave, and only the addressed slave responds. |
ok I see. |
Hi
Oh, my bad. I was confused with the diagram. Some of the hardware manufactures require pull-up resistors for the Tx-Rx line. Absolutely agree with you
You can check the file tiny_fd.c. Look for
Good point, but that requires a different HDLC mode - not ABM, maybe NRM.
ABM mode is usually invoked with async modes, when each station can send at any time, and there are no master and slave devices. Current implementation of the ABM HDLC mode can be used only in P2P connections. The user data is transferred in I-Frames, which need confirmation from the receiver, and there is only a single N(s) N(r) table in the current tinyproto implementation. For your case, the master needs separate N(s) N(r) tables and different frame pools for each slave station.
The address field in the HDLC is exactly for the same purpose - it should contain a slave address, whenever the master sends to and receives from the packet.
Is this question for me? The library can be used in Arduino IDE as is. |
Hello Aleksei, I'd like to have a simple arrangement.... ABM mode is usually invoked with async mode.... thx |
That's not so easy to update that code to work with multiple stations. I mean |
Here are the steps, which are required to reach the goal.
For example, if you have window size (maximum number of unconfirmed frames) for each slave station equal to 4, then the master device must be able to keep 4 * N unconfirmed framed. If we're talking about the picture, then 4 * 2 = 8. This step also requires on the master side to have
This step required API change, because you need somehow to inform the protocol that specific data is for specific slave station only. There are 3 ways to implement that:
Actually this can be easily implemented, for example, by adding the address field to initialization data for tinyproto.
In current implementation P/F bit is always set to 0 for I-Frames, and is always set to 1 for S and U-Frames. Because the protocol actually fully asynchronous, i.e. each station can transmit at any time it wants. But that plays a bad role in your case, because of the collisions, when 2 slave devices want to send data at the same time. |
Let me know how it goes. |
Things to do to implement multiple devices support on a single serial interface:
|
Things to do to implement multiple devices support on a single serial interface:
|
Things to do to implement multiple devices support on a single serial interface:
|
Let me know if you want Multidrop feature to be implemented. |
I think it would be very useful :)
…On Mon, 7 Feb 2022, 12:40 Aleksei, ***@***.***> wrote:
Let me know if you want Multidrop feature to be implemented.
—
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIWBBRMY4OURH6XUF5V25LLUZ4WJLANCNFSM5IBBHDHQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Basic implementation on NRM protocol (Multidrop support) is ready. There are new API's to use for NRM. First of all
Next new APIs Some old API's have changed, let me know if there are some issues with them. |
Is there any possibility of using this between 2 or more nodes in a small network, with simple addressing? Or any suggestions of a protocol that is light and can support more than 2 nodes?
The text was updated successfully, but these errors were encountered: