Posts by mike b

    Wilhelm,


    I just wanted to check the situation on this thread.


    I have been working on my system for about 3 months and I wont give up, but I appreciate there is a limit to what you can do in this forum and believe me, you have been fantastic.


    Do you have any ideas on how I can solve this? Is there a Tech Support group I could visit? I dont mind going to Europe.


    I would have a laptop, a Telit Quad and a power supply - thats it.


    mike

    No, what I meant was that if your system works ok, it must be something to do with my setup. I wanted to double check that my ISP could process MIME attachments ok.


    So I wrote a PHP script using a File Server I own to send a MIME jpg image attachment to my email account and it worked fine - so the problem cant be with my ISP.


    I now have noticed that the error message I get when I invoke SMTPCL is immediate. It feels like its not a connection problem to the SMTP server, but something is not happy within the Telit setup, or the command is somehow not available.

    Wilhelm,


    Thanks for confirming your SMPTCL function works ok - that is very helpful.


    I have suspected that possibly the problem is with my ISP email server (British Telecom).


    Last night I sent a MIME email and attachment from my file server to my BT email account and it functioned perfectly, so the problem does not seem to be with my ISP.


    So I am currently stuck.


    Do you have any further ideas or suggestions.


    Many thanks


    Mike

    Please see code attached as promised. The Telit replies are in brackets ie (OK).


    I have send emails ok using EMAILD with exactly the same SMTP login sequence.


    ‘ Setup
    AT
    (OK)
    AT&K2 'XON/XOFFFLOW CONTROL mono
    (OK)

    AT+CGDCONT= 1,"IP","orangeinternet","0.0.0.0",0,0
    (OK)


    ‘ SMTP login
    AT#ESMTP= "smtp.orange.net"
    (OK)

    AT#EUSER="xxxx@orange.net"
    (OK)


    AT#EPASSW= "xxxxx"
    (OK)


    AT#EADDR= xxxxx@orange.net
    (OK)


    AT#ESAV
    (OK)



    ‘ Activate
    AT#SGACT=1,1,"IPEASY" ,"IPEASY"
    (#SGACT:xx.xx.xx.xx)
    (OK)



    ‘ Send an email
    AT#SMTPCL= "xxxx@xxxx.com","Text test",0
    (ERROR)



    (This is the code to send the message body, but is not used as I stop program execution when I get the above error.)


    ‘ Send a text string via the serial port
    command = "Hello from Telit Module" 'some text
    send_command() ‘ send text plus a <CR>


    ‘ Send ctrl Z to terminate
    command = Chr(26) 'ascii ctrl z character
    send_command() ‘ctrl Z plus <CR>

    Ok - I understand - Visual Basic is confusing.


    My code is:
    command = "AT+CGDCONT=" + " 1," + Chr(34) + "IP" + Chr(34) + "," + Chr(34) + "orangeinternet" + Chr(34) ‘ Context


    The above code will send:


    "AT+CGDCONT=" will send AT+CGDCONT=


    "1," will send 1,


    Chr(34) will send "


    "IP" will send IP


    Chr(34) will send "


    "," will send ,



    etc .......


    You are correct - my command does not contain the full instruction - (I sent an older version). This is my full command:


    command = "AT+CGDCONT=" + " 1," + Chr(34) + "IP" + Chr(34) + "," + Chr(34) + "orangeinternet" + Chr(34) + "," + Chr(34) + "0.0.0.0" + Chr(34) + ",0,0"



    mike

    I'm not sure I understand - the previously attached code contains all my AT commands used to get this function going.


    I have removed authentication for security reasons - or have I misunderstood something?.


    rgds


    mb

    Please find attached code. Each routine is triggered by a Visual Basic button; so I can check response from Telit as I proceed. Chr(34) is a quote and Chr(26) is ctrl Z.


    Thanks



    ‘ Setup
    command = "AT"
    command = "AT&K2" 'XON/XOFFFLOW CONTROL
    command = "AT+CGDCONT=" + " 1," + Chr(34) + "IP" + Chr(34) + "," + Chr(34) + "orangeinternet" + Chr(34) ‘ Context


    ‘ SMTP login
    command = "AT#ESMTP=" + Chr(34) + "smtp.orange.net" + Chr(34) '
    command = "AT#EUSER=" + Chr(34) + "xxxx@orange.net" + Chr(34)
    command = "AT#EPASSW=" + Chr(34) + "xxxxx" + Chr(34)
    command = "AT#EADDR=" + Chr(34) + "xxxxx@orange.net" + Chr(34)
    command = "AT#ESAV"


    ‘ Activate
    command = "AT#SGACT=1,1," + Chr(34) + "IPEASY" + Chr(34) + "," + Chr(34) + "IPEASY" + Chr(34)


    ‘ Send an email
    command = "AT#SMTPCL=" + Chr(34) + "m.boyden@btinternet.com" + Chr(34) + "," + Chr(34) + "Text test" + Chr(34) + ",0" '


    ‘ A text string
    command = "Hello from Telit Module" 'some text
    send_command()


    ‘ Send ctrl Z
    command = Chr(26) 'ctrl z
    send_command()

    I have got #EMAILD working to give a known working foundation and check that all the ISP / SMTP logins are ok - this function works fine.


    I have now tried to send just an email as a test setting attachment=0
    ie AT#SMTPCL = "xx@xx","test",0 and I get an immediate ERROR.


    I have double checked for silly mistakes - any thoughts please?


    rgds


    mb

    I thought I could login to the SMTP server and then send a MIME email with a Base64 encoded attached file. I can get my micro to encode to Base64.


    I dont therefore need my own protocol - or have I misundrstood?


    I login to the SMTP server with:
    command = "AT#SKTD=" + "0,25," + Chr(34) + "smtp.orange.net" + Chr(34) + ",0"
    command = "HELO orange.net"
    command = "RCPT TO: <xxxxx@btinternet.com>"
    command = "MAIL FROM: <xxxxxx@orange.net>"
    command = "DATA"


    MIME 1.0
    etc ..... refer to my previous post


    My flow control is Xon Xoff. I have tested this using FTP and it transfers large files without fault.


    ..... sorry for silly questions and your patience is very much appreciated, Wilhelm.


    rgds


    mb

    My goal is to send a MIME image attachment (8kb binary file). I assume I would need Base64 encoding. I decided to start with just a text file attachment of just a few bytes.


    I'm working directly to the SMTP server. I thought I could send data via the serial port to the server - perhaps I'm getting confused ( that happens a lot!)


    rgds


    mb

    Q: Type of module? A: gm862
    Q: Firmware version? A: latest
    Q: Type of starter kit you have?
    (S1, S1B, S2, S3, S4, EVK1, EVK2, none, other)


    I have sent a 'simple' MIME email with no problems using your examples.


    I am having trouble sending an attachment. I send the serial commands below, and the remote mail server responds correctly at every stage and sends the email.


    When I receive the email the attachment file is created ok, but there is no text in either the body or the attachment.


    Any ideas please?


    rgds
    mb




    command = "From:<XXXXX@orange.net>"
    command = "To:<XXXXXXX@btinternet.com>"


    command = "MIME-Version: 1.0"


    command = "Content-Type: multipart/mixed;" + "boundary=" + Chr(34) + "XXXXboundarytext" + Chr(34)


    ‘ This is the body text
    command = "--XXXXboundarytext"
    command = "Content-Type: text/plain;"
    command = " charset=" + Chr(34) + "iso-8859-1" + Chr(34)
    command = "Content-Transfer-Encoding: 7bit"

    command = "This is the BODY text message"


    ' This is the attachment file test.txt
    command = "--XXXXboundarytext"
    command = "Content-Type: text/plain; "
    command = " charset=" + Chr(34) + "iso-8859-1" + Chr(34)
    command = "Content-Transfer-Encoding: 7bit"
    command = "Content-Disposition: attachment;" + "filename=" + Chr(34) + "test.txt" + Chr(34)
    command = "This is the ATTACHMENT text"
    command = "--XXXXboundarytext--"


    'end with crlf, . ,crlf
    Command= (vbCr + vbLf + "." + vbCr + vbLf)

    Q: Type of module? A:862
    Q: Firmware version? A: latest
    Q: Type of starter kit you have?
    (S1, S1B, S2, S3, S4, EVK1, EVK2, none, other)


    I have an FTP connection and all the following work fine:


    FTPLIST
    FTPGET
    FTPCLOSE


    I have found FTPOPEN xxxxxxxxxx, 1 to work best.


    I am trying to use FTPPUT to upload an ascii file. I get CONNECT fine and I can see the data tx led flash on my PC so I know the data is presented ok to the Telit Module.


    The trouble is I cant get the module to exit from the data mode to command mode. I send CR +++ CR as instructed. The manual says check S12 parameter - what is that please?


    Thanks again for your help


    rgds


    mb

    Ok ... its working!


    I needed "AT#FTPOPEN=" xxxxxxxxxxxxxxx , mode 1 - I think it is called active mode - my server did not like passive mode.


    Thank you for a really great Tech Support Service, Wilhelm.


    rgds


    mb

    I based my code on the example on page 51 and this shows TEXT=0 - anyway I now know TEXT=1 ...


    I shall give it a try tomorrow. I have read all of the FTP posts, so I must be near - plainly many other people have got this to work.


    Thanks for your support, I would be lost without it.


    rgds


    mb