Closed richardclli closed 4 years ago
I don't have access to a TX/RX so nothing will happen on my end.
Well, anyway, I just want to see if anybody interested. Since, it seems the native protocol have telemetry of voltage feedback as well.
I don't think anyone will jump here since they are using the forum instead. If you have the original remote why don't you go ahead and open it up so we can see what RF chip is used and may be start to do some dumps?
I will try to work out some details on this protocol once I have got the radio.
Just got the radio hardware, the wireless chip is XN297LCU, seems this chip is not present in the 4in1 or 5in1 module.......
It is supported by the 4in1. Start doing dumps.
Here is my first dump. The dump starts before switch on the radio, and ends after the radio finished initialized.
This the the dump during binding:
The radio has telemetry as well, only voltage feedback.
Capture for some stick movement.
The excel files you are sharing are not exploitable.... You need to share the logic files.
I can't do anything with these files something is wrong... I need the logic analyzer files to see what you've done...
These files are decoded SPI data. I used the setup as per XN297L datasheet, CS low activate, SCK rise edge, data MSB first. I also added coloring to separate the communication steps by long idle timing.
I can attach a raw dump here, but not sure if you can read it. I use DSView and it can save raw timing files that can store the waveform captured. Or you may suggest a format that is good to you. Will work this out when I have some spare time later.
Sorry but these excel files are shitty. Please share the original dsview files.
Alright, here you are, see if it helps. I do this:
Please rename the file and remove the ".zip".
Seems some commands are not recognized properly. I have updated the nrf24l01 decoder for xn297 chip. You may put this in the decoder folder to replace the old one.
Using the dsview file I can now fully decode the SPI:
I hope the auto ack used during bind and some normal packets is not needed for the protocol to work since we can't emulate it...
Bind:
For the normal packets, I would need separate dsview file for:
Normal:
Will try to do dumps of each channel when I am available.
For the normal packets, I would need separate dsview file for:
* each stick Aileron, Elevator, Throttle, Rudder with what has been done example: AIL_MID_LEFT_RIGHT * each feature button like flight modes, rates...
I have done your requested dumps, the first dump is the default.dsl with the following settings and I change one switch/stick to worked out another dump:
IDLE=0 MODE=Alt D/R=70% HOLD=Release Thr=down Rud=center Ali=center Ele=center
And I have worked out the telemetry feedback of 3 different battery voltages as well, please see if this is good to you for analysis.
Hummm... From the file names I understand that you have moved elev up took a dump, then elev dow another dump,... Is that it? This is not really what I've asked. But let's see what I can figure out from this.
As I was thinking these dumps are not usefull at all. I spent 1 hour looking at them for nothing...
I think I may figured out something meaningful:
Can we start code something for testing? So we can test out how the fields affect the heli movement. I have attached the file that I used for analysis for your reference.
Just figured out some more about RUD, maybe P[12] is related to RUD as well, need more test to verify.
I've already seen all that. The channels are most likely on 11 or 12 bits that's why you can't see it clearly. There is nothing to code right now. When I will have good dumps to work on then I'll look at it again. I mean why don't you just provide what has been requested since the beginning? We are just loosing time because the dumps are not done correctly. This protocol is damn simple and should have been reversed in less than 20 minutes. But 3 days later we are still talking about dumps.
You are so amazing, I am finally be able to decode the 4 channels: thr, ail, ele, and rud because of your insight given. P[7-12] are encoded by 11-bit for each channel from P[7] to P[12] as LSB to MSB, trying to work out some more about the switches. From various experiments, pitch is not send to receiver, only 4 channels with some switches.
P[2]P[1] => 16 bits B[16..0] B[5] = 0 Release, 1 Hold B[11,10] = mode: 0, 1 alt mode; 2 3d mode B[13,6] = idle: 0, 1, 2 (0 no -ve pitch, 1, 2, +ve and -ve pitch)
It looks a bit strange, no sure why the 2 bits idle separates so far.
Here are some dumps for you to verify:
For switches: HOLD 0, Mode 0, Idle 0 -> HOLD 1 -> HOLD 0 -> HOLD 1 -> Mode 1 -> Mode 2 -> Mode 1 -> Mode 0 -> Idle 1 -> Idle 2 -> Idle 1 -> Idle 0
And for Voltage telemetry: Voltage = 12.6 -> start dump -> gradulate reduce voltage step by step to 10V
For telemetry, the received packet R(16), R[3R[2] seems contains the battery voltage information.
OMP protocol available in Multi v1.3.1.56.
Thank you!! I will test it out and report to you if this is good or not.
I tried the followings and not able to bind:
It seems not to bind, then I tried to tune the Freq, but still cannot get the bind. Anything missing?
I'll have a look but can you answer my previous question about the bind?
Try v1.3.1.57, I've fixed something
After binding, even the stick is moving, the servos will jiggle. Trying to fine tune the freq did not help. However, the stick movements and switches seems functional.
I figure out the problem in your code. Attached is a fixed version. It looks usable, will try to test more and have a flight this weekend.
After fixing the code the freq tuning need to be non zero to stop the the servos from jiggering.
And I figured out the Ail and Rud are reversed, I revised the code again as follows:
No telemetry yet? It has battery voltage feedback, I think we can add it in using HUB telemetry with only voltage feedback.
Try v1.3.1.58. Telemetry won't work with the current emulation layer. In fact, I'm not even sure it's possible... I would need access to the heli to see what can be done.
The modified code is good to go, it works.
For telemetry, I read the code of the emulation layer, so only the sending is implemented, but not receiving. But by theory, is it possible to implement the receiving as well? I can refine the code if I have some prototype to start with.
The problem here is that they have used a special mode to send the data back. Instead of using the traditionnal TX+RX approach, they are using an ack reply. It means that you not only need to figure out how to receive the data and decode it (XN297 is scrambling the data) but you also must be able to turn from TX to RX instantly since the answer over air is really back to back (at least if it's acting like the NRF which the XN297 is based on).
FYI I've already written in the past the code to receive a NRF ack reply (which I haven't kept sadly) but it never worked due to the switching time from TX to RX of the NRF in normal mode (ack packet is really sent right at the end of the original packet). Maybe the CC2500 will do better since it is using a bitrate of 250K but that's a lot of work with low chance of success (not saying it's not doable). Is it worth it? And without having the hardware to play with makes it even more a challenge...
Tonight I used my Jumper T16 to connect to my OMP M2 and found that is is stable even using freq tuning 0. I think Jumper T18 has hardware problem that cause a lot of interference that may cause problems. If using NRF24L01 instead of CC2250, is telemetry possible?
Test flight yesterday, I used a Jumper T16 to do the test, it is stable with freq tuning at 0, use NRF2401 directly. I flew for around 10 batteries and everything is good. ^.^
Ok let's call this protocol done for now. If I ever put my hands on this heli I'll look at the telemetry.
Just want to see if anybody interested in working out the native protocol for OMP Hobby M2 helicopter. I do not have much information yet. And not sure if anybody working on this protocol.