Hi

I want to add these lines to arducopter software for Serial3 or telemetry:

AT+CGATT?   //attached to GPRS ?
AT+IPR=57600
AT+IFC=2,2   //"it's better to use hardware flow control"
AT+CIPMODE=1  //Enable transparent mode
AT+CSTT="internet"  //set APN
AT+CIICR   //open GPRS
AT+CIFSR      // Get local IP address
AT+CIPSERVER=1,1234//Start the TCP server, listening port:1234

 

I cant use the same structure as Andreas did in Modem_v2.6 becouse of the FastSerial.h are not beeing used any more i think?!?

Can someone point me in the right directions on how to implement these at commands?

 

 

Regards

Ludvig

Views: 1939

Replies to This Discussion

Hi

 

Can someone tell me how send AT commands from APM2.5 using HAL.

I have been trying to use

hal.uartC->println("AT+CFUN=1,1");

as i understand  hal.uartC is 57600.

But i dont think my APM send this command. Is this the right command to use??

 

Regards

Ludvig

 

 

Hi

If i load a basic sketch to my APM 2,5 board and use FastSerial.h with this commands:

Serial.print("AT+CFUN=1,1");

Then the sim900 responds.

 

 

If i load Arducopter 2.9.1 and use this command:

hal.uartA->print("AT+CFUN=1,1");

The sim900 dont responds to the command. I have monitored the output and i get AT+CFUN=1,1  at baud 57600

 

i dont really understand the diffrence between these command.

Can someone please tell me what im doing wrong?

 

Best Regards

Ludvig

 

Change the AT commands here and give Sorens code a try...http://code.google.com/p/ardupilot-cellular-extension/source/browse...

Hi, my integration README is for ArduPlane but with a little effort it should work just fine on ArduCopter too. I didn't do too much for Copter because my own one never flew far enough for me to need mobile :)

The main points are that MobileStream replaces one of the UARTs that GCS_* talks with, and that it itself gets a UART (the same as the one removed from GCS, typically) to talk with the modem on.

The task() method must be called often, like fastLoop. I have been careful not to put anything there that may infloop :)

Regards

Soren

Hi, 

Hope my question fits this thread..  Apologies for hijacking if not.  I'm trying to apply your cellular extension to version ArduPlane 2.68, but having trouble compiling the firmware.  Any suggestion you may have would be most appreciated.  I followed instructions in your README, but make fails. 

%% libraries/APM_RC/APM_RC_APM1.o
/code/ardupilot-ArduPlane-2.68/libraries/APM_RC/APM_RC_APM1.cpp:27:23: fatal error: WProgram.h: No such file or directory
compilation terminated.
make: *** [/tmp/ArduPlane.build/libraries/APM_RC/APM_RC_APM1.o] Error 1

The error is kind of a lie..  The WProgram.h file does exist, it lives in /code/ardupilot-ArduPlane-2.68/libraries/Desktop/include.  Could my build environment be incorrect somehow, and that is why this header file is "not found?"

Note: I have the ArduPlane 2.72 source, and I can compile and upload firmware to my APM2.5 board ok.  I'm using 3DR 900mhz telemetry radios for basic tests, they work fine.  Mission Planner connects to aircraft just fine, and so does QGroundcontrol.  Also, I can connect to the Drone Cell over usb (FTDI) and send AT commands to it. It sees its SIM card, it registers to the cell network, and gets an IP address.  All this to indicate that I don't have a hardware problem.  Just hoping for maybe some helpful words from someone skilled at software dev.

Thank you, and kind regards,

alex

Hi Ludvig, is your commands below all you give to DroneCell to make it work?

"

AT+CGATT?   //attached to GPRS ?
AT+IPR=57600
AT+IFC=2,2   //"it's better to use hardware flow control"
AT+CIPMODE=1  //Enable transparent mode
AT+CSTT="internet"  //set APN
AT+CIICR   //open GPRS
AT+CIFSR      // Get local IP address
AT+CIPSERVER=1,1234//Start the TCP server, listening port:1234

