Because I need to create transmission in my project. to complete on it if I get solution to my problem and this problem happened just when send 5 , when send 250 bytes every thing is OK.
Right, so you're prototyping a solution to the project communications' needs, then you'll add the payload later? Ok, I guess. So you're saying you can transmit 250 bytes, but not 5?
Yes, the problem in size of 5.
I have just noticed that the code in your original post does not compile because you have values in the array that will not fit in a signed byte
The next step would be to send two packets, and verify that they arrived correctly. Obviously, you are not yet ready to send hundreds of data points.
Post the most recent version of the code below this post, please.
mercala_eng:
The is the output of sender:
Sent with success
Sent with success
Sent with success
Sent with success
Sent with success
Sent with success
Sent with success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
Last Packet Send Status: Delivery Success
Sent with success
This does not tell where the problem is.
You self are talking about a RECEIVER -problem
what's it worth to print some SENDER debug-info if you have a RECEIVER -problem?
To me this is a very selfish and too proud attitude. You are asking for help but then you know it better.
This is not true
you are doing some very weird way of sending the bytes
mercala_eng:
int i =0;
int siz= 297 ;
int m= 5; ;
for (int j = 0; j < siz; j++){
if(i < siz){
esp_err_t result = esp_now_send(broadcastAddress, (uint8_t *) &arr[i], (i+ m<= siz ? m: siz - i) * sizeof(int8_t));
if (result == ESP_OK) {
Serial.println("Sent with success");
}
else {
Serial.println("Error sending the data");
}
}
i+=m;
}}
If I were you I would print out what you were sending here
mercala_eng:
-140,
-146,
-132,
a variable of type int8_t can only hold values between -127 to + 127
but not a value like -140
Hint: the transmit example code you started with does not check for reception of data, only whether it was transmitted.
@ UKHeliBob UKHeliBob , Could you delete this question, please?
The idea for my project is not suitable.
Thanks!
I will close the topic to prevent further updates but leave it visible as someone may learn from it in the future