Commit graph

20 commits

Author SHA1 Message Date
Matthijs Kooijman
90bc0492b6 Print downlink ack status in ttn-otaa example too
When a packet is received that has the ack flag set, print a notice
about that.
2016-08-10 09:32:55 +02:00
Matthijs Kooijman
0567e468c0 Add ttn-otaa example
This is very similar to the ttn-abp example, except that it uses OTAA
for setting up a session instead of setting it up statically.
2016-08-09 23:15:15 +02:00
Matthijs Kooijman
eaa006625d Print downlink ack status in examples
When a packet is received that has the ack flag set, print a notice
about that.
2016-08-09 22:50:11 +02:00
Matthijs Kooijman
9b8898aca9 Only print the length of received data in example
Previously, the raw data was printed, but since that is likely binary
data, this just prints the length. This should be sufficient to let
people know there is data and then write proper decoding for it.
Printing in hex would be useful, but printing an array of bytes in hex
is a bit cumbersome in Arduino.
2016-08-09 22:49:56 +02:00
Matthijs Kooijman
418d90272e Improve RX2 handling
This modifies the TTN example to use SF9 for the RX2 window, so RX2
should work on TTN out of the box. Also, the documentation about this is
udpated.
2016-08-09 22:28:26 +02:00
Matthijs Kooijman
e98efadb70 Rename ttn example to ttn-abp
Also add some comments to make it more clear that this uses the ABP
(Activation by personalisation) variant of LoRaWAN.
2016-08-09 22:27:41 +02:00
Frank Leon Rose
05da3c3bbf Remove trailing space 2016-08-09 22:01:56 +02:00
Frank Leon Rose
6cc4e21bf5 Added functions to enable/disable/select sub-bands 2016-08-09 22:01:52 +02:00
Matthijs Kooijman
e253f917da Merge pull request #29 from things-nyc/make-regional-code-conditional
Conditionally compile regional code in examples
2016-08-09 21:47:20 +02:00
Frank Leon Rose
d74f8cd660 Conditionally compile regional code in examples 2016-06-27 23:29:08 -04:00
Robert Oostenveld
c01dba99c7 ENH - removed extra break from switch statement 2016-06-26 17:47:16 +02:00
Matthijs Kooijman
1b796c178d Add example sketch for LoRaWAN
This sketch is aimed at The Things Network, but it should work for other
networks as well. It employs personalization, over-the-air activation
has not been tested yet.
2016-02-20 12:31:28 +01:00
Matthijs Kooijman
29bfb8d504 Improve raw.ino example
This:
 - Removes support for the Pinoccio Scout RGB led and just uses a single
   led (using LED_BUILTIN) on all boards.
 - Fixes some indentation.
 - Uses a constant for the TX interval, and increases it to comply with
   the duty cycle limits.
 - Uses more explicit radio settings, instead of referring to the "ping"
   settings defined by LMIC.
 - Uses os_runloop_once() instead of os_runloop(), so the example can be
   more easily modified to do other things in addition to radio RX and
   TX.
 - Shows how to use LMIC_UNUSED_PIN for unused pins.
2016-02-20 12:31:28 +01:00
Matthijs Kooijman
cf973240e5 Remove the Bootstrap example
This was a basic proof-of-concept for to run on the Pinoccio Scout
platform, but this no longer seems relevant given the state the library
is in now.
2016-02-20 12:31:27 +01:00
Matthijs Kooijman
4bbc25e3b5 Rename pin map to lmic_pins and make it const
This should decrease the likelyhood of a naming conflict, and making it
const might help the compiler optimize.

In the future, configuring pins might change to use some initialization
function to pass the pin mapping, but for now this approach seems simple
and efficient.
2016-02-20 12:24:04 +01:00
Matthijs Kooijman
db786f367f Allow disabling I/Q inversion on RX
By uncommenting a maco in config.h, this inversion is enabled, and
communication between nodes can be enabled. This should be used just for
debugging, though.
2016-02-20 12:24:04 +01:00
Matthijs Kooijman
4d85c3ccf0 Add some comments to examples 2015-09-07 09:51:54 +02:00
Matthijs Kooijman
8f2c3efed3 Add Pinoccio bootstrap sketch 2015-03-26 16:52:39 +01:00
Matthijs Kooijman
fd3a39b464 Update raw example
By setting some more parameters (frequency, txpower), RX and TX now work
properly. Whenever a packet is received, reception is now restarted.

It now also updates leds to indicate reception status. The led is red (on
Pinoccio, or off for normal Arduino boards) when no packet was received
in 2500ms, green (or off) when there was. Whenever a packet is received, the LED
very briefly blinks to indicate this.

Packets are sent about once every second. When a packet is received, the
next TX is rescheduled to prevent TX collisions (in a very basic way).
2015-03-24 14:08:17 +01:00
Matthijs Kooijman
a414ba9948 Add minimal example for raw TX/RX
This example sends and receives data directly, without any of the
LoRaWAN protocol overhead.

This code does not seem to work yet.
2015-03-23 20:38:40 +01:00