- Posts: 1386
which is MJX use protocol ?
- victzh
- Offline
Please Log in or Create an account to join the conversation.
- btoschi
- Offline
- Posts: 151
Minimum throttle I could input was 0x19 and thus it was trying to take off ...
Luckily I was holding it tight (it took a while to bind - luckily I did NOT just put it on my desk ^^ ) - only problem was pulling battery cable due to spinning rotors, but my fingers survived that task
Please Log in or Create an account to join the conversation.
- john
- Topic Author
- Offline
- Posts: 69
do you test f45 ? project final ?
Please Log in or Create an account to join the conversation.
- btoschi
- Offline
- Posts: 151
I'm very busy with work and family (two kids ), so time for RC projects is currently rare.
I still need to put the nRF module in my Devo 8S, build deviation and then port my code to deviation and then I can test it. Have a F648 now, which I can use for testing (tested to use very same protocol).
Please Log in or Create an account to join the conversation.
- john
- Topic Author
- Offline
- Posts: 69
i use TX turnigy 9ch ,output PPM
bind f45 ; move max thr and min thr, but rx don't reponse
Please Log in or Create an account to join the conversation.
- coolpix
- Offline
- Posts: 3
btoschi wrote: Okay, It seems I know the answer to my problems
I've attached another NRF module (with PA+LNA plus WiFi Router Antenna) to my arduino and I was able to bind my F45 RX with it (LED blinking steadily fast). This is not too reproducable and SPI capture tells me that I am mostly not in full sync - but TX sometimes transfers some packets (around at full rate before switching back to fast scan mode (skipping one channel) again.
My X200 board binds and the LED is constantly on - SPI capture not possible w/o soldering, but I can fly-test with my X200
I know that the original F45 has problems with binding when TX is too near to model (they even state that in their manual), and I'm using WiFi on my laptop where router is right under my desk - so there is plenty of Noise in 2.4GHz band.
And moving the receiver away from my laptop (Thanks Saleae for including such a nice, long USB cable) helped improving quality.
Testing further, bind with X200 board is really working fine (LED always lights up and stays so).
Checking my 2S LiPo I use to power the F45 board it may be that its just not properly charged (6.2V) and that's the reason why its not working (Last hope, I think ) ... charging ...
edit:
Arduino code (a mess, but you may get the idea )
Hi btoschi,
awsome work! I really admire it.
i am very new one in this 2.4ghz playing, and I am trying to build some funny flying rc toy with arduino.
I also have MJX 47 helicopter for fun and i would love to reuse its transmitter to control my new project.
I can really nicely control my MJX from arduino thanks to yours code. My problem is, i need exactly opposite of this: I need to read MJX tansmitter values with arduino. I tried to somehow "reverse" your code, by i wasnt succesfull in it. Can you please give me some hint, show some code or just point me somewhere, where can i find my answer?
Thank you very much
Please Log in or Create an account to join the conversation.
- btoschi
- Offline
- Posts: 151
that's good news its working for you with arduino and F47 from scratch.
Did you try to fly it with controls hooked up ?
I was never successfull with that, as transmission is very sluggish, though that my be due to the ATMega internal A/D converter being VERY slow and blocking program flow.
I don't have receiver code for that (never cared about that), but that should be straightforward to do starting with transmitter code and switching from transmission to receiving (check NRF24L01 datasheet on details)
I have sniffed SPI traffic on 998 V2 receiver (which uses the very same protocol), this might be helpful. Init plus transmission ...
Please Log in or Create an account to join the conversation.
- coolpix
- Offline
- Posts: 3
btoschi wrote: Hi coolpix,
that's good news its working for you with arduino and F47 from scratch.
Did you try to fly it with controls hooked up ?
I was never successfull with that, as transmission is very sluggish, though that my be due to the ATMega internal A/D converter being VERY slow and blocking program flow.
I don't have receiver code for that (never cared about that), but that should be straightforward to do starting with transmitter code and switching from transmission to receiving (check NRF24L01 datasheet on details)
I have sniffed SPI traffic on 998 V2 receiver (which uses the very same protocol), this might be helpful. Init plus transmission ...
Hello btoschi,
i didnt try to "really" fly, becouse i dont have any "my custom" controller attached to arduino. I just slightly modified your code, to not read values from analog pin and just "fake" it in code.
There is my result:
I think it would be possible to fly it with arduino as transmitter.
Thank you so much for traffic from reciever!
If i am not wrong, there is every short time command:
W_REGISTER(RF_CH) 26
wich i "see" as "select channel 26"
and next send data packet.
So my idea is to connect on correct adress, select channel 26 and start listening.
Ill try this and let you know
But anyway, thank you so much for helping me.
Please Log in or Create an account to join the conversation.
- btoschi
- Offline
- Posts: 151
You have to listen for bind packets on channel 08 (MJX bind channel) at first, so you know when someone is trying to bind plus you know the transmitter ID.
The protocol does use frequency hopping based on the Transmitter ID - you can see that in my arduino code (MJX_TX::setTXId()), its basically irrelevant whether you're transmitter or receiver for that part, as both have to hop the very same way.
Please Log in or Create an account to join the conversation.
- coolpix
- Offline
- Posts: 3
Ill try it, but i think i am stucked by now
I tried to do this:
pastebin.com/huNRWq6H (listen to channel 8 and see what is happening)
When i power of my transmitter, i get this packet:
START
GOT PACKET
126 255 255 95 246 247 125 125 190 246 247 237 215 111 174 187 GOT PACKET END
GOT PACKET
126 255 255 95 246 247 125 125 190 246 247 237 215 111 174 187 GOT PACKET END
GOT PACKET
126 255 255 95 246 247 125 125 190 246 247 237 215 111 174 187 GOT PACKET END
START
GOT PACKET
215 186 188 238 255 123 219 111 175 189 238 220 223 191 253 173 GOT PACKET END
GOT PACKET
215 186 188 238 255 123 219 111 175 189 238 220 223 191 253 173 GOT PACKET END
GOT PACKET
215 186 188 238 255 123 219 111 175 189 238 220 223 191 253 173 GOT PACKET END
START
GOT PACKET
255 251 251 221 191 183 238 238 253 253 246 255 119 127 221 253 GOT PACKET END
GOT PACKET
255 251 251 221 191 183 238 238 253 253 246 255 119 127 221 253 GOT PACKET END
GOT PACKET
255 251 251 221 191 183 238 238 253 253 246 255 119 127 221 253 GOT PACKET END
But it happen only 3 times and next nothing..
I think i need to study now, how this protocols works, or hack my other transmitter and implement my very own super simple trivial protocol )
Please Log in or Create an account to join the conversation.
- dc59
- Offline
- Posts: 799
I managed to but MJX X600 hexacopter , if I could use devo TX to fly it , it would be much better!!
Please Log in or Create an account to join the conversation.
- victzh
- Offline
- Posts: 1386
Please Log in or Create an account to join the conversation.
- dc59
- Offline
- Posts: 799
I hope MJX use same protocol on their all products.
Please Log in or Create an account to join the conversation.
- john
- Topic Author
- Offline
- Posts: 69
victzh wrote: I have F45 and F47 and plan to check what's going on with their protocols and see whether I can use btoshi's work to complete the Deviation module.
i hope you can complete soon and update on deviation .
Please Log in or Create an account to join the conversation.
- dc59
- Offline
- Posts: 799
Bad news~
MJX X600 seller told me, MJX use different protocol on quad and heli, they tried to bind X600 quad with F45/F47 tx,
it didn't work , too bad! I have my X600 on the way .
Please Log in or Create an account to join the conversation.
- SeByDocKy
- Offline
- Posts: 1016
dc59 wrote: Hi Victzh,
Bad news~
MJX X600 seller told me, MJX use different protocol on quad and heli, they tried to bind X600 quad with F45/F47 tx,
it didn't work , too bad! I have my X600 on the way .
I am not surprized .... I am sire they shifted to a XN297 protocol based. I saw recently a general move to this (even cheaper) chip...
Please Log in or Create an account to join the conversation.
- btoschi
- Offline
- Posts: 151
MJX X100 (and first version of F45) is using CC2540 based protocol.
As such moving to new protocol with new model lineup makes much sense.
But looking at these pictures www.aliexpress.com/item/CTT-RC-MJX-X600-...FPV/32337634987.html
I'm not sure they actually moved from Beken chip.
If you receive it, please take pictures from receiver board (or, even better, open transmitter and take pictures there, as that's where SPI needs to be sniffed ).
If they ARE still using Beken chip, it should be easy to compare SPI traces against (my) traces of F4x and X200,
I'm almost sure they just changed a little bit of the protocol,
like they did with x200 vs F4x (cannot remember exactly, but one transmitter will bind both, the other not).
Its just an 'Hardware ID' which differs plus one bit of the flags is constantly set to 1 on the one protocol.
Which still means: We (me ?) need to get the channel-hopping timing fixed, but it can be in deviation one day.
I CAN bind (most times) and control (very sloppy) X200 with my code, but did not manage to bind F45 boards or F48.
Please Log in or Create an account to join the conversation.
- dc59
- Offline
- Posts: 799
I will post the X600 board picture once I get my X600, but I can't do SPI sniff ...
Hope X600 could be deviated.
Please Log in or Create an account to join the conversation.
- dc59
- Offline
- Posts: 799
Please Log in or Create an account to join the conversation.
- dc59
- Offline
- Posts: 799
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Protocol Development
- which is MJX use protocol ?