Shop OBEX P1 Docs P2 Docs Learn Events
What's eating my DAT data? — Parallax Forums

What's eating my DAT data?

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2011-05-30 19:04 in Propeller 1
Working on a little snippit to allow my Propeller to send SMTP authenticated email via a serial link.

For some reason my DAT data seems to get chewed up when monitored with PST.
Data in the wrong places, and partial data. Either the heat is getting to me and I'm doing something silly, or I'm just doing something silly.

A second set of eyes would be appreciated..

Here's the code:
(No, that isn't my actual BASE64 username/password) :)
CON
  _clkmode = xtal1 + pll16x
  _xinfreq = 5_000_000

OBJ
   serial : "FullDuplexSerial"              'Standard serial driver   

DAT
   eserver    byte      "8cogs.com",0
   
   efrom      byte      "jeff@8cogs.com",0
   
   eto        byte      "jeffledger@gmail.com",0
   
   login      byte      "amemZreer234ers=",0
   pass       byte      "bWwrGFlreDk=",0

   'http://ostermiller.org/calc/encode.html
   
   subject    byte      "message from propeller",0
   message    byte      "Hey my PING sensor just went off!",0
   
PUB main | range

  serial.start(31, 30, 0, 115200)  
  
  repeat 1000000
  
  serial.str(string("ATDT "))
  serial.str(eserver)
  serial.str(string(" 25",13))
  repeat 800000

  serial.str(string("elho",13))
  serial.str(string("auth login",13))
  repeat 800000 

  serial.str(login)
  serial.tx(13)
  repeat 800000             
  serial.str(pass)
  serial.tx(13)
  repeat 800000 

  serial.str(string("MAIL FROM:"))
  serial.str(efrom)
  serial.tx(13)
  repeat 800000

  serial.str(string("RCPT TO:"))
  serial.str(eto)
  serial.tx(13)
  repeat 800000             
     
  serial.str(string("DATA",13))
  serial.str(string("subject:"))
  serial.str(subject)
  serial.tx(13)
  
  serial.str(message)
  serial.tx(13)
  serial.str(string(".",13))
  serial.str(string("quit",13))

Comments

  • localrogerlocalroger Posts: 3,452
    edited 2011-05-30 17:30
    Are you using a modified version of fullduplexserial? I'd guess that's most likely to be the problem. You might try declaring another object with a big blank DAT block and putting it after FDS so that its DAT and VAR RAM will be between FDS's and your code's DAT. If that clears it up you know it's FDS overrunning. I don't see anything in your code that could cause this.
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-05-30 18:09
    OBC, you need to put an "@" character in from of eserver, efrom, eto, etc. when passing them as a parameter to the STR routine.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-05-30 18:12
    Working on a little snippit to allow my Propeller to send SMTP authenticated email via a serial link.

    For some reason my DAT data seems to get chewed up when monitored with PST.
    Data in the wrong places, and partial data. Either the heat is getting to me and I'm doing something silly, or I'm just doing something silly.

    A second set of eyes would be appreciated..

    Here's the code:
    (No, that isn't my actual BASE64 username/password) :)
    CON
    _clkmode = xtal1 + pll16x
    _xinfreq = 5_000_000
     
    OBJ
    serial : "FullDuplexSerial" 'Standard serial driver 
     
    DAT
    eserver byte "8cogs.com",0
     
    efrom byte "jeff@8cogs.com",0
     
    eto byte "jeffledger@gmail.com",0
     
    login byte "amemZreer234ers=",0
    pass byte "bWwrGFlreDk=",0
     
    'http://ostermiller.org/calc/encode.html
     
    subject byte "message from propeller",0
    message byte "Hey my PING sensor just went off!",0
     
    PUB main | range
     
    serial.start(31, 30, 0, 115200) 
     
    repeat 1000000
     
    serial.str(string("ATDT "))
    serial.str(eserver)*********************************
    serial.str(string(" 25",13))
    repeat 800000
     
    serial.str(string("elho",13))
    serial.str(string("auth login",13))
    repeat 800000 
     
    serial.str(login)***************************
    serial.tx(13)
    repeat 800000 
    serial.str(pass)*********************
    serial.tx(13)
    repeat 800000 
     
    serial.str(string("MAIL FROM:"))
    serial.str(efrom)*************************
    serial.tx(13)
    repeat 800000
     
    serial.str(string("RCPT TO:"))
    serial.str(eto)'''''''''''''''''''''''''''''''''''''''
    serial.tx(13)
    repeat 800000 
     
    serial.str(string("DATA",13))
    serial.str(string("subject:"))
    serial.str(subject)**************************
    serial.tx(13)
     
    serial.str(message)
    serial.tx(13)
    serial.str(string(".",13))
    serial.str(string("quit",13))
    

    You're missing some @ in front of your addresses.

    serial.str(subject)

    serial.str(@subject)

    other have *********************
    behind them.

    edit: Dave beat me to it.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-05-30 19:04
    <HEAD SMACK> DUH!

    Yeah, I thought it was something simple..

    Thanks Guys

    OBC
Sign In or Register to comment.