Comments: LoRaWAN with ProRF and The Things Network

Pages

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Member #607016 / about 6 years ago / 1

    I have a SparkX Pro 1W model and no matter what I do I can't get the code to upload. Also using the pin mapping "A5" keeps coming up as not defined in this scope.

  • rlramirez77 / about 6 years ago / 1

    In the example ttn-abp sketch, there are pin mappings for the RFM95W that had to be set in order for the Adafruit Feather 32u4 RFM95 to work. Below is the array as it is in the Telkamp lmic library example:

    // Pin mapping const lmic_pinmap lmic_pins = { .nss = 6, .rxtx = LMIC_UNUSED_PIN, .rst = 5, .dio = {2, 3, 4}, };

    Looking at the schematic for the SparkX Pro RF, it appears that the nss and rst pins need to be reversed. Is this the case and are there any other changes? My Pro RF is not transmitting.

    Also, I am loosing the USB port after uploading the code; I'm using the Sparkfun Pro Micro board in the Arduino IDE, and this example sketch compiles fine. When I double tap the RST button during upload from the IDE, it usually, but not always, finds the correct USB serial port and uploads the code.

    Russ Ramirez

    • Ah, I forgot to include the pin mapping for the Pro RF. I've just edited the tutorial to include the following snippet:

      // Pin mapping
      const lmic_pinmap lmic_pins = {
          .nss = A5,
          .rxtx = LMIC_UNUSED_PIN,
          .rst = 4,
          .dio = {7, 10, 11},
      };
      

      As for losing the usb port, I find that it's usually necessary to select the port every time that you upload because when the board goes into bootloader mode, it enumerates differently and Arduino tends to 'remember' that port number instead of the 'USB Device' port number. As long as you have that selected when you hit upload, you shouldn't need to manually reset the board, although it may take a moment for the board to reset itself. And, of course, double check that you have the 3.3v 8Mhz board selected.

      • rlramirez77 / about 6 years ago * / 1

        Oh, 1 other thing I just noticed too. When the packet is sent to TTN from the SparkX node, the packet data value is 0.66. When the same packet is sent from the Adafruit LoRa Feather, it correctly sends the battery voltage value of 4.29. Is the 0.66 value just a transient value? Looking at the schematic, I did change the VBATPIN from A9 to A10 as follows:

            // Prepare upstream data transmission at the next possible time.
            #define VBATPIN A10
            float measuredvbat = analogRead(VBATPIN);
        

        As I write this, I don't yet see the decoded value after changing the pin, but I'm guessing this change is required. Edit: The values are coming through as 0.00 now instead of 0.66, but still not reflecting the actual battery voltage.

        Russ

      • rlramirez77 / about 6 years ago / 1

        Thanks Nick, that pin mapping fixed the transmit problem, packets now coming through my TTN gateway now!

        I should explain that the USB issue is one where Windows 10 complains that the USB device that was 'there', is now no longer there after an upload. When I pull the plug and re-insert the host side, it is still not found by Windows. So what I have been doing to get around it (via a Adafruit tip) is to single-tap the button during upload with Verbose output checked in preferences for Upload, then tapping it a second time so it enumerates to Win 10. This is a flaky way to do this as it seems to be hit/miss. Maybe I need to changed the port driver in Win 10 by using Zadig?


If you've found an issue with this tutorial content, please send us your feedback!