Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
1,186 Views

SD file to be sent UART via GSM+AT commands

Im testing the intel Galileo 2 with GSM module SIM900, in this case im using MMS AT comands to send MMS before that I made it some test on Arduino and the code its works perfectly,but In intel Galileo I have a problem in one part of the code I need to send the file "copia.jpg" by Serial1 port the file copia.jpg its on SD card.

Here my code on Arduino Sketch:

The problem its on Serial1.write(data) because when the module GSM receive the instruction AT+CMMSDOWN its response with connect command.

and after that I can send the picture by Serial and the module responses Ok if the file received its the same size of dataFile.size() in this case the module its not receiving the file and give me error response.

Here the file that I need send to Serial1: "copia.jpg"

0 Kudos
6 Replies
FTinetti
Honored Contributor I
175 Views

Hi lalo15894,

I don't have any GSM module to try, but maybe we can try something...

lalo15894 wrote:

...

The problem its on Serial1.write(data) because when the module GSM receive the instruction AT+CMMSDOWN its response with connect command.

and after that I can send the picture by Serial and the module responses Ok if the file received its the same size of dataFile.size() in this case the module its not receiving the file and give me error response.

What is the error response? please add reading Seral1, and if something is available, and report if something is sent from the GSM to the sketch

What module is giving the error response? I assume it's the GSM, but maybe I'm losing something.

HTH,

Fernando.

idata
Community Manager
175 Views

Sorry for late answer well, the error response its the GSM here the command on the Datasheet, Im using a Write command:

Im seeing the response module with hyperterminal because the GSM has a RS232 pins to debug it... I think that the galileo send incomplete data by serial, or maybe the library SD.h its making problems. For example making some test add this part of code:

and the file send it correctly but i dont know when I dont open the port Serial always the GSM dont receive the data correctly o maybe incomplete.

FTinetti
Honored Contributor I
175 Views

lalo15894 wrote:

I think that the galileo send incomplete data by serial, or maybe the library SD.h its making problems. For example making some test add this part of code:

and the file send it correctly but i dont know when I dont open the port Serial always the GSM dont receive the data correctly o maybe incomplete.

Do you mean that if you open the Serial as shown in your code the file is sent without errors? If that's the case, maybe the problem is about communiatioin speed... try to use a minor value for bauds in the communication by Serial1... Maybe it's related and maybe not, but I've had some trouble with AT devices due to insufficient power the AT module, how is the GSM powered (a picture and schematic may help)?.

Fernando.

idata
Community Manager
175 Views

Sorry for the late answer I´ve been bussy for now the project its working fine thanks for all, the solution was use minor value for baud rates. Greetings and thanks for all.

FTinetti
Honored Contributor I
175 Views

lalo15894 wrote:

the solution was use minor value for baud rates. Greetings and thanks for all.

Great, thank you very much for sharing,

Fernando.

idata
Community Manager
175 Views

Hi Lalo,

 

 

Have you been able to check FGT's post? I'm wondering if you've been working on this lately, or if you have any update.

 

 

Regards,

 

-Pablo
Reply