Shop OBEX P1 Docs P2 Docs Learn Events
Issue with a Xport of Lantronix — Parallax Forums

Issue with a Xport of Lantronix

Hi, I use a propeller C3 with a Xport of Lantronix. I use manual connection.
For the connection between propeller C3 and the Xport, I use Rx and Tx Pin.

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 = 5000                  


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("Commencement",13,10))

'  Reset_Module

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

  Rx(Temps_attente)

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

  waitcnt(clkfreq*2+cnt) 

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

  Rx(Temps_attente)

  pst.Str(String(13))  
  pst.str(String("the request 1: ",9))
  pst.Str(@AT_Reponse)
  pst.Str(String(13))


PUB Reset_Module

  dira[Xport_Reset]~~
  outa[Xport_Reset]~
  waitcnt(clkfreq/10+cnt)
  outa[Xport_Reset]~~
  waitcnt(clkfreq+cnt)
  
PUB Rx(timeout)

  Rx_Xport(timeout)



Pub Rx_Xport(timeout) | ptr  

    ptr := 0

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

    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.
When I convert decimal response I don't get the same sentence (the image "conversion" that is attached)

I also attached responses with a baudrate at 9600 and 115200 (image "response with 9600 baudrate" and "response with 115200 baudrate")
I don't understand why I don't get the same response whereas the xport is configured for these baudrate.

When I try to connect me at this URL "www.google.fr" or any other URL, I haven't got responses (see image "www.google.fr").

If anyone has a hint, I would appreciate.
656 x 354 - 23K
888 x 185 - 5K
Sign In or Register to comment.