mattdibi / redox-w-firmware

Firmware for nordic MCUs used in the Redox wireless keyboard
MIT License
77 stars 42 forks source link

How does channel table work? #24

Closed marco73 closed 3 years ago

marco73 commented 3 years ago

I like the Redox wireless so much, I made a second one. What I already thought, all keyboards are connected to each other as they share the same channels. I've looked into the answer you gave on another topic but cannot find out how to interpret the channel_table.

As is in code: #ifdef COMPILE_LEFT static uint8_t channel_table[3]={4, 42, 77}; #endif #ifdef COMPILE_RIGHT static uint8_t channel_table[3]={25, 63, 33}; #endif

According to NRF documentation there are 31 channels,. So I assume the first entry is the channel and the second value is 38 higher (bandwidth?) but for the other value in the channel table I cannot find anything on how to interpret/configure it.

Can someone help me with this or have a better method to connect a receiver and transmitters to each other?

mattdibi commented 3 years ago

Hi,

#ifdef COMPILE_LEFT
static uint8_t channel_table[3]={4, 42, 77};
#endif

are the channels used by the left transmitter.

#ifdef COMPILE_RIGHT
static uint8_t channel_table[3]={25, 63, 33};
#endif

are the channels used by the right transmitter. The receiver will use all of them as you can see here. You'll need to change them consistently for receiver and transmitters.

You might also want to change the address of the keyboard. References:

marco73 commented 3 years ago

I see I read the channels_table wrong. Found the correct NRF51 documentation. The NRF51 has 80 channels and the table hold just three channels which it will use. So I changed the channels to different channels but got a lot of weird/unwanted behavior on other channels.

In the end I changed the base_address_0 and base_address_1 and kept the channels_tables unchanged. Both keyboards don't interfere with each other and I did not notice any lag when both keyboards were used.

Thanks for the help and for sharing the designs!