"

-Veikko-

Hi

Im using these commands:

 Serial2.begin(57600);
    //delay (1500);
   // hal.uartA->println("+++~~~~ATH0");   // Break into channel if there is an existing connection
   // delay (1500);
    Serial2.println("AT V1 E1 X1 S0=0");   // Set error response and do not pickup on ring
    delay (1500);
    Serial2.println("AT+CREG=2");          // Set various notice messages and parameters
    delay (1500);
    Serial2.println("AT+CMEE=2");
    delay (1500);
    Serial2.println("AT+CR=1");
    delay (1500);
    Serial2.println("AT+CRC=1");
    delay (1500);
    Serial2.println("AT+CSNS=4");
    delay (1500);
    Serial2.println("AT+CSMINS=1");
    delay (1500);
    Serial2.println("AT+CSCLK=0");
    delay (1500);
    Serial2.println("AT+CIURC=1");
    delay (1500);
    Serial2.println("AT+CGEREP=2");
    delay (1500);
    Serial2.println("AT+CIPMUX=0");
    delay (1500);
    Serial2.println("AT+CIPMODE=1");
    delay (1500);
    Serial2.println("AT+CIPCCFG=8,15,15,0");
    delay (1500);
    Serial2.println("AT+CMUX=0,0,4,127,10,3,30,10,2"); 
    delay (3500);
    Serial2.println("AT+CSTT=\"internet.public\"");  //set APN
    delay (3500);
    Serial2.println("AT+CIICR");  //open GPRS
    delay (3500);
    Serial2.println("AT+CIFSR");   // Get local IP address
    delay (3500);
    //hal.uartA->println("AT+CIPSERVER=1,1234");   //Start the TCP server, listening port:1234
    Serial2.println("AT+CIPSTART=\"UDP\",\"xxxxx.no-ip.info\",\"14550\"");        //  Start the UDP server
    modem_ready = 1; 
  }
}

Do you think this works? If I connect DroneCell directly to computer with FTDI and give these commands manually one by one in teraterm/terminal and after the DroneCell is set up I disconnect the ftdi cable from computer and connect it to the APM and the APM should then feed transparent serial data to the mission planner? The two last rows are a bit confusing;

AT+CIPSERVER=1,1234 

AT+CIPSTART=\"UDP\",\"xxxxx.no-ip.info\",\"14550\"

Do I need to use the both rows to establish the connection or olnly one of them? Is the xxxxx.no-ip.info the one I get earlier with the command AT+CIFSR or is it my computers ip address?

+++~~~~ATH0
AT V1 E1 X1 S0=0

AT+CREG=2

AT+CMEE=2

AT+CR=1

AT+CRC=1

AT+CSNS=4

AT+CSMINS=1

AT+CSCLK=0

AT+CIURC=1

AT+CGEREP=2

AT+CIPMUX=0

AT+CIPMODE=1

AT+CIPCCFG=8,15,15,0

AT+CMUX=0,0,4,127,10,3,30,10,2

AT+CSTT=\"internet.public\"

AT+CIICR

AT+CIFSR

AT+CIPSERVER=1,1234 

AT+CIPSTART=\"UDP\",\"xxxxx.no-ip.info\",\"14550\"

Hi

Yes it will work.

Copy paste each of the command in the Terminal and verify the OK statement from dronecell.

 

AT+CIPSERVER=1,1234   =  1234 is the TCP portnumber.

 

 

AT+CIPSTART=\"UDP\",\"xxxxx.no-ip.info\",\"14550\"  = UDP.  It will stream data to the address www.xxxxx.no-ip.info adress at port 14550.

Change the (xxxxx.no-ip.info) with your IP or dyndns address.

You need to open Port 14550 to the computer running mission planner.

 

You cant use both of the lines.  One for UDP  one for TCP.

Im using UDP connections.

 

 

 

Ok, thanks, have to try that. Are you able to make this work directly with 3g usb stick modem on your computer? I guess the ip address has to be public?

RSS

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service