Shop OBEX P1 Docs P2 Docs Learn Events
Issue with Xport (Lantronix) — Parallax Forums

Issue with Xport (Lantronix)

Hi,

I use a propeller C3 with a Xport of Lantronix. I use manual connection.

My code is the following :
CON
  _clkmode = xtal1 + pll16x
  _xinfreq = 5_000_000

  Xport_Rx = 0                      
  Xport_Tx = 2
  Xport_Reset = 4
  Xport_Baud = 9600

  Temps_attente = 50000                  


VAR

  byte AT_Reponse[150], char
  
  
OBJ

  Xport  : "FullDuplexSerial"
  pst : "Parallax Serial Terminal" 

Pub main | ptr,a, ptr2
                                                        
  pst.Start(115200)

  Xport.Start(Xport_Rx, Xport_Tx, 0, Xport_Baud)

  pst.str(String("Starting",13,10))

  Xport.Str(String("Cwww.smart-wine-cellar.com/80",13))   

  Rx(Temps_attente)

  pst.Str(String(13))  
  pst.str(String("The request 0 is: ",9))
  pst.Str(@AT_Reponse)
  pst.Str(String(13))

  Xport.Str(String("GET /index.php?Voltage=456789",13,10,13,10))

  Rx(Temps_attente)

  pst.Str(String(13))  
  pst.str(String("The request 1is : ",9))
  pst.Str(@AT_Reponse)
  pst.Str(String(13))
  
PUB Rx(timeout)

  Rx_Xport(timeout)



Pub Rx_Xport(timeout) | ptr  

    ptr := 0

    Xport.RxFlush
    repeat
      char := Xport.RxTime(timeout) 
      pst.dec(char)
      AT_Reponse[ptr++] := Char 
    while (char <> 13)

    AT_Reponse[--ptr] := 0
'    RxPacketNow_Xport(timeout) 

'Pri RxPacketNow_Xport(timeout)  | ptr
'
'    ptr := 0
'    pst.Str(String(13))
'    Repeat   
'      char := Xport.Rx
'      pst.dec(char) 
'      AT_Reponse[ptr++] := Char
'    while (Char <> 10)
'    
'    AT_Reponse[--ptr] := 0

The response of the request 0 is C for connected and just after I receive HTTP/1.0 408 Request time-out.
I don't understand why I get this.

If anyone has a hint, I would appreciate.
Sign In or Register to comment.