Home › Forums › snickerdoodle › • General › How to enable u.fl (J4) connector for WiFi

Viewing 5 reply threads
  • Author
    Posts
    • Shane
      Participant
      Post count: 28

      First, I have a snickerdoodle prime LE. I’m looking at the snickerdoodle schematic and it appears that ANTENNA1A is enabled by default through a pull-up resistor (R110) to VCTL1 on U22 (SKY13351-378LF). There is a second output from U22, ANTENNA1B which goes to the u.fl connector (J4), however this option appears to be disabled by default through a pull-down resistor (R111) to VCTL2 on U22. The default state of these enable lines on U22 (VCTL1/VCTL2) can be overridden as they are controlled by the stm32 micro (PA9 and PA10). My question is how do I enable ANTENNA1B instead of ANTENNA1A so that I can connect an external antenna to J4? It appears that stm32 firmware will need to be modified. Is that correct?

    • Ryan Cousins
      Keymaster
      Post count: 343

      @Shane, there is an updated version of the snickerdoodle firmware you’ll want to install. Head to the Downloads page, Firmware tab: https://krtkl.com/resources/downloads/

      There you’ll find the latest STM32 firmware, the spi-ctrl Linux app (which you’ll also want), and instructions on how to install the firmware and use the app. Specifically, check out the section on “Antenna Selection”.

      Let me know if you have any issues or questions with getting that all working.

      -RC

    • Shane
      Participant
      Post count: 28

      Ok, something bad happened. I’m using ubuntu 16.04 through vmware and followed the steps outlined in the dfu upgrade procedure. I ran ‘dfu-util -a 0 -D snickerdoodle-firmware-r2p0.dfu’ and everything seemed fine except that the download progress was stuck at 0%. After ~5 minutes I ctrl-c’d out of dfu-util and removed the USB cable. Now when I plug it back into the snickerdoodle nothing happens. I think I’ve bricked the stm32 unit. What options do I have at this point? I do have a breakyBreaky board on hand which has the SWD header? I suppose I could reprogram the stm32 through J5?

    • Ryan Cousins
      Keymaster
      Post count: 343

      Hmm, well there are a couple options. The first, as you mentioned, is you should be able to reprogram the STM32 via the exposed uC JTAG (J5 on breakyBreaky). Alternatively, instead of holding both buttons down when powering on the board to enter DFU mode, you can try shorting the pads on R55 during power up. This admittedly takes some serious coordination, but it does provide an ‘override’ in cases where the STM has been bricked.

      Let me know if any of those suggestions work. If not, we can revisit.

    • Shane
      Participant
      Post count: 28

      Ok, I’ve successfully updated the stm32 firmware to the latest version using dfu-util on my macbook.

      Now, I’m still trying to change the antenna to the u.fl connector (J4). I built the device tree overlay for spi.dts and dynamically loaded it using the instructions outlined in the section Applying Device Tree Overlay onto the Prime LE that I have. When I tried to run a test by changing an LED I received error messages and the blue LED did not illuminate.

      ./spi-ctrl -c L -l 3 -s 7 /dev/spidev2.0
      /dev/spidev2.0: spi mode 0x4, 8 bits per word, 1000000 Hz max
      Bad initial response message!: Success
      Bad actual response message!: Success

      Notice that the device is spidev2.0 instead of spidev1.0 as outlined in the section “LED Override” from the Snickerdoodle Firmware User Guide.

      I’m getting closer…

    • Shane
      Participant
      Post count: 28

      Ok, I fixed it. The target in spi.dts should be spi1, not spi0. I can now communicate with the stm32 over SPI. Thanks for your help throughout.

      • Ryan Cousins
        Keymaster
        Post count: 343

        Great to hear, Shane! Glad it all worked out, let us know if you run into any more roadblocks.

Viewing 5 reply threads
  • You must be logged in to reply to this topic.