Comments: SparkFun SAMD21 Pro RF Hookup Guide
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.
If you've found an issue with this tutorial content, please send us your feedback!
I made a very minor modification to the example code referenced in the Hookup guide. I simply moved the transmit message part into an interrupt routine to send message when a button is pushed. The radio seems to stick in the tx mode(tx led is on) and nothing is received from the other board(or sent from this test board). To get the test board un-hung I have to reset it. I found that removing the rf95.waitPacketSent(); line helps but can still hang if I initiate another interrupt(button push) too soon after the first. However, if I leave the rf95.waitPacketSent(); in the code it will hang for sure every time and message is not sent. Can someone explain what is happening? I am not new to electronics, but am new to arduino and also I only do limited amount of coding. See my sketch below. Thank you.
/* Both the TX and RX ProRF boards will need a wire antenna. We recommend a 3" piece of wire. This example is a modified version of the example provided by the Radio Head Library which can be found here: www.github.com/PaulStoffregen/RadioHeadd */
Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you. (*I should note that custom code consultation is usually outside the scope of our support team.)
There is a new LMIC library (MCCI), one has to edit a config file for the frequency plan selection "Arduino\libraries\MCCI_LoRaWAN_LMIC_library\project_config\lmic_project_config.h". I struggled until I located that...
Can you post an actual working example? Ever since TTN switched to "The Things Stack" all examples have stopped working, this guide is terribly outdated and just as you have discovered - the LMIC has changed. It seems nobody at SparkFun is interested to support this board with the new TTN way of doing things and up until stumbling on your post - I was ready to toss the board. Thank you
Not sure where you are getting stuck so hard to address the relevant point. You can still pretty much follow the guide, (add Arduino SAMD board definitions, add Sparkfun Board Definitions) except when it comes to installing the LMIC you go for "MCCI LoraWAN LMIC library" by Terry Moore. This will create some folders in yr Arduino directory, find this file "Arduino\libraries\MCCI_LoRaWAN_LMIC_library\project_config\lmic_project_config.h and select the appropriate frequency for your region, comment out the others (Its EU868 for me). Then back to the guide. static const u1_t PROGMEM APPEUI[8]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; //For TTN issued EUIs the last bytes should be 0xD5, 0xB3,0x70. static const u1_t PROGMEM DEVEUI[8]={ 0xZZ, 0xZZ, 0xZZ, 0xZZ, 0xZZ, 0xD5, 0xB3, 0x70 }; the "ZZ" you will need to replace with whatever key your device has in TTN, you can toggle the key format until it shows the D5-B3-70 at the end. I played with the SparkFun BME sensor and the below worked fine for me. Hope this helps ! ps Will post code in a separate reply, struggling with formatting
in ttn, added a Javascript decoder :
... and then watch as the messages come through
Did anyone notice that the screnshot of how to copy the various keys from TTN's console shown in this guide is totally misleading? The picture shows the keys in MSB while they should be in LSB except for the APPKEY[16] which should be MSB
seems to me that my device is entering sleep mode once I unplug it from the usb host. where can I find more info about disabling this?
Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you.
That being said, I didn't notice anything in this tutorial that would put your microcontroller into sleep mode. Maybe it is something in your code?
Note: VDDCORE is tied to 3.3V on this board, which causes it to use too much current (~60mA awake, ~30mA asleep). Cut the trace from SAMD21G pin 43 to get much lower power usage (13mA awake, ~110uA sleep is achievable). SparkFun, if you revise the board, please fix this. Your other SAMD21 boards don't have VDDCORE pulled high.
Hi I cut the 3.3V line to pin 43 but the chip stopped working. Is there something missing?
I tried to disable brown out detection but no hope.
Hi there, it sounds like you are looking for technical assistance. Unfortunately, as noted in the guide, we will not be helping customers with this modification as it does require more experienced technical skills; and those with the minimum skill level, would be able to figure out how to perform the modification without our assistance.
That being said, feel free use the link in the banner above, to get started with posting a topic in our forums to get help from the community.
I am following the instructions on this but my Arduino will not compile the line:
// LoRaWAN end-device address (DevAddr) static const u4_t DEVADDR = { 0x26, 0x02, 0x1B, 0xE0 };
I get an error: "scalar object 'DEVADDR' requires one element in initializer"
Any ideas?
Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you.
Otherwise, it looks like you are trying to give the variable an array, which doesn't work with the defined data type (an unassigned integer).
Santa Claus, It sounds like Member #355246 is stating that he gets the LoRa functionality when the jumpers are open. Member #255246, is this correct?
Can you explain what do the LoRaWAN jumper really do? I ask because they don't seem to make a difference in some preliminary tests (in fact, we lost the ability to send data to TTN when they're closed, but anecdotally, we can when the jumpers are cleared).
It seems that the jumpers connect DIO1 and DIO2 to the microcontroller, which is needed for use with LoRaWAN libraries like LMIC. For point-to-point LoRa communication, like what's provided with RadioHead libraries, those are not needed. RadioHead is currently only configured for LoRa usage with this radio module (but not LoRaWAN, if I understand correctly). So either way, you will use LoRa, but connection to TTN for instance probably won't work without those jumpers closed.
The information for those jumpers is actually covered in the Hardware Overview section. Closing the jumpers changes the board from low power point-to-point functionality and configures the RFM95W Radio Module for LoRaWAN functionality.