-
Notifications
You must be signed in to change notification settings - Fork 122
MSP Rx Reboot #394
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
MSP Rx Reboot #394
Conversation
|
VERY NICE could it make sense to grab the opportunity to also define a MSP_START_RX_PAIR, to set the receiver into bind mode, similar to what we have for mavlink? the mavlink version requires three commands to be send before it is accepted, we are sure we don't want such a level of protection here, right? |
I suggest this for separate PR, as a corresponding INAV update would be required here. Currently, the INAV CLI sends 'bind_rx' message to the FC which then sends the necessary stuff for a Spektrum or CRSF receiver - it doesn't passthrough this MSP messge to the FC/Receiver. https://github.com/iNavFlight/inav/blob/master/src/main/fc/cli.c#L3578-L3597
So INAV will only enter passthrough mode (which is used for programming) in the first place if the craft is disarmed, so I think this should be safe. |
|
since we have the MSP_RC Messages introduced, this would make sense. I just need to clarify with the guys how to do that since a MSP receiver is not tied to a specific serial port (like in Ardupilot) but just listens to the MSP Parser. So to make this possible, we would send the message to up to 3 MSP devices at the same time that did not request it. That would be against MSP Design specifications and we can't predict how certain devises (like a MSP Lidar Sensor, ESP Radar, 5G relays, etc) behave now or in the future. Will have a chat with the devs but I have doubts. Edit: |
So this is a gap in my current implementation (any baud rate other 115200 won't work at the moment) but that is straightforward to address. However, the STM32 bootloader talks 8E1, so I still need the INAV update to mirror the encoding and baud rate after entering passthrough which INAV doesn't support today. Process would be:
|
|
@jlpoltrack @b14ckyy all MSP messages which the mLRS receiver sends out (either to the ground or the FC) have the flag MSP_FLAG_SOURCE_ID_RC_LINK set. This is the flag which was introduced to differentiate the origin of the MSP messages. INAV calls it somewhat differently (forgot, inline or so). To be consistent I thus have set this flag also for the response to the FC when the reboot is accepted. |
|
as regards rx_bind. I hear you but I rerally don't understand why it should be so asymmetric for reboot and rx_pair, doesn't make sense to me. |
|
@olliw42 But for MSP and Mavlink this switch is not enabled. You just enable 1-3 Serial ports as general MSP ports (one is actually already on USB-VCP but not visible). So then you just tell INAV to accept RC inputs through MSP by enabling that in the receiver tab. So in the end INAV will take any RC messages over MSP, no matter over what serial port they come from. You could even feed RC directly over USB then. So INAV literally does not know at what port the Rx sits. And yes that way even receiver redundancy can be done, as long as you can silence one or make sure they don't send the same channels. And since MSP is a request-answer protocol, I think it was never intended to send a MSP message out of any serial port without being requested through this specific serial port. TL;DR I will have a chat with Sensei and Jetrell to see if we can do something since they know the inner workings of INAV much better than I do. |
|
THX |
|
@olliw42 He pulls the serial config from INAV and lists all ports that have MSP enabled in his web flasher. the User then picks the port where he has the receiver connected to and this port is then enabled for passthrough. So its not fully automatic. But I might miss something here. If he found a way to send that command to the Rx then it should work with bind too. @jlpoltrack |
ohh ... ahh ... ohhh ... ok, fair enough. I missed that point. |
|
Spot on. To clarify a little further, for both INAV and AP, you can only have 1 serial receiver so they can route the bind to the correct port whereas for MSP and MAVLink you can have multiple, so user would need to be able to pick which one. |
|
@jlpoltrack the question is now. How do you send the reboot command? Is that done before or after the Passthrough is enabled? |
Reboot is sent after entering passthrough.
My INAV update mirrors the baud rate on the PC if it changes while in passthrough, so you can enter passthrough at the baud the receiver is using for MSP (says 57600 for example) and then can still flash without problem at 115200. Relevant bit is here: https://github.com/iNavFlight/inav/pull/11256/files#diff-ee5073ff48ff08ac67809a1bc5ee88b59533dc6a12557b98ce9142c555a1c6eaR642-R646 |
|
Ahhh perfect. That makes sense now. Do you know why the Build Check failed on so many? I added Sensei to review your PR. I am not sure if there is a failure in the auto build process or something needs to be done to fix these. Some firmware's seemed to go through. Regarding the For mLRS bind, we would need one of two options:
I can't say which is better. |

For future INAV Passthrough functionality, use the MSP Reboot command to put STM32 receivers into system bootloader.
Tested in combination with: https://jlpoltrack.github.io/mLRS-Flasher/inav-passthrough/
Requires: iNavFlight/inav#11256