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

Startup / connection sequence: Best practices #12

Open
Diamondback2010 opened this issue Jan 28, 2020 · 2 comments
Open

Startup / connection sequence: Best practices #12

Diamondback2010 opened this issue Jan 28, 2020 · 2 comments

Comments

@Diamondback2010
Copy link

Hello,

I'm looking for some information on best practices for the startup and connection process.
Right now it appears that a connected hub immediately triggers its IO attached events for devices already attached at startup.
However, I noticed that this sometimes takes multiple seconds to complete (for example, 3 out 4 of attached messages arrive right away while the 4th arrives 4 or 5 seconds later), which makes judging the connection state a bit difficult.
Are there any tips on how to best time the connection process so that the connecting side is aware of "when" the handshake and everything is done?

@marcrupprath
Copy link

I am thinking about this, too:

Question is why whe wan't to know a specific "attached profile" ?

Two simple cenarios:
Opperarting Rally car, and Crawler with same (hardware) remote conrol.

Knowledge of attached profile is needed , because Motors configuration is different in number an connection location.

I solved it as follows:

  1. At first i have stored the MAC Addresses of the hubs my cars have in the µC ROM.
  2. I have also provided a button where i can toggle the car profiles.

As a result i can opperate both car types using both hubs, with only minor selection opperation by the user, its a simple seelction switch on the remote you can use a toggle switch also,

Following the "KISS" concept: Profile indication is done by a simple LED and pulse code.

As a result a don't need to gues or read the configuration because i always know what is the real configuration of modell selected.

hope that helps.

Marc

@marcrupprath
Copy link

An addition:
I am thinking about what would be a good practise to identify a new hub within a group of others.
Assume that you are curently do not know any specific mac address.

My idea is to do as known from the "Binding" process of comon RC Remote controls.
I think it must be possibe to attach a "unique" Resitor value to Port "A " for example.
Question is i don't know exactly which connection to use and what the value will be when hub gets connected.

Doeas someone have a simple answer to do so ?

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