Forum Replies Created
-
AuthorPosts
-
Yes I’m confused !
Now It’s good.Many Thank’s Renzo.
Ican’t use SD because filename has more 8 caracters …
And SD card is on SPI1 not SPI0
It’s more easy to use SDFS for me.Sory.
Erick
Hi Renzo
i am back,
Now with RP2040 I no longer use SdFat but SDFS instead
can you add with RP2040 SDFS#define DEFAULT_EXTERNAL_ARDUINO_RP2040_STORAGE STORAGE_SDFS
https://arduino-pico.readthedocs.io/en/latest/fs.html
Thank’s you.
ErickHi Renzo
A new problem, with a file join type csv.
When a line is longer than 1071 characters, the line is broken with a newline character.
And also a newline character is added at the end of the file. (For this it is not too annoying).Thank you
Erick
OK Many Thank’s Renzo IT’S SUPER GOOD !
Another question if I can afford Renzo:
With some provider the message is indeed sent, but not delivered.
Probably because of HELO contents.
Can it be contained in an external const char* if it’s possible ?
Thank you for all.
Erick——————————————
250 2.1.5 Ok
DATA:
354 End data with <CR><LF>.<CR><LF>
Array: Bernard_05011701_2023.CSV
–frontier
Content-Type:
text/csv
; charset=”UTF-8″
Readed filename: Bernard_05011701_2023.CSV
SD Check
Open file:
OK
NORMAL
Message end
250 2.0.0 Ok: queued as 05021780304
221 2.0.0 Bye
Sending status:
1
0
Message sent!Hello Renzo
After several type of tests, I arrived at something positive.
If this can be a clue for you, here is what I did to get it to work properly.
Erick/* in Key.h #ifndef DEFAULT_EMAIL_NETWORK_TYPE_RP2040 #define DEFAULT_EMAIL_NETWORK_TYPE_RP2040 NETWORK_RP2040_WIFI #define DEFAULT_INTERNAL_ARDUINO_RP2040_STORAGE STORAGE_LITTLEFS -> //#define DEFAULT_EXTERNAL_ARDUINO_RP2040_STORAGE STORAGE_SD -> #define DEFAULT_EXTERNAL_ARDUINO_RP2040_STORAGE STORAGE_SDFAT2 #endif -> #define SD_CS_PIN 13
in .h
Ligne 290#define EMAIL_FILE_READ_EX FILE_READ -> //#define EMAIL_FILE_EX FsFile -> #define EMAIL_FILE_EX File32
in .cpp
line 982if (sdActive){ DEBUG_PRINTLN(F(“SD end”)); #ifndef ARDUINO_ESP8266_RELEASE_2_4_2 -> //EXTERNAL_STORAGE_CLASS.end(); #endif DEBUG_PRINTLN(F(“SD end 2″)); } */
Debug out :
DATA: 354 End data with <CR><LF>.<CR><LF> Array: Bernard_05011701_2023.CSV –frontier Content-Type: text/csv ; charset=”UTF-8” Readed filename: Bernard_05011701_2023.CSV SD Check Open file: OK NORMAL Message end 250 2.0.0 Ok: queued as 596F678035E 221 2.0.0 Bye Sending status: 1 0 Message sent!
Thank you for your speed Renzo.
With :
#ifndef DEFAULT_EMAIL_NETWORK_TYPE_RP2040
#define DEFAULT_EMAIL_NETWORK_TYPE_RP2040 NETWORK_RP2040_WIFI
#define DEFAULT_INTERNAL_ARDUINO_RP2040_STORAGE STORAGE_LITTLEFS
#define DEFAULT_EXTERNAL_ARDUINO_RP2040_STORAGE STORAGE_SDFAT2
#endifCompil problem :
|
/home/erick/Arduino/libraries/EMailSender/EMailSender.cpp: In member function ‘EMailSender::Response EMailSender::send(const char**, byte, byte, byte, EMailSender::EMailMessage&, EMailSender::Attachments)’:
/home/erick/Arduino/libraries/EMailSender/EMailSender.cpp:935:54: error: conversion from ‘File32’ to non-scalar type ‘FsFile’ requested
935 | EMAIL_FILE_EX myFile = EXTERNAL_STORAGE_CLASS.open(attachments.fileDescriptor[i].url.c_str());
/home/erick/Arduino/libraries/EMailSender/EMailSender.cpp:985:29: error: ‘SdFat’ {aka ‘class SdFat32’} has no member named ‘end’
985 | EXTERNAL_STORAGE_CLASS.end();
| ^~~It’s better but another problem
Here is the SD_FAT_TYPE
// 1 for FAT16/FAT32
#define SD_FAT_TYPE 1
and Sdat library is ESP8266SdFat contained in Earle F. Philhower RP2040 package 2.7.1Card is present.
Capacity of card: 7864320 kBytes
List of files on the SD.
.eeprom
.wifi
.log.csv
test.txt
logo.jpg
Bernard_05011701_2023.CSVConnecting to Linux
Connection: ESTABLISHED
Got IP address: 192.168.1.32
All structure created!
.
.
.
..
RCPT TO: <ffffff@gmx.fr>
250 2.1.5 OkDATA:
354 End data with <CR><LF>.<CR><LF>Array: test.txt
–frontier
Content-Type:
text/plain
; charset=”UTF-8″
Readed filename: test.txt
SD Check
Sending status:
0
500
Error on startup SD filesystem!Hi Renzo
New problem …
with :// Arduino SAMD microcontrollers configuration #ifndef DEFAULT_EMAIL_NETWORK_TYPE_RP2040 #define DEFAULT_EMAIL_NETWORK_TYPE_RP2040 NETWORK_RP2040_WIFI #define DEFAULT_INTERNAL_ARDUINO_RP2040_STORAGE STORAGE_LITTLEFS #define DEFAULT_EXTERNAL_ARDUINO_RP2040_STORAGE STORAGE_NONE #endif
and
//#define SD_CS_PIN SS #define SPIFM_CS_PIN SS
compile ok Card is present. Capacity of card: 7864320 kBytes List of files on the SD. .eeprom .wifi .log.csv test.txt logo.jpg Bernard_05011701_2023.CSV Connecting to Linux Connection: ESTABLISHED Got IP address: 192.168.1.32 All structure created!
When :
#define DEFAULT_EXTERNAL_ARDUINO_RP2040_STORAGE STORAGE_SD
problem to compil :
In file included from /home/erick/Arduino/libraries/EMailSender/EMailSender.cpp:35: /home/erick/Arduino/libraries/EMailSender/EMailSender.h:306: warning: "EMAIL_NETWORK_CLASS" redefined 306 | #define EMAIL_NETWORK_CLASS EMAIL_NETWORK_SSL_CLASS | In file included from /home/erick/Arduino/libraries/EMailSender/EMailSender.cpp:35: /home/erick/Arduino/libraries/EMailSender/EMailSender.h:186: note: this is the location of the previous definition 186 | #define EMAIL_NETWORK_CLASS WiFiClient | /home/erick/Arduino/libraries/EMailSender/EMailSender.cpp: In member function 'EMailSender::Response EMailSender::send(const char**, byte, byte, byte, EMailSender::EMailMessage&, EMailSender::Attachments)': /home/erick/Arduino/libraries/EMailSender/EMailSender.cpp:907:39: error: 'SD_CS_PIN' was not declared in this scope; did you mean 'SPIFM_CS_PIN'? 907 | if(!EXTERNAL_STORAGE_CLASS.begin(SD_CS_PIN)){ | ^~~~~~~~~ | SPIFM_CS_PIN exit status 1 Errore durante la compilazione per la scheda Raspberry Pi Pico W. -----------
SS pin is define in the top with , and ok to SD access.
const uint8_t SD_CS_PIN = SDCARD_SS_PIN;Thank’s for your replay Renzo
I think that’s it too, because the latest debug lines are :
————————————-
250 2.1.5 OkDATA:
354 End data with <CR><LF>.<CR><LF>Array: Bernard_05011701_2023.CSV
–frontier
Content-Type:
text/csv
; charset=”UTF-8″
Readed filename: Bernard_05011701_2023.CSV
Sending status:
0
500
EMAIL_STORAGE_TYPE_SD not enabled on EMailSenderKey.h
———————————-Attachments:
You must be logged in to view attached files. -
AuthorPosts