Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to debug wireless issues? #104

Open
Algram opened this issue Jan 31, 2020 · 18 comments
Open

How to debug wireless issues? #104

Algram opened this issue Jan 31, 2020 · 18 comments

Comments

@Algram
Copy link

Algram commented Jan 31, 2020

Hi there,
I managed to get my keyplus boards working in wired mode. I want to use one of the boards as the wired receiver and the other board completely wireless.

I can not get the wireless working. I tried everything the last couple hours. The RF settings and the layout should be correct:

# Generated on 2020-06-31 at 20:06

rf_settings:
  aes_encryption_key: encryptionkey
  auto_retransmit_count: 15
  data_rate: 2mbps
  pipe0: bcf32b924c
  pipe1: 1f7b477795
  pipe2: '74'
  pipe3: ae
  pipe4: '71'
  pipe5: '00'
  rf_channel: 119
  transmit_power: 0db
version: 0.3.3

devices:
  receiver:
    id: 0
    layout: receiver
    wired_split: false
    wireless_split: true
    scan_mode: # rf dongle, so don't need a matrix
      mode: pin_gnd
      pins: [
        D3
      ]
  gamepad:
    id: 1
    layout: gamepad
    wired_split: false
    wireless_split: true
    layout_offset: 0
    scan_mode:
      mode: pin_gnd
      pins: [
        D3, D2, D1, D0, A0,
        A1, A2, A3, A4, A5,
        A6, A7, B0, B1, B2,
        B3, C0, C1, C2, C3,
      ]
      # maps how keys are physically wired, to how they appear visually

layouts:
  receiver:
    layers: [
      [ # layer 0 (base)
        [
          x,
        ]
      ],
    ]
  gamepad:
    default_layer: 0
    # This layout shows how layer keys can be chained together. If L1 and
    # L2 are pressed on the base layer, then L3 is activated.
    layers: [
      [ # layer 0 (base)
        [
          esc , 1   , 2   , 3   , 4   ,
          tab , q   , w   , e   , r   ,
          lsft, a   , s   , d   , f   ,
          lctl, x   , g   , c   , spc  ,
        ]
      ],
      # [ # layer 1 (lower)
      #   [
      #     '~' , '!' , '@' , '#' , '$' , '%' , '^' , '&' , '*' , '(' , ')' , ____ ,
      #     del , F1  , F2  , F3  , F4  , F5  , F6  , '_' , '+' , '{' , '}' , '|'  ,
      #     ____, F7  , F8  , F9  , F10 , F11 , F12 , iso~, iso|, home, end , ____ ,
      #     ____, ____, ____, ____, ____, ____, ____, L3  , ____, ____, ____, ____ ,
      #   ]
      # ],
      # [ # layer 2 (raise)
      #   [
      #     '`' ,  1  ,  2  ,  3  ,  4  ,  5  ,  6  ,  7  ,  8  ,  9  ,  0  , ____ ,
      #     del , F1  , F2  , F3  , F4  , F5  , F6  , '-' , '=' , '[' , ']' , '\'  ,
      #     ____, F7  , F8  , F9  , F10 , F11 , F12 , iso#, iso|, pgup, pgdn, ____ ,
      #     ____, ____, ____, ____, L3  , ____, ____, ____, ____, ____, ____, ____ ,
      #   ]
      # ],
      # [ # layer 3 (media 'lower+raise'), press L1+L2 on base layer
      #   [
      #     ____, pscr, mply, volu, mstp, ____, wh_u, btn1, ms_u, btn2, ____, nlck ,
      #     ____, mute, mprv, vold, mnxt, app , wh_d, ms_l, ms_d, ms_r, btn3, slck ,
      #     ____, C-y , CS-z, C-i , ____, ____, ____, ____, ____, ____, ____, caps ,
      #     ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ,
      #   ]
      # ],
]

This is my schematic:
image

Can someone maybe look over those and confirm if they look good?
I can also provide all the schematics for the boards I made, but they are basically the same as the keyplus_mini.

Is there any way to debug the wireless connection?

@Algram
Copy link
Author

Algram commented Feb 1, 2020

I also just tried it with a unifying receiver, but it does also not work. At this point I am lost, I don't even know if it is a hardware or a software issue.

@ahtn If there is any change you are still around, I would greatly appreciate your help!

@emilytrau
Copy link
Contributor

Have you tried a different RF channel? Try 8

@Algram
Copy link
Author

Algram commented Feb 2, 2020

@angustrau I just tried 8 and it also does not work. I should just have to plug in the unifying receiver and then it should work, correct?

@emilytrau
Copy link
Contributor

Pretty sure, yeah

@emilytrau
Copy link
Contributor

I had some trouble with my board where the fab put in a nrf module that was the same size but had a different pinout.

@Algram
Copy link
Author

Algram commented Feb 2, 2020

@angustrau That's something worth checking out. This is the exact model I have:
image

How would I check if the pinout is corret?

@emilytrau
Copy link
Contributor

First thing to check is whether the ground pin lines up with the ground plane. For the others you can reference it to the nrf24 pinout from the datasheet.

@Algram
Copy link
Author

Algram commented Feb 2, 2020

Ok let me do that real quick.

@Algram
Copy link
Author

Algram commented Feb 2, 2020

@angustrau I just checked and the pinout is the correct one. Was worth a try though.

@Algram
Copy link
Author

Algram commented Feb 2, 2020

Is there a way to get something like a debug output from the xmega in order to see if the communication with the nrf module is working?

@emilytrau
Copy link
Contributor

Not that I know of. You might need to go digging in the code.

@Algram
Copy link
Author

Algram commented Feb 3, 2020

@angustrau I think I found something: The modules I am using do not actually say "NRF" on them, but rather: S124R1

Could that be the root of my problem? I mean I knew I was buying fakes, but this seems like a different chip.

@emilytrau
Copy link
Contributor

It's possible. Maybe plug it into an Arduino and try some test scripts

@Algram
Copy link
Author

Algram commented Feb 5, 2020

@angustrau So I ordered new modules and tried them. Still no luck. Have you designed your own pcb? Can I share my schema and pcb layout for you to check if anything seems odd?

@emilytrau
Copy link
Contributor

Sure I can have a look, although it's been a while since I've done my PCB. You could try this demo script to test your modules https://forum.arduino.cc/index.php?topic=421081.0

@Algram
Copy link
Author

Algram commented Feb 6, 2020

@angustrau Thanks. I will try the sketches tomorrow. Here is my schematic and pcb:
image

image

@Algram
Copy link
Author

Algram commented Feb 6, 2020

I think I found something in the code:

#if USE_NRF24 && USE_CHECK_PIN

Seems like if the usb check pin is active then it always goes into USB mode. I do not have a check pin on my pcb.

@Algram
Copy link
Author

Algram commented Feb 7, 2020

Yep that was it. It is working now. Only the unifying receiver does not work yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants