You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Serial.println();
// Startup all pins and UART
e220ttl.begin();
Serial.println("e220ttl has begun");
ResponseStructContainer c;
c = e220ttl.getConfiguration();
// It's important get configuration pointer before all other operation
Configuration configuration = *(Configuration*) c.data;
Serial.println(c.status.getResponseDescription());
Serial.println(c.status.code);
printParameters(configuration);
ResponseStructContainer cMi;
cMi = e220ttl.getModuleInformation();
// It's important get information pointer before all other operation
ModuleInformation mi = *(ModuleInformation*)cMi.data;
Serial.println(cMi.status.getResponseDescription());
Serial.println(cMi.status.code);
printModuleInformation(mi);
c.close();
cMi.close();
Serial.println("Hi, I'm going to send message!");
// Send message
ResponseStatus rs = e220ttl.sendFixedMessage(0, DESTINATION_ADDL, 23, "Hello, world?");
// Check If there is some problem of succesfully send
Serial.println(rs.getResponseDescription());
}
/home/flatus/.arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/12.2.1-1.2/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: /tmp/arduino_cache_824242/core/core_2c23ace741d1764fd7c6b8218f9f5d4c.a(HardwareSerial.cpp.o):(.bss.Serial2+0x0): multiple definition of `Serial2'; sketch/test_LORA_E220_05.ino.cpp.o:(.bss.Serial2+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Nucleo-32.
I then removed 'HardwareSerial Serial2(USART2); // PA3 (RX) PA2 (TX)' and the code then compiled, but get no transmit and this is output in terminal:
`e220ttl has begun?
No response from device! (Check wiring)
12
`#include "Arduino.h"
#include "LoRa_E220.h"// With FIXED SENDER configuration
#define DESTINATION_ADDL 3
// ---------------- STM32 --------------------
HardwareSerial Serial2(USART2); // PA3 (RX) PA2 (TX)
LoRa_E220 e220ttl(&Serial2, PA0, PB0, PA10); // RX AUX M0 M1
// -------------------------------------------------
void printParameters(struct Configuration configuration);
void printModuleInformation(struct ModuleInformation moduleInformation);
void setup() {
Serial.begin(9600);
Serial.setTimeout(1000);
while(!Serial){};
delay(500);
Serial.println("e220ttl has begun");
Serial.println("Hi, I'm going to send message!");
// Send message
ResponseStatus rs = e220ttl.sendFixedMessage(0, DESTINATION_ADDL, 23, "Hello, world?");
// Check If there is some problem of succesfully send
Serial.println(rs.getResponseDescription());
}
void loop() {
}
void printParameters(struct Configuration configuration) {
Serial.println("----------------------------------------");
}
void printModuleInformation(struct ModuleInformation moduleInformation) {
Serial.println("----------------------------------------");
Serial.print(F("HEAD: ")); Serial.print(moduleInformation.COMMAND, HEX);Serial.print(" ");Serial.print(moduleInformation.STARTING_ADDRESS, HEX);Serial.print(" ");Serial.println(moduleInformation.LENGHT, DEC);
}`
This above code gives error:
Arduino: 1.8.19 (Linux), Board: "Nucleo-32, Nucleo L432KC, Mass Storage, Enabled (generic 'Serial'), None, Low/Full Speed, Smallest (-Os default), None, Newlib Nano (default)"
/home/flatus/.arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/12.2.1-1.2/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: /tmp/arduino_cache_824242/core/core_2c23ace741d1764fd7c6b8218f9f5d4c.a(HardwareSerial.cpp.o):(.bss.Serial2+0x0): multiple definition of `Serial2'; sketch/test_LORA_E220_05.ino.cpp.o:(.bss.Serial2+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Nucleo-32.
I then removed 'HardwareSerial Serial2(USART2); // PA3 (RX) PA2 (TX)' and the code then compiled, but get no transmit and this is output in terminal:
`e220ttl has begun?
No response from device! (Check wiring)
12
HEAD : 0 2C 0
AddH : D1
AddL : 9
Chan : 189 -> 599MHz
SpeedParityBit : 0 -> 8N1 (Default)
SpeedUARTDatte : 1 -> 2400bps
SpeedAirDataRate : 0 -> 2.4kbps
OptionSubPacketSett: 0 -> 200bytes (default)
OptionTranPower : 0 -> 22dBm (Default)
OptionRSSIAmbientNo: 0 -> Disabled (default)
TransModeWORPeriod : 0 -> 500ms
TransModeEnableLBT : 1 -> Enabled
TransModeEnableRSSI: 0 -> Disabled (default)
TransModeFixedTrans: 0 -> Transparent transmission (default)
⸮��No response from device! (Check wiring)
12
HEAD: 0 0 0
Model no.: 0
Version : 73
Features : 70
Hi, I'm going to send message!
Hello, World?Success
`
Please advise !!!! .... Thank you.
The text was updated successfully, but these errors were encountered: