Logomatic (or LCP2148) UART or other output to Telit module

Hi All

I am struggling to get the Logomatic to interface with a Telit 865 development board.

I have both modules working perfectly in isolation (so not P/s issues) but interfacing them has been a challenge. I have used a voltage divider on the Tx (both UART and other Tx) to reduce the signal to 2.9V from 3.3. I have connected the grounds of both modules and I have connected Tx to Tx which is a Telit idiosyncrasy.

The Telit module is self registering on the network thanks to NVM settings-that is not my issue.

I have made the following additions to the logomatic FW file on the logomatic to try to get it to output AT command sequences (in main) :

rprintf()

{rprintf(“AT+CREG=2\n\r”);//registers the telit module with the 3G network

delay_ms (6000);

rprintf(“AT#FTPTO=4000\n\r”);//sets the ftp time out to 4 seconds

delay_ms(2000);

rprintf(“AT#FTPOPEN=“72.XXX.YYY.100”,“user name”,“Password”\n\r”);//opens an FTP session with my server-works in filezilla

delay_ms(8000);

rprintf(“AT#FTPGET=“missing.html”\n\r”);//tranfers a file known to be on the server

delay_ms(9000);

rprintf(“FTPCLOSE/n/r”);//closes the FTP connection

delay_ms(5000);

rprintf(“AT#SHDN/n/r”);//shuts down the software on the Telit module:

}

Not only does this not work, I cannot even get the #SHDN command to work when I use it alone, so, obviously it is not communicating. It is not a server problem as I can connect when I don’t have the logomatic attached. This may have something to do with the UART settings, which I don’t understand. I have tried to use a RS232 cable to connect the logmatic UART pins to hyperterminal and try to debug that way but I get not response even when I enable echos.

Any help would be greatly appreciated. Thanks!

I don’t see any obvious problems, but here are a few things to try:

  • - You said that everything’s working fine in isolation, but make sure that everything is transmitting what you think it is (your AT strings) and in the format you think it is (2.8V serial). If you can talk to the Telit in isolation using 2.8V serial, verify that the Logomatic can successfully talk through your 2.8V conversion circuitry as well.
  • - Is it possible that your serial line voltage divider is not able to source enough current to the Telit? You could try reducing the resistor values but keep the ratio the same (not too far though, or you'll load down the Logomatic). Better yet, I'd use proper level-conversion circuitry in both directions. We sell the BOB-08745 ([http://www.sparkfun.com/commerce/produc ... ts_id=8745](http://www.sparkfun.com/commerce/product_info.php?products_id=8745)) but there are many schematics and parts out there from TI and elsewhere.
  • - Are either of the devices sending / expecting an inverted serial signal? Does the Telit serial port use any hardware flow control (CTS/RTS) that needs to be asserted?
  • Sorry you’re having problems, keep us posted as to your progress.

    Hi Mike,

    I have basically abandoned the 2148 as an unworkable solution. I have made a lot of progress using

    an Arduino Duemilanove and Openlog and a logic level converter.

    Everything works- the data from my sensor logs to a file on the OPENLOG , the arduino runs a script to connect the telit to an ftp site, files are transferred.

    I have only one problem. when I do an FTPGET I don’t know where the files go and I cannot send (FTPPUT).

    I don’t know how to configure the client server file location. The semi-equivalent file transfer command in DOS would be something like:

    Copy C:\datadirectory\datafile.txt a:\data\

    except I don’t know what C and a: are called or how to name them.

    If I had to guess it might look something (lots of stuff left out) like this:

    #include <Spi.h>

    #include <sd-reader_config.h>

    #include <sd_raw.h>

    #include <sd_raw_config.h//etc

    int print_disk_info();

    int sample();

    int readDisk();//etc

    Void loop()

    {

    Serial.println(“AT+CREG=2”); // registers to the network

    delay(7000);

    Serial.println(“AT#FTPTO=4000”); // sets the ftp TO

    delay(1000);

    Serial.println(“AT#FTPOPEN=”“72.XXX.XX.38"”,““Username””,"“pw”);//test FTP server

    delay(2000);

    Serial.println(“AT#FTPPUT=”\MMC1\LOGCON.TXT”);//transfers a file from microsd to ftpserver<-this is the part I don’t know

    delay(6000);

    Serial.println(“AT#FTPCLOSE”); // end of message command -close the ftp connection

    delay(6000);}

    Any Ideas?

    Thanks in advance,

    Can you try and change your command string as follows:

    From: “AT#FTPGET=“missing.html”\n\r”

    To: “AT#FTPGET=”“missing.html”“\n\r”

    Format:

    AT#FTPGET=“”

    PS: I would really be interested in example code as only a few steps behind you.