Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 59:197f40345978, committed 2019-11-06
- Comitter:
- jordanemonney
- Date:
- Wed Nov 06 09:52:42 2019 +0000
- Parent:
- 58:4d1114ac60aa
- Commit message:
- commit 1
Changed in this revision
--- a/main.cpp Tue Oct 08 14:01:59 2019 +0100 +++ b/main.cpp Wed Nov 06 09:52:42 2019 +0000 @@ -15,7 +15,7 @@ * limitations under the License. */ #include <stdio.h> - +#include "mbed.h" #include "lorawan/LoRaWANInterface.h" #include "lorawan/system/lorawan_data_structures.h" #include "events/EventQueue.h" @@ -26,7 +26,7 @@ #include "lora_radio_helper.h" using namespace events; - +DigitalOut myled1(LED1); // Max payload size can be LORAMAC_PHY_MAXPAYLOAD. // This example only communicates with much shorter messages (<30 bytes). // If longer messages are used, these buffers must be changed accordingly. @@ -36,7 +36,7 @@ /* * Sets up an application dependent transmission timer in ms. Used only when Duty Cycling is off for testing */ -#define TX_TIMER 10000 +#define TX_TIMER 9000 /** * Maximum number of events for the event queue. @@ -103,7 +103,6 @@ printf("\r\n LoRa initialization failed! \r\n"); return -1; } - printf("\r\n Mbed LoRaWANStack initialized \r\n"); // prepare application callbacks @@ -164,11 +163,11 @@ return; } - packet_len = sprintf((char *) tx_buffer, "Dummy Sensor Value is %d", + packet_len = sprintf((char *) tx_buffer, "Sensor Value is %d", sensor_value); retcode = lorawan.send(MBED_CONF_LORA_APP_PORT, tx_buffer, packet_len, - MSG_UNCONFIRMED_FLAG); + MSG_CONFIRMED_FLAG); if (retcode < 0) { retcode == LORAWAN_STATUS_WOULD_BLOCK ? printf("send - WOULD BLOCK\r\n") @@ -218,6 +217,7 @@ switch (event) { case CONNECTED: printf("\r\n Connection - Successful \r\n"); + myled1 = 1; if (MBED_CONF_LORA_DUTY_CYCLE_ON) { send_message(); } else {
--- a/mbed-lora-radio-drv.lib Tue Oct 08 14:01:59 2019 +0100 +++ b/mbed-lora-radio-drv.lib Wed Nov 06 09:52:42 2019 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-semtech-lora-rf-drivers#6012fa43cf9f2cae46fa9d424fe4051d00e157a2 +https://github.com/ARMmbed/mbed-semtech-lora-rf-drivers/#6012fa43cf9f2cae46fa9d424fe4051d00e157a2
--- a/mbed_app.json Tue Oct 08 14:01:59 2019 +0100 +++ b/mbed_app.json Wed Nov 06 09:52:42 2019 +0000 @@ -25,6 +25,11 @@ "lora-pwr-amp-ctl": { "value": "NC" }, "lora-tcxo": { "value": "NC" } }, + "target_overrides": { + "*": { + "mbed-trace.enable": true + } + }, "target_overrides": { "*": { "platform.stdio-convert-newlines": true, @@ -33,11 +38,10 @@ "lora.over-the-air-activation": true, "lora.duty-cycle-on": true, "lora.phy": "EU868", - "lora.device-eui": "{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }", + "lora.device-eui": "{ 0x00, 0x49, 0xb9, 0x9f, 0xdb, 0xfc, 0xaa, 0xab }", "lora.application-eui": "{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }", - "lora.application-key": "{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }" + "lora.application-key": "{ 0x18, 0x23, 0x24, 0xec, 0x34, 0xc6, 0xc5, 0x5b, 0x1d, 0x77, 0x52, 0xf9, 0x1c, 0xb7, 0x1d, 0x8c }" }, - "K64F": { "lora-spi-mosi": "D11", "lora-spi-miso": "D12", @@ -60,7 +64,7 @@ }, "DISCO_L072CZ_LRWAN1": { - "main_stack_size": 1024, + "main_stack_size": 2048, "lora-radio": "SX1276", "lora-spi-mosi": "PA_7", "lora-spi-miso": "PA_6",