Python termios error using /dev/ttyFIM0

Hi All,
I have a very simple test program to set the serial attributes for /dev/ttyFIM0. I am getting a termio.error: (22, ‘Invalid argument’) error message when I try to set a new speed attribute. Plus a print of the get attribute list doesn’t look right either. Here is my program:
import os
import termios

serfd = os.open( ‘/dev/ttyFIM0’, os.O_RDWR | os.O_NOCTTY)
print ‘termios =’, termios.tcgetattr( serfd)
old = termios.tcgetattr(serfd)
old[4] = 38400 # ispeed
old[5] = 38400 # ospeed
termios.tcsetattr(serfd, termios.TCSANOW, old)
os.close(serfd)

The print show 13 and 13 for the baud rate which is bogus.
try/except left out for clarity
My platform is ConnectME 9210 and I am using Linux 5.7 tools.

Any help is appreciated.
Mark

I do NOT know how to answer you, but I asked an engineer and this with what HE SAID (NOT ‘ME’ SAID! I’m just messenger)

== Engineers response:

The first thing I would check is if /dev/ttyFIM0 exists, I am almost sure he gets this error because the port driver didn’t load or something like that. He can also try to write a C program or even try it from the shell using script like this:
#!/bin/sh

connect.sh

Usage:

$ connect.sh

Example: connect.sh /dev/ttyS0 9600

Set up device

stty -F $1 $2

Let cat read the device $1 in the background

cat $1 &

Capture PID of background process so it is possible to terminate it when done

bgPid=$?

Read commands from user, send them to device $1

while read cmd
do
echo “$cmd”
done > $1

Terminate background read process

kill $bgPid
taken from here: http://unix.stackexchange.com/questions/22545/how-to-connect-to-a-serial-port-as-simple-as-using-ssh

He should also compare his results with the same actions using non-FIM serial port.