I have a projet of connected beehive. I want to follow the weight, the temperature and the humidity.
I use several sensors and I need to send data using 2 E220-400T30D Ebyte modules.
I can send a single value (for example the weight). I use the different examples in the librairy.
But I can’t send all the value with an array.
Here is a part of my sender header :
#define ENABLE_RSSI true
#define RUCHER "Ruche1"
struct Message {
char ruche[10]; //ruche = beehive in english
float poids; //poids= weight in english
};
and in sender void loop
for (float poids=0; poids<100; poids++) //for the test, I increase manually the variable poids to simulate a weight variation. In reality the weight will come from a sensor.
{
struct Message msg = {RUCHER, poids}; // for the test I only try to send the name of my beehive "Ruche1" and the weight poids
// Send message
ResponseStatus rs = e220ttl.sendFixedMessage(0, 3, 23, &msg, sizeof(Message));
// Check If there is some problem of succesfully send
// Print the data send
Serial.print("Message Array length : ");Serial.println(sizeof(msg.ruche));
Serial.println(msg.ruche);
Serial.print("Poids Array length : ");Serial.println(sizeof(msg.poids));
Serial.println(msg.poids);
Serial.println(rs.getResponseDescription());
Serial.println(sizeof(Message));
delay(10000);
}
For the receiver, the header is the same
In receiver void loop I have the following code :
// Print the data received
Serial.println(rsc.status.getResponseDescription());
struct Message msg = *(Message*) rsc.data;
Serial.println(msg.ruche);
Serial.println(msg.poids);
Serial.println(sizeof(Message));
rsc.close();
And the result shown in serial monitor for the sender :
Message received! <——– my message is received
Success <——– success in transmission
<——– nothing but should be Ruche1
0.00 <——– 0.00 but should be 2.00
14
I don’t understand why the value are not correctly received…
Is someone could help me please ?
other point, when I try to set configuration, I have the following message :
No response from device! (Check wiring)
12
What I don’t understand is I can send and receive structured data when I disabled RSSI in my program. But I think the problem could come from configuration settings.
My wiring is normal (M0 and M1 to GND, Aux Pullup with 4,7kohm, TX to Pin 2 of arduino uno with a 4,7kohm between 3,3V and the pin, RX connected to pin 3 of arduino uno with the 1kohm resistance (voltage divider).
I strictly respect the Standard configuration (Transparent) wiring.
When I use the examples (02_SendTransparentTransmission and 07_receiveMessages) i can send and receive structured data, it works fine, I can modify the program to adjust what I want to send. Everything is OK.
So I think the problem comes from the configuration settings that I can’t modify.
How is it possible to have a message “No response from device! (Check wiring)” when I try to set configuration whereas I can communicate between my 2 arduinos with E220 which confirms my wiring is correct ?
I tried with the fully connected shema to be able to set up configuration options.
There is stil the message “No response from device! (Check wiring)”.
It prints a configuration even if there is no response from the device.
What is completely strange is when I send different programs in my arduino and between each transfer I use the GetConfiguration program I have different results whereas I don’t change the configuration. Example :
No response from device! (Check wiring)
12
—————————————-
HEAD : AE 2 76
AddH : D2
AddL : 81
Chan : 205 -> 615MHz
SpeedParityBit : 0 -> 8N1 (Default)
SpeedUARTDatte : 0 -> 1200bps
SpeedAirDataRate : 0 -> 2.4kbps
OptionSubPacketSett: 0 -> 200bytes (default)
OptionTranPower : 0 -> 22dBm (Default)
OptionRSSIAmbientNo: 0 -> Disabled (default)
TransModeWORPeriod : 10 -> 1500ms
TransModeEnableLBT : 0 -> Disabled (default)
TransModeEnableRSSI: 0 -> Disabled (default)
TransModeFixedTrans: 0 -> Transparent transmission (default)
—————————————-
No response from device! (Check wiring)
12
—————————————-
HEAD: 0 0 97
Model no.: 6E
Version : 73
Features : 70
—————————————-
Then
—————————————-
HEAD : 28 43 68
AddH : 65
AddL : 63
Chan : 119 -> 529MHz
SpeedParityBit : 1 -> 8O1
SpeedUARTDatte : 11 -> 9600bps (default)
SpeedAirDataRate : 11 -> 4.8kbps
OptionSubPacketSett: 0 -> 200bytes (default)
OptionTranPower : 0 -> 30dBm (Default)
OptionRSSIAmbientNo: 1 -> Enabled
TransModeWORPeriod : 1 -> 1000ms
TransModeEnableLBT : 0 -> Disabled (default)
TransModeEnableRSSI: 0 -> Disabled (default)
TransModeFixedTrans: 1 -> Fixed transmission (first three bytes can be used as high/low address and channel)
—————————————-
No response from device! (Check wiring)
and after
No response from device! (Check wiring)
12
—————————————-
HEAD : 0 0 74
AddH : 7C
AddL : DC
Chan : 205 -> 615MHz
SpeedParityBit : 0 -> 8N1 (Default)
SpeedUARTDatte : 0 -> 1200bps
SpeedAirDataRate : 0 -> 2.4kbps
OptionSubPacketSett: 0 -> 200bytes (default)
OptionTranPower : 0 -> 22dBm (Default)
OptionRSSIAmbientNo: 0 -> Disabled (default)
TransModeWORPeriod : 10 -> 1500ms
TransModeEnableLBT : 0 -> Disabled (default)
TransModeEnableRSSI: 0 -> Disabled (default)
TransModeFixedTrans: 0 -> Transparent transmission (default)
—————————————-
No response from device! (Check wiring)
12
—————————————-
HEAD: 0 0 97
Model no.: 6E
Version : 73
Features : 70
—————————————-
For the last problem, I think It can be a power supply problem or wrong wiring, or a fired LoRa device.
But you must try to change something to find the correct solution.
Bye Renzo
I had a similar problem and I think I found the source of the bug.
The bug occurs when using a String type variable for the message. The Sender does not send the last character of the String.
Ex: When sending “101”, the Sender sends “10”, that is, it does not send the last character.
Ex:
Hi George,
I did some test, and the library work correctly, I think you don’t do the correct configuration on the booth device. To send and receive the RSSI, you must set the RSSI parameter on the boot device
thank you for the responses.
When I wire directly M0 and M1 to the 3.3V, I’m able to set configuration and activate RSSI.
I will try again with the fully connected shema, but at least, I know I can set configuration.
I have another question to configure the power to 30dbm.
I put #define E220_30 in header
But when I try to put POWER_30 rather than POWER_22 in parameters, it doesn’t recognize POWER_30.
Maintaining a repository (or site or forum) is a lot like tending to a garden - it requires constant care and attention to keep it thriving. If you're a skilled gardener (or coder!) and want to help keep our repository blooming, we'd love to have you on board! We're also looking for talented writers and forum moderators to help us grow our community. Interested in joining our team? Don't hesitate to reach out and let us know how you can contribute!
Are you a fan of electronics or programming? Share your knowledge with others, write a simple tutorial or how to make a great project Contact me: share_your_ideas@mischianti.org
The content displayed on this website is protected under a CC BY-NC-ND license. Visitors are prohibited from using, redistributing, or altering any content from this website for commercial purposes, including generating revenue through advertising. Any unauthorized use is a violation of the license terms and legal action may be taken against individuals or entities found to be in violation.
You must also provide the link to the source.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.