Repository navigation
Conversation
… the firmware answered meshcore-cli's own commands for talking to one node, which the CLI table already listed as known but not answered. Each is answered twice in the transcript, matched to the request: when the firmware says it sent it, and when the ack, login reply or status comes back, stamped in simulated time. RESP_CODE_SENT, PUSH_CODE_SEND_CONFIRMED and the login and status pushes are decoded for the first time.
The bridge records the time of each tick it sends, and a frame the node writes while running that tick arrives before the tick's ack, so that is when the frame was said. Read without the engine's lock, from the goroutine reading the node's output.
The CLI, where meshcore-cli's answers land, could only be reached by a click, so nothing could photograph or check it.
… serial bytes Every tick replaced the console lines with the node's raw serial buffer, which for a companion the session holds is binary frames; the CLI pane showed noise with a contact's name in it and never the answers.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The companion command line listed meshcore-cli's
msg,login,req_statusandscopeas commands it knew and did not answer, and nothing decodedRESP_CODE_SENT,PUSH_CODE_SEND_CONFIRMEDor the login and status pushes. So a companion could flood a channel and do nothing else people do with one: no direct message, no login, no status request. On ScotMesh those are over half of what the mesh carries.This adds the four commands in meshcore-cli's own words, to the same table
console.cliandschedule.addread, so they are typed in the companion's CLI tab and scheduled in a fixture alike.msg <contact> <text>,login <contact> <password>,req_status <contact>: the contact by the name the node holds it under, or by key in hex. A name the node has not listed is refused with "holds no contact"; a key is sent as given, and the firmware answers "not found" itself.scope <name>, orscope *for unscoped.sent msg to X by flood, waiting up to 7060 ms), and when the ack or reply comes back (delivered to X after 1240 ms: text,login ok from 49d7…,status from 49d7…, 60 bytes, orrefused). The firmware answers in the order it took commands and does not say which command an answer belongs to, so the session keeps the requests in order.Found while running a 241-node native ScotMesh scenario, where these were the traffic that could not be generated.
In the GUI: the companion window's CLI tab, which a new
-companion-mode Client|CLI|TCPflag opens directly, so it can be captured. While a companion is held by its session,console.readnow returns the transcript rather than the raw serial bytes.Tests: decoding of both receipt frames and the answers, the request layouts, receipts matched to the right request when two are in flight, a refusal attributed to the oldest request. Run live against companion-v1.17.1 and repeater-v1.17.1 native builds: login answered in 0.9 s, a 60-byte status reply.
Docs: MeshBench/docs#43