OpenMQTTGateway icon indicating copy to clipboard operation
OpenMQTTGateway copied to clipboard

Problem compiling NodeMCU with LORA with test release

Open nicolasdelta opened this issue 2 years ago • 4 comments

Hello,

I'm trying to build with platformio from the [env:nodemcuv2-all-test] environnement with adding LORA function.

I've just added the following : lib_deps = ${libraries.lora} build_flags = '-DZgatewayLORA="LORA"'

It doesn"t work and i get the following

D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:47:1: error: 'SemaphoreHandle_t' does not name a type 47 | SemaphoreHandle_t semaphorecreateOrUpdateDeviceLORA; | ^~~~~~~~~~~~~~~~~ D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino: In function 'void createOrUpdateDeviceLORA(const char*, const char*, uint8_t)': D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:77:22: error: 'semaphorecreateOrUpdateDeviceLORA' was not declared in this scope; did you mean 'createOrUpdateDeviceLORA'? 77 | if (xSemaphoreTake(semaphorecreateOrUpdateDeviceLORA, pdMS_TO_TICKS(30000)) == pdFALSE) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | createOrUpdateDeviceLORA D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:77:57: error: 'pdMS_TO_TICKS' was not declared in this scope 77 | if (xSemaphoreTake(semaphorecreateOrUpdateDeviceLORA, pdMS_TO_TICKS(30000)) == pdFALSE) { | ^~~~~~~~~~~~~ D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:77:7: error: 'xSemaphoreTake' was not declared in this scope 77 | if (xSemaphoreTake(semaphorecreateOrUpdateDeviceLORA, pdMS_TO_TICKS(30000)) == pdFALSE) { | ^~~~~~~~~~~~~~ D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:77:82: error: 'pdFALSE' was not declared in this scope 77 | if (xSemaphoreTake(semaphorecreateOrUpdateDeviceLORA, pdMS_TO_TICKS(30000)) == pdFALSE) { | ^~~~~~~ D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:104:18: error: 'semaphorecreateOrUpdateDeviceLORA' was not declared in this scope; did you mean 'createOrUpdateDeviceLORA'? 104 | xSemaphoreGive(semaphorecreateOrUpdateDeviceLORA); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | createOrUpdateDeviceLORA D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:104:3: error: 'xSemaphoreGive' was not declared in this scope 104 | xSemaphoreGive(semaphorecreateOrUpdateDeviceLORA); | ^~~~~~~~~~~~~~ D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino: In function 'void launchLORADiscovery(bool)': D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:112:22: error: 'semaphorecreateOrUpdateDeviceLORA' was not declared in this scope; did you mean 'createOrUpdateDeviceLORA'? 112 | if (xSemaphoreTake(semaphorecreateOrUpdateDeviceLORA, pdMS_TO_TICKS(1000)) == pdFALSE) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | createOrUpdateDeviceLORA D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:112:57: error: 'pdMS_TO_TICKS' was not declared in this scope 112 | if (xSemaphoreTake(semaphorecreateOrUpdateDeviceLORA, pdMS_TO_TICKS(1000)) == pdFALSE) { | ^~~~~~~~~~~~~ D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:112:7: error: 'xSemaphoreTake' was not declared in this scope 112 | if (xSemaphoreTake(semaphorecreateOrUpdateDeviceLORA, pdMS_TO_TICKS(1000)) == pdFALSE) { | ^~~~~~~~~~~~~~ Compiling .pio\build\nodemcuv2-all-test\libd38\ESP8266mDNS\LEAmDNS_Structs.cpp.o D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:112:81: error: 'pdFALSE' was not declared in this scope 112 | if (xSemaphoreTake(semaphorecreateOrUpdateDeviceLORA, pdMS_TO_TICKS(1000)) == pdFALSE) { | ^~~~~~~ D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:118:18: error: 'semaphorecreateOrUpdateDeviceLORA' was not declared in this scope; did you mean 'createOrUpdateDeviceLORA'? 118 | xSemaphoreGive(semaphorecreateOrUpdateDeviceLORA); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | createOrUpdateDeviceLORA D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:118:3: error: 'xSemaphoreGive' was not declared in this scope 118 | xSemaphoreGive(semaphorecreateOrUpdateDeviceLORA); | ^~~~~~~~~~~~~~ D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino: In function 'void LORAConfig_load()': D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:284:3: error: 'preferences' was not declared in this scope 284 | preferences.begin(Gateway_Short_Name, true); | ^~~~~~~~~~~ D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino: In function 'void LORAConfig_fromJson(ArduinoJson::JsonObject&)': D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:339:5: error: 'preferences' was not declared in this scope 339 | preferences.begin(Gateway_Short_Name, false); | ^~~~~~~~~~~ D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:357:5: error: 'preferences' was not declared in this scope 357 | preferences.begin(Gateway_Short_Name, false); | ^~~~~~~~~~~ D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino: In function 'void setupLORA()': D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:368:3: error: 'semaphorecreateOrUpdateDeviceLORA' was not declared in this scope; did you mean 'createOrUpdateDeviceLORA'? 368 | semaphorecreateOrUpdateDeviceLORA = xSemaphoreCreateBinary(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | createOrUpdateDeviceLORA D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:368:39: error: 'xSemaphoreCreateBinary' was not declared in this scope 368 | semaphorecreateOrUpdateDeviceLORA = xSemaphoreCreateBinary(); | ^~~~~~~~~~~~~~~~~~~~~~ D:/nicol/Documents/PlatformIO/Projects/OpenMQTTGateway-development/main/ZgatewayLORA.ino:369:3: error: 'xSemaphoreGive' was not declared in this scope 369 | xSemaphoreGive(semaphorecreateOrUpdateDeviceLORA);

I've seen that LORA supports ESP8266 https://github.com/1technophile/OpenMQTTGateway/pull/1711#issue-1795648550

Please can you tell me if i did forgot sometinh in the configuration ?

Regards Nicolas

nicolasdelta avatar Oct 26 '23 13:10 nicolasdelta

SOLVED by using last stable release 1.6.0 AND modifying SPI.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_SS); to SPI.begin(); image

nicolasdelta avatar Oct 31 '23 20:10 nicolasdelta

build_flags

  '-DLORA_BAND=868E6'
  '-DLORA_SCK=14'
  '-DLORA_MISO=12'
  '-DLORA_MOSI=13'
  '-DLORA_SS=15'
  '-DLORA_RST=16'
  '-DLORA_DI0=5'

nikito7 avatar Nov 12 '23 21:11 nikito7

One issue is Discovery

Another is Preferences.h

nikito7 avatar Nov 12 '23 22:11 nikito7

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Feb 11 '24 00:02 github-actions[bot]

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar May 14 '24 00:05 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 29 '24 00:05 github-actions[bot]