Serial Pass Through Mode, Configure OSD without disconnect

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
User avatar
haydent
Posts: 583
Joined: Sun Jun 17, 2012 1:35 am
Location: NSW, AU

Serial Pass Through Mode, Configure OSD without disconnect

Post by haydent »

  • This is a simple mode i want integrated into multiwii msp, until then, here is the code as patch's.
  • Can i please request reservation of MSP_PASSTHRU_SERIAL 244 in MSP for this, or be assigned another number if one better suits.

:idea: It's a real time & labour saver meaning you can communicate with for example your serial connected osd (or any serial connected device) without having to disconnect it and switch your ftdi between flight controller and osd. The flight controller is switched into this mode via MSP command, that can be issued via osd gui, once activated the fc just passes data backwards and forth between serial 0 and the chosen serial port.

:!: When in this mode, the flight controller does nothing else, and it becomes its dedicated task for latency reasons. A reboot is required to leave this mode.

:ugeek: Firmware upgrades are possible too, but that's where it gets a bit more complicated, as you will need hardware means to selectively switch the ftdi reset line from between the ftdi and fc to the osd instead, as the fc must be running in pass through mode at the time the sketch is uploaded, and not be in the process of rebooting from a reset command, and the osd must get the reset command instead to initiate its sketch upload mode.

:arrow: Attached is the multiwii code i propose, patched against 1745, and the code for multwii osd to generate the msp command to activate it with a new button that is clicked once comport connection is established:
Attachments
mw_osd_Serial_Pass_Thru_r22.zip
(972 Bytes) Downloaded 245 times
MultiWii_shared_Serial_Pass_Thru_r1754.zip
(1.26 KiB) Downloaded 227 times

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Serial Pass Through Mode, Configure OSD without disconne

Post by Hamburger »

from what I understand this is only applicable if more than one serial port is available. That would be the 2560 systems.
The functionality is quite dangerous to be accessible via MSP, so it is good to secure it with if(!f.ARMED); which you did.
I would at least like to see all related code be #ifdef.ed away - not hard to do.

I have no idea if the functionality is of general interest.
Bluetooth serial modules usually come without reset button; not much to configure once setup - so I do not see any advantage in that case. I would like to hear from others which serial devices they have attached and need to access after initial setup?

User avatar
haydent
Posts: 583
Joined: Sun Jun 17, 2012 1:35 am
Location: NSW, AU

Re: Serial Pass Through Mode, Configure OSD without disconne

Post by haydent »

That would be the 2560 systems.

yes, it could be made dependent on that being present
The functionality is quite dangerous to be accessible via MSP,

no more dangerous than some the other commands available, but as you notice, protected with "if armed" as others are too.
#ifdef.ed away - not hard to do.

i thought i had, but this can be corrected, only being enabled if PASSTHRU_SERIAL is defined
I have no idea if the functionality is of general interest.

well no a bluetooth module there would be no point, but an osd is something you are more likely to be changing settings

btimby
Posts: 2
Joined: Tue Mar 22, 2016 3:39 am

Re: Serial Pass Through Mode, Configure OSD without disconne

Post by btimby »

Hi, any feedback on this? I am keen to add this feature to Cleanflight. I already added support for this via the CLI and would like to extend it to MSP. I am currently implementing this in the MWOSD GUI and would love to support MultiWii AND Cleanflight in my implementation.

Thanks.

User avatar
haydent
Posts: 583
Joined: Sun Jun 17, 2012 1:35 am
Location: NSW, AU

Re: Serial Pass Through Mode, Configure OSD without disconne

Post by haydent »

@Hamburger ?

btimby
Posts: 2
Joined: Tue Mar 22, 2016 3:39 am

Re: Serial Pass Through Mode, Configure OSD without disconne

Post by btimby »

@Hamburger, please allow me to address your concern regarding general usefulness. I wrote a serial passthrough feature for Cleanflight for myself. I have a copter (Atom, RX122) which is tiny. I direct soldered everything and after completion noticed that I needed to upload the font to my micro minimOSD. Instead of tearing the copter apart, I added the ability to program it in place via the flight controller.

This is actually a pretty popular request for Cleanflight, Betaflight etc. My implementation for Cleanflight allows serial passthrough to be enabled via the CLI, meaning this is a manual affair. I would rather enable this via MSP so that it can be automated, for example by the MW OSD GUI, which would make this more accessible for folks to use.

This feature will become more and more useful as flight controllers gain more and more functionality and serial ports. Also, as devices and peripherals become more widespread. I am an avid user of MultiWii, all of my copters run MultiWii in some form or another. My goal is to support MultiWii and ensure it continued usefulness and relevance.

Therefore, yes, I believe this is an important feature moving forward, and is invaluable in some situations (such as my genesis situation described above). I also believe that standardizing the MSP command for enabling serial passthrough will be beneficial as the entire MultiWii ecosystem and tools will more readily remain cross-compatible at least in this regard.

I request that the MSP command for serial passthrough be officially allocated and additionally that it accept an optional parameter specifying the target serial port. For Cleanflight this parameter would be an integer identifier.

Post Reply