Show Posts
|
|
Pages: [1] 2
|
|
1
|
International / Español / Re: problemas para programar arduino mega 2560
|
on: November 23, 2012, 04:45:33 pm
|
|
este es el error Binary sketch size: 3200 bytes (of a 258048 byte maximum) avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500_2_ReceiveMessage(): timeout . . . avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500_2_ReceiveMessage(): timeout . . . avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500_2_ReceiveMessage(): timeout
y se repite sucesivamente
|
|
|
|
|
2
|
Using Arduino / Installation & Troubleshooting / problems to upload sketch to arduino mega 2560
|
on: November 23, 2012, 12:10:09 pm
|
|
hi everyone, I have a problem to upload my sketch on my arduino mega 2560. my sketch uses a serial comunication using serial port 0 and 1, when i'm trying to upload the sketch to my board, the IDE shows a message: upload to I/O, this operation might take a few seconds, but in my case, this takes several hours, later the IDE shows this message
avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500_2_ReceiveMessage(): timeout . . . avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500_2_ReceiveMessage(): timeout avrdude: stk500_2_ReceiveMessage(): timeout
. . .
if anybody can help me, it be would appreciate it. thanks
|
|
|
|
|
3
|
International / Español / problemas para programar arduino mega 2560
|
on: November 23, 2012, 11:03:17 am
|
|
hola a todos, escribo por este medio para ver si alguien me puede ayudar, en este momento necesito programar mi arduino mega 2560, el programa que intento bajar al microcontrolador utiliza los puertos seriales 0 y 1, había estado bajando este programa varias veces al arduino para hacer pruebas y de un momento a otro el arduino ya no me quiere programar, se queda horas intentando programar. he intentado bajar programas mas sencillos como el "blik", este tipo de programas los baja sin ningún problema, pero si intento bajar uno que haga uso del puerto serial, se queda horas intentando programar. si alguien me puede ayudar se lo agradecería. Gracias!!!
|
|
|
|
|
4
|
International / Español / Re: como conectar un arduino uno con un modulo gprs
|
on: November 01, 2012, 06:17:53 pm
|
amigo ahora te hago otra pregunta ya esta la conexión física entre el módem GPRS, ahora necesito programar el arduino, me conseguí un arduino mega, y encontré este código pero no me funciona. espero me puedas ayudar, Gracias!! void setup() { Serial.begin(115200); Serial1.begin(115200);
}
void loop() { // lee desde el puerto 0, envía al puerto 1: if (Serial.available()) { char inByte = Serial.read(); Serial1.print(inByte);
} // lee del puerto 1, envía al puerto 0: if (Serial1.available()) { char inByte = Serial1.read(); Serial.print(inByte); } // Serial1.print("at"); // Serial1.print("\n"); //// delay(15000);
}
|
|
|
|
|
6
|
International / Español / Re: como conectar un arduino uno con un modulo gprs
|
on: October 24, 2012, 07:19:54 pm
|
|
Hola, gracias por tu respuesta. la intención es comunicarlos utilizando los UART de los módulos GPRS, para tener acceso a las señales TX y RX, para poder de esa manera enviar los comandos AT desde el Arduino UNO, mi pregunta principal, es que arreglo electrónico debo hacer para poder hacer una comunicación serial, osea conectar los Tx y Rx de los modulos GPRS y los del arduino, hago la pregunta por que no creo que se deban conectar directamente por que el arduino maneja señales y 5V y los módulos GPRS de 3.3V. intente hacer un arreglo con un max 232 pero no creo que me sirva por que me entregaría señales de -15V a 15V.
Espero me puedas ayudar con esta información adicional que te acabo de entregar, Gracias!!
|
|
|
|
|
11
|
Using Arduino / Networking, Protocols, and Devices / Re: GPRS with SM5100B
|
on: September 28, 2012, 01:56:52 pm
|
Thanks for your advices, my code it's already working, but i have some problems with the command AT+DATATSEND, i want to send mesages from my smb5100b but when i use this command I recieve error messages like CMR: ERROR 4, and when i put the comand like this AT+DATATSEND= 1,1 i have this answer > and my device doesn't receive any other command i have the same problem when i write this comand on arduino with this code cell.print("AT+DATATSEND= 1,1") could you help me please? thanks!
|
|
|
|
|
12
|
International / Español / GPRS Y XBEE
|
on: September 28, 2012, 01:28:42 pm
|
|
hola a todos, estoy tratando de establecer una comunicación entre un modulo GPRS y un XBEE SERIES 2, alguien sabe que debo de hacer para establecer dicha comunicación?
y otra pregunta, estoy trabando con el modulo SPREADTRUM SM5100B-D, y estoy tratando de enviar datos por TCP/IP mediante el comando AT+DATASEND,y al parecer este comando no me funciona, lo he intentado escribir de diferentes formas y solo obtengo como respuesta un error, o el modulo me saca un ">" y se queda bloqueado.
gracias por su atención, espero me puedan ayudar
|
|
|
|
|
13
|
Using Arduino / Networking, Protocols, and Devices / Re: GPRS with SM5100B
|
on: September 20, 2012, 12:07:04 pm
|
I've written my code again acording to your suggestions, first i don't have the function strcmp, so i made string comparison using this code a=="+SIND: 11" and i made the command reading with this code char* a;
for(i=0;i<=9;i++){ a[i]=cell.read(); } so my final code is this, but still not working, could you please help me? thanks #include <NewSoftSerial.h> //Include the NewSoftSerial library to send serial commands to the cellular module. #include <string.h> //Used for string manipulations
char incoming_char[9];//Will hold the incoming character from the Serial Port.
int i=0; int conf_flag=0; char key_char[4]; int send_flag=0; NewSoftSerial cell(2,3); //Create a 'fake' serial port. Pin 2 is the Rx pin, pin 3 is the Tx pin.
/////////////////////////////////////////////////////
void setup() { //Initialize serial ports for communication. Serial.begin(9600); cell.begin(9600); Serial.print("Starting SM5100B Communication...");
}
///////////////////////////////////////////////////////
int configure(){ char* a; int flag=0; int var=0; cell.print("AT+SBAND=10"); cell.print("AT+CFUN=1, 1"); var=100; while(var>0){ for(i=0;i<=9;i++){ a[i]=cell.read(); } if (a=="+SIND: 11"){ var=0; } else if(a=="+SIND: 7"){ var=0; } else { var=var-1; } } if(a=="+SIND: 11"){ a=0; Serial.print("modulo registrado"); cell.println("AT+CGAT?"); while(var>0){ for(i=0;i<9;i++){ a[i]=cell.read(); } if (a=="+CGATT: 1"){ a=0; Serial.print("encontrado servicio GPRS"); cell.print("AT+CGDCONT=1, \"IP\", \"web.colombia.com.co\""); cell.print("AT+CGPCO=0,\"none\",\"none\",1"); // cell.print("AT+CGPCO=0,"","",1"); cell.print("AT+CGACT=1,1"); while(var>0){ for(i=0;i<2;i++){ a[i]=cell.read(); } if (a=="OK"){ a=0; flag=HIGH; return flag; } else{ Serial.print("error al activar el PDP"); flag=LOW; return flag; } } } else if(a=="CGATT: 0"){ a=0; Serial.print('servicio GPRS no encontrado, inserte una sim card con plan de datos'); flag=LOW; return flag; } } } else if(a=="+SIND: 7"){ a=0; Serial.print("modulo solo para llamadas de emergencia"); flag=LOW; return flag; } }
//////////////////////////////////////////////////////// int conection_f(){ int b=0; char* a; int flag=0; cell.print("AT+SDATACONF=1,\"TCP\",\"74.125.229.248\", 80, 1"); // la IP que se encuentra en esta linea es la IP de google, cambiela por la de IP que usted desee //cell.println("AT+SDATACONF=1,\"TCP\",\"181.51.142.39\", 2510,1"); // servidor temporal for(i=0;i<2;i++){ a[i]=cell.read(); } if(a=="OK"){ a=0; cell.print("AT+SDATASTART=1, 1"); for(i=0;i<28;i++){ a[i]=cell.read(); } if(a=="+STCPD: 1"){ cell.print("AT+SDATATREAD=1"); if(cell.available() >0) { b=cell.read(); //Get the character from the cellular serial port. Serial.print(b); } } cell.print("AT+SDATASTATUS=1"); for(i=0;i<28;i++){ a[i]=cell.read(); } if (a=="+SOCKSTATUS: 1,1,0102,0,0,0"){ a=0; Serial.print("socket conectado"); // cell.print("AT+SDATATSEND=1, 10"); // envio de datos y tramas // for(i=0;i<9;i++){ // a[i]=cell.read(); // } // if(a=="+STCPD: 1"){ // a=0; // Serial.print("datos recibidos por el host remoto"); cell.print("AT+SDATASTART=1,0"); for(i=0;i<2;i++){ a[i]=cell.read(); } if(a=="OK"){ Serial.print("conexion terminada con exito"); flag=HIGH; return flag; } } } else if(a=="+SOCKSTATUS: 1,0,0104,0,0,0"){ a=0; Serial.print("socket no conectado"); flag=LOW; return flag; } else{ Serial.print("no se pudo establecer conexion con el servidor"); } }
/////////////////////////////////////////////////////////
void loop(){
//If a character comes in from the cellular module... if(cell.available() >0) {
for(i=0;i<9;i++){ incoming_char[i]=cell.read(); //Get the character from the cellular serial port. }
if (incoming_char=="+SIND: 1"){ Serial.print("espere mientras el modulo se prepara"); }
else if (incoming_char=="+SIND: 7"){ Serial.print("espere mientras el modulo se prepara"); }
else if (incoming_char=="+SIND: 11"){ Serial.print("modulo listo para empezar a transmitir"); } }
////If a character is coming from the terminal to the Arduino... if(Serial.available() >0) {
for(i=0;i<13;i++){ key_char[i]=Serial.read(); //Get the character from the cellular serial port. }
if (key_char=="conf" || incoming_char=="+SIND: 7") { conf_flag=configure(); if (conf_flag==HIGH){ Serial.print("modulo listo para transmitir"); } else if (conf_flag==LOW){ Serial.print("modulo no se pudo configurar con exito, intentelo nuevamente"); } }
if (key_char=="serv" && incoming_char=="+SIND: 11" ){ send_flag=conection_f(); if(send_flag==HIGH){ Serial.print("datos enviados con exito, conexion terminada"); } else if(send_flag==LOW){ Serial.print("error al enviar los datos intentelo de nuevo"); }
}
} }
|
|
|
|
|
15
|
Using Arduino / Networking, Protocols, and Devices / GPRS with SM5100B
|
on: September 14, 2012, 11:15:15 pm
|
hi everyone!! i'm working with an arduino uno and a SM5100B GSM Cellular Shield, i'm trying to work with GPRS, but i have to read de comands from de cellular shiel like "+SIND: 1" or + "+SIND 7", i need to read these commands to make a better code, and cofigure this cellular shield using an arduino code. this is de code that i have written. thanks and i hope that anybody could gimme some help #include <NewSoftSerial.h> //Include the NewSoftSerial library to send serial commands to the cellular module. #include <string.h> //Used for string manipulations
char incoming_char=0;//Will hold the incoming character from the Serial Port. int conf_flag=0; char key_char=0; int send_flag=0; NewSoftSerial cell(2,3); //Create a 'fake' serial port. Pin 2 is the Rx pin, pin 3 is the Tx pin.
/////////////////////////////////////////////////////
void setup() { //Initialize serial ports for communication. Serial.begin(9600); cell.begin(9600); Serial.print("Starting SM5100B Communication...");
}
///////////////////////////////////////////////////////
int configure(char){ int flag=0; char a=0; int var=0; cell.print("AT+SBAND=10"); cell.print("AT+CFUN=1, 1"); var=100; while(var>0){ a=cell.read(); if (a=='+SIND: 11'){ var=0; } else if(a=='+SIND: 7'){ var=0; } else { var=var-1; } } if(a=='+SIND: 11'){ a=0; Serial.print('modulo registrado'); cell.println("AT+CGAT?"); a=cell.read(); if (a=='+CGATT: 1'){ a=0; Serial.print("encontrado servicio GPRS"); cell.print('AT+CGDCONT=1, "IP", "web.colombia.com.co"'); cell.print('AT+CGPCO=0,"","",1'); cell.print("AT+CGACT=1,1"); a=cell.read(); if (a=='OK'){ a=0; flag=HIGH; return flag; } else{ Serial.print("error al activar el PDP"); flag=LOW; return flag; } } else if(a=='CGATT: 0'){ a=0; Serial.print('servicio GPRS no encontrado, inserte una sim card con plan de datos'); flag=LOW; return flag; } } else if(a=='+SIND: 7'){ a=0; Serial.print("modulo solo para llamadas de emergencia"); flag=LOW; return flag; } }
//////////////////////////////////////////////////////// int conection_f(char){ char a=0; int flag=0; cell.print('AT+SDATACONF=1, "TCP", "74.125.229.248", 80, 1'); // la IP que se encuentra en esta linea es la IP de google, cambiela por la de IP que usted desee a=cell.read(); if(a=='OK'){ a=0; cell.print("AT+SDATASTART=1, 1"); cell.print("AT+SDATASTATUS=1"); a=cell.read(); if (a=='+SOCKSTATUS: 1,1,0102,0,0,0'){ a=0; Serial.print("socket conectado"); cell.print("AT+SDATATSEND=1, 10"); // envio de datos y tramas cell.print("AT+SDATATREAD=1"); a=cell.read(); if(a=='+STCPD:1'){ a=0; Serial.print("datos recibidos por el host remoto"); cell.print("AT+SDATASTART=1,0"); a=cell.read(); if(a=='+STCPD:1' || a=='OK'){ Serial.print("conexion terminada con exito"); flag=HIGH; return flag; } } } else if(a=='+SOCKSTATUS: 1,0,0104,0,0,0'){ a=0; Serial.print("socket no conectado"); flag=LOW; return flag; } else{ Serial.print("no se pudo establecer conexion con el servidor"); } } }
/////////////////////////////////////////////////////////
void loop(){
//If a character comes in from the cellular module... if(cell.available() >0) { incoming_char=cell.read(); //Get the character from the cellular serial port.
Serial.print(incoming_char);
if (incoming_char=='+SIND: 1'){ Serial.print("espere mientras el modulo se prepara"); }
else if (incoming_char=='+SIND: 7'){ Serial.print("espere mientras el modulo se prepara"); }
else if (incoming_char=='+SIND: 11'){ Serial.print("modulo listo para empezar a transmitir"); } }
////If a character is coming from the terminal to the Arduino... if(Serial.available() >0) {
key_char=Serial.read(); //Get the character coming from the terminal
if (key_char=='conf' || incoming_char=='+SIND: 7') { conf_flag=configure(key_char); if (conf_flag==HIGH){ Serial.print("modulo listo para transmitir"); } else if (conf_flag==LOW){ Serial.print("modulo no se pudo configurar con exito, intentelo nuevamente"); } }
if (key_char=='server' && incoming_char=='+SIND: 11' ){ send_flag=conection_f(key_char); if(send_flag==HIGH){ Serial.print("datos enviados con exito, conexion terminada"); } else if(send_flag==LOW){ Serial.print("error al enviar los datos intentelo de nuevo"); }
}
} }
|
|
|
|
|