GE865 SER2

Hi,

I am using the ge865 on a sparkfun evaluation board where I can find tx_aux and rx_aux , which I assumed I could send/receive data from my serial port device (sensor)

e.g. python script - ser2.send(), ser2.read().

Now trying for a couple of days with all sorts of speed settings etc. I can;t get it to work.

Has anybody got serial data out this way? Do I need to switch it on or are there certain conditions when I can use it.

As there are only 2 pins for ser2 on the chip I would also assume flow control must be off…

I would prefer to use ser2 port for the sensor as I could then still do “debug” messages via ser e.g. usb port.

Any help would be appreciated.

thanks

sigi

kiwisigi, I am using a Sparkfun FTDI Basic with the GE865, and use SER2 to debug code, so I haven’t done more that the SER2.send. I’m using Teraterm and the port setup is 115200, 8, N, 1, no flow control. I have the RX_aux to FTDI TXO and TX_aux to FTDI RXI connected as well as GND. Attached is simple code that send GPIO 5 and 10 low and high, and if GPIO 4 is held high, they switch faster. If GPIO is held high, the GE865 is shut down.

import GPIO
import MOD
import MDM
import SER2

SER2.set_speed('115200')
SER2.send('\r\n')
SER2.send('test\r\n')
SER2.sendbyte(0x0d)
SER2.receive(10)
GPIO.setIOdir(4,0,0)
GPIO.setIOdir(5,1,0)
GPIO.setIOdir(10,1,1)

b = 0
res=0

while(1):

  s=GPIO.setIOvalue(10,0) #GPIO 10 OFF
  t=GPIO.setIOvalue(5,1)  #GPIOI 5 ON
  MOD.sleep(20)
  SER2.send(' switch LED states ')
  s=GPIO.setIOvalue(10,1) #GPIO 10 ON
  t=GPIO.setIOvalue(5,0)  #GPIOI 5 OFF
  MOD.sleep(20)
  b = GPIO.getIOvalue(4)

  while b == 1:
    SER2.send(' Blink Faster! ')
    s=GPIO.setIOvalue(10,1) #GPIO 10 ON
    t=GPIO.setIOvalue(5,0)  #GPIOI 5 OFF
    MOD.sleep(2)
    s=GPIO.setIOvalue(10,0) #GPIO 10 OFF
    t=GPIO.setIOvalue(5,1)  #GPIOI 5 ON
    MOD.sleep(2)
    b = GPIO.getIOvalue(4)
      
  ioval_3 = GPIO.getIOvalue(3) # Use status of GPIO3 to end program and shut down

  if (ioval_3 == 1):
      a = SER2.send('Done\r\n')
      a = MDM.send('AT#SHDN\r',0)                       #Turn off GE865

The teraterm session imonitoring SER2 returns the following:

‘import exceptions’ failed; traceback:

ImportError: No module named exceptions

Warning! Falling back to string-based exceptions

Python 1.5.2+ (#0, Jan 24 2008, 14:55:00)

 on

                                                                   Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam

                    import GPIO # builtin

                                         import MOD # builtin

                                                             import SER2 # builtin



test

 switch LED states  switch LED states  Blink Faster!  Blink Faster!  Blink Faster!  Blink Faster!  Blink Faster!  Blink Faster!  Blink Faster!  switch LED states Done



Good luck.