Forum Replies Created
-
AuthorPosts
-
Hi Ludophot,
the creation of generic acknowledge become difficult,
I think you can manage with set a variable like mesArrived with set with the result of millis() when you send a message
and set mesArrived to 0 when acknowledge arrive
and you can set a condition like mesArrived !=0 && mesArrived + interval < millis() if enter in the if raise an error that ack not arrived.
Or something similar.
Bye Renzo
Hi Norbert,
I try to fix, please do some test with the version on this branch.
Give me a feedback.
Thanks Renzo
Hi Norbert,
please do this test comment the line
#define OPEN_CLOSE_SPIFFS
on
EMailSender.h
file and retry.Give me a feedback.
Bye Renzo
Hi Mauro,
now the library with this features is in the official branch, and released on Arduino Library manager.
Bye Renzo
Thanks to all,
I’m going to release a new library version with this fix and new distribution list features.
Thanks again Renzo
I check on the web and seems there are a lot of problems with Outlook,
can you try to send the txt file directly from gmail and check in outlook?
Bye Renzo
Try to send the attach via classic email from gmail or similar.
I think the problem is outlook.
Hi Michael,
there is an error on index of txt file, so the mime type is not setfileDescriptor[0].filename = F("test.txt"); fileDescriptor[0].url = F("/test.txt"); fileDescriptor[1].mime = "text/plain"; fileDescriptor[0].storageType = EMailSender::EMAIL_STORAGE_TYPE_SD;
I rewrite the sketch and put some example, I test It with SPIFFS and work correctly
I attach the sketch with all sampe file.
Bye Renzo
Attachments:
You must be logged in to view attached files.Hi Michael,
I tested now my WeMos D1 mini, and the txt attachment works correctly.
But It’s strange because if the file It’s 80byte mean that there are 80 character, so It isn’t empty.
Can you send me your code PLZ.
Bye Renzo
Attachments:
You must be logged in to view attached files.Hi Norbert,
If the file It’s 80byte mean the there are almost 80 characters. It’s very strange, try to change extension, like xml or similar.
Please give me a feedback.
Bye Renzo
24 September 2020 at 12:56 in reply to: Is it possible to send an object with LoRa E32 device? #6458Hi Ludophot,
String isn’t a fixed size variable, so you can’t predeterminate the size of the sctrucure, try to copy String to fixed size char
char msg[10]; string mystr = "hello"; strcpy(msg, mystr.c_str());
Give me a feedback..
Bye Renzo
Hi Mauro,
to remove debug message you must comment this line
#define EMAIL_SENDER_DEBUG
If you have a better think about the structure write here without problem.
Bye Renzo
22 September 2020 at 22:24 in reply to: Is it possible to send an object with LoRa E32 device? #6440Hi Ludophot,
yes, I think you can refer this post to create the array of element/structure
More than one pcf8574 expander
I think It’s quite difficult to lost packet, because E32 have 512byte of buffer and the max packet size is 58byte, and when you read the buffer you remove the messages from that, so you can grab 512/58 >= 8 messages before read the buffer.
I’m quite sure that you read the message in less than millisecs.
Bye Renzo
21 September 2020 at 22:23 in reply to: Is it possible to send an object with LoRa E32 device? #6424Hi Ludopoth,
first you can’t create a structure with pointer
struct Badge_Transmition{ const char *type=NULL; String *message = NULL; };
but size must be fixed
struct Badge_Transmition{ char[10] type; char[20] message; };
the pointer size is about 2byte, but the content is in another area.
The receive device must have the same fixed size structure.
The rest of the code seems correct.
Give me a feedback Bye Renzo.
20 September 2020 at 18:13 in reply to: Is it possible to send an object with LoRa E32 device? #6404Hi Ludophot,
you can send a structure that in C is the equivalent of an object.
For example
struct Message { char type[5] = "TEMP"; char message[8] = "Kitchen"; byte temperature[4]; } message; *(float*)(message.temperature) = 19.2; ResponseStatus rs = e32ttl.sendFixedMessage(0,3,4,&message, sizeof(Message)); Serial.println(rs.getResponseDescription());
I think this is what you need.
you can find more information in this article, with a complete sender sketch and receiver.
Ebyte LoRa E32 device for Arduino, esp32 or esp8266: power saving and sending structured data Part 5
pay attention to the receive of part of the strucure, very usefully to manage different type of object.
Bye Renzo
-
AuthorPosts