Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile errors in Arduino #2

Open
toninog opened this issue Feb 1, 2020 · 0 comments
Open

Compile errors in Arduino #2

toninog opened this issue Feb 1, 2020 · 0 comments

Comments

@toninog
Copy link

toninog commented Feb 1, 2020

Hi

Thanks for sharing this - I have been trying to compile using arduino-cli - I've installed the board and when I run the compile:

arduino-cli compile --fqbn esp32:esp32:heltec_wifi_lora_32_V2 SimpleLoRaGateway
/Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/MQTT.ino: In function 'void connectToMQTTServer(IPAddress, uint16_t)':
/Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/MQTT.ino:32:15: error: 'class PubSubClient' has no member named 'setServer'
_mqttClient.setServer(addr, port);
^
/Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/MQTT.ino: In function 'void connectToMQTTServer(const char*, uint16_t)':
/Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/MQTT.ino:39:15: error: 'class PubSubClient' has no member named 'setServer'
_mqttClient.setServer(host, port);
^
/Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/MQTT.ino: In function 'void connectMQTT()':
/Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/MQTT.ino:57:73: error: 'class PubSubClient' has no member named 'state'
Serial.printf("MQTT failed, state %s, retrying...\n", _mqttClient.state());
^
/Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/WiFiSupport.ino: In function 'boolean connectWifi(const char*, const char*)':
/Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/WiFiSupport.ino:24:23: error: no matching function for call to 'WiFiClass::disconnect(bool)'
WiFi.disconnect(true);
^
In file included from /Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/MQTT.ino:9:0:
/Applications/Arduino.app/Contents/Java/libraries/WiFi/src/WiFi.h:130:9: note: candidate: int WiFiClass::disconnect()
int disconnect(void);
^
/Applications/Arduino.app/Contents/Java/libraries/WiFi/src/WiFi.h:130:9: note: candidate expects 0 arguments, 1 provided
/Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/WiFiSupport.ino:26:8: error: 'class WiFiClass' has no member named 'mode'
WiFi.mode(WIFI_STA);
^
/Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/WiFiSupport.ino:26:13: error: 'WIFI_STA' was not declared in this scope
WiFi.mode(WIFI_STA);
^
/Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/WiFiSupport.ino:27:8: error: 'class WiFiClass' has no member named 'setAutoConnect'
WiFi.setAutoConnect(true);
^
/Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/WiFiSupport.ino:28:28: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
WiFi.begin(ssid, password);
^
In file included from /Users/study/Downloads/development/sensor/lora32/SimpleLoRaGateway/MQTT.ino:9:0:
/Applications/Arduino.app/Contents/Java/libraries/WiFi/src/WiFi.h:79:9: note: initializing argument 1 of 'int WiFiClass::begin(char*, const char*)'
int begin(char* ssid, const char *passphrase);
^
Error during build: exit status 1

Can you please help? or share how you compiled the source?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant