-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Webserver port + P2P information exchange #3053
Conversation
@@ -364,6 +368,8 @@ void sendSysInfoUDP(byte repeats) | |||
data[14] = Settings.Build >> 8; | |||
memcpy((byte *)data + 15, Settings.Name, 25); | |||
data[40] = NODE_TYPE_ID; | |||
data[41] = lowByte(Settings.WebserverPort); | |||
data[42] = highByte(Settings.WebserverPort); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if on the receiving side the message is accepted if its size differs from before.
Also on the receiving end you must make sure to realize this can be missing information.
Also there is some extended data version of this message if I'm not mistaken.
Maybe we should also introduce a version/revision of this message type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we send here 80 bytes and check only if 1st byte is 255 and packet len is more than 2 bytes
maybe we can use here build id on receiver site, but it is not a problem, because old builds not use these data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But do they check for packet type based on the length of the packet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean rpieasy or older versions of espeasy?
on our side we have only check for length of packet but in fact it is always true because we send/receive always 80 bytes :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought there was some part of the p2p code that actually checks on the length of a packet.
But maybe the length is a parameter in the data itself.
Have to check the code as the correctness of my memory also has some variation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've -by accident- come across this code myself as I needed to store node information received via another entry point and indeed it is a bit more data that's being sent.
I'm now creating a struct for it so we can just byte copy the whole struct at once and also extend with other features.
I will also add the port number as you added and maybe some more fields too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TD-er so you want to merge this and extend with your work?
be aware about endiness of ints - arduino declares cpu as bigendian so can't store it directly thats why used here lowByte/highByte and makeWord
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also think about it and we should have these structs in src/DataStructs/...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already have it in src/DataStructs :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TD-er and what about rest of webserver port stuff (not related to p2p)?
@TD-er in ESPEasyStorage.ino line 155 we have test for build numbers with <= do i have to add there +1? |
A test build is running and will be ready in about 10 - 15 minutes. |
A [est build: ESPEasy_mega-20200426-70-PR_3053.zip |
Just quickly tested: It looks to be working fine, tested with Webserver Port change to 81. Thanks for the great job! |
I tested the links generated on the start page and it generated links to older units with random port numbers. |
ok will add one more test there |
@TD-er here you are :) |
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
@TD-er any news with this PR? |
I will add some of the code I made for the other project I work on and then I will merge it. |
thx, so now will try to find next bug/feature to resolve :) |
Preferably bugs, as I would like to add a release stamp on it. |
do you have a list of most wanted? |
Not really the most wanted, but since you've also been working on ESP32, and I haven't looked at this one, maybe you can have a look at #3079 |
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
Also added the webserver port in PR letscontrolit#3053
@TD-er something new :)