- Posts: 85
Bugs 3 mini
- JayDrone
- Offline
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
Please Log in or Create an account to join the conversation.
- JayDrone
- Offline
- Posts: 85
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
Please Log in or Create an account to join the conversation.
- JayDrone
- Offline
- Posts: 85
Please Log in or Create an account to join the conversation.
- JayDrone
- Offline
- Posts: 85
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
Please Log in or Create an account to join the conversation.
- JayDrone
- Offline
- Posts: 85
Please Log in or Create an account to join the conversation.
- planger
- Offline
Much more better.goebish wrote: I noticed there was a few errors the first time I dumped it, I fixed a few manually but probably missed some.
I made a 2nd capture which should be fine (more checks), it's in my dropbox folder:
www.dropbox.com/sh/nrc4oppo121887l/AABQ_...IEn8A7BYvH5BpGa?dl=03010,30 3d 10 a9 ce ,12304,-50
Not fully tested yet but I've simplified the huge table translating rxid to address with a table of 23 * 4 bytes = 92 bytes. It needs a maximum of 23*255 trials/loops to find the right txid which needs to be done only once at bind time.
I'll see if I can compact it even more but that's already a good start to get something working.
Time to sleep, more tomorrow.
Pascal
Please Log in or Create an account to join the conversation.
- JayDrone
- Offline
- Posts: 85
Please Log in or Create an account to join the conversation.
- C0ckpitvue 777
- Topic Author
- Offline
- Posts: 409
JayDrone wrote: worked flawlessly
Jay if you got time to post your model ini.,for others it'll really help a lot of people with the jumper or a how to video also mentioning your jumper version.
Please Log in or Create an account to join the conversation.
- planger
- Offline
Pascal
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
46 bytes instead of 128kB!
Please Log in or Create an account to join the conversation.
- JayDrone
- Offline
- Posts: 85
Please Log in or Create an account to join the conversation.
- Einsteins
- Offline
- Posts: 4
i just followed tutorial step by step with latest build
im using jumper t8sg v2 plus
when bind process, it working, and i got rxid (green column)
but when i put address follow the list (blue column)
and rebind on off transmitter, the drone couldn't connect
i need help here
hey i try bind mjx b3h with this protokol, it working, really good
all channel is supported, arming, led, flip, swith altitude hold on off
thank you so much guys
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
Please Log in or Create an account to join the conversation.
- planger
- Offline
100% match of your extracted table and my codegoebish wrote: Good job!
46 bytes instead of 128kB!
Here is the rxid2txid function:
void rxid2txid(uint8_t rxid_high, uint8_t rxid_low)
{
uint8_t start, length, index;
static const uint16_t end[]={
0x2d9e, 0x95a4, 0x9c5c, 0xb4a6, 0xa9ce, 0x562b, 0x3e73, 0xb895, 0x6a82, 0x9437, 0x3d5a,
0x4bb2, 0x6949, 0xc224, 0x6b3d, 0x23c6, 0x9ea3, 0xa498, 0x5c9e, 0xa652, 0xce76, 0x2b4b, 0x733a };
if(rxid_high==0x00 || rxid_high==0xFF)
rx_tx_addr[0]=0x52;
else
rx_tx_addr[0]=rxid_high;
rx_tx_addr[1]=0x3d;
if(rxid_low==0x00 || rxid_low==0xFF)
rx_tx_addr[2]=0x66;
else
rx_tx_addr[2]=rxid_low;
for(uint8_t end_idx=0;end_idx<23;end_idx++)
{
//calculate sequence start
if(end_idx<=7)
start=end_idx;
else
start=(end_idx-7)*16+7;
//calculate sequence length
if(end_idx>6)
{
if(end_idx>15)
length=(23-end_idx)<<1;
else
length=16;
}
else
length=(end_idx+1)<<1;
//scan for a possible solution using the current end
for(uint8_t i=0;i<length;i++)
{
index=(i>>1)*7+(((i+1)>>1)<<3);
index=start+index-rxid_high;
if(index==rxid_low)
{ //solution found
rx_tx_addr[3]=end[end_idx]>>8;
rx_tx_addr[4]=end[end_idx];
return;
}
}
}
// Something bad happened if we arrive here....
}
Pascal
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
Please Log in or Create an account to join the conversation.
- planger
- Offline
It can take up to 23*256 iterations to find the tx address depending on the rxid value. But it should be pretty quick anyway since the calculations are quite simple. It can be speed up by pre calculating a table upfront but it would cost 16 bytes of ram, I haven't done it since I think you are always short in ram usage?
I would save the rxid (2 bytes) and always call the function to get the tx address when needed at init and bind.
Pascal
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
www.dropbox.com/sh/nrc4oppo121887l/AABQ_...IEn8A7BYvH5BpGa?dl=0
(we still have to store Rx Id in protocol options but just ignore it ...)
Channel 5: Arm
Channel 6: Leds on/off
Channel 7: Flip mode
Channel 8: Snapshot (requires mjx wifi camera module)
Channel 9: Record video (requires mjx wifi camera module)
Channel 10: Angle / Acro mode
source: github.com/goebish/deviation/blob/protoc...bugs3mini_nrf24l01.c
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Protocol Development
- Bugs 3 mini