Hi,
as described in LF365 (I2C vs Linux) I just built up a sensor interface on a SUSE 8.2 laptop and a Debian Testing Desktop.
Everything is working fine, there is only one problem: speed.
Considering the theoretical capabilities of the sensors, a clock speed of 100kHz, around 40kbps data, the actual values of 8bps data on the lap and 40bps data on the Desktop aren't quite stunning...
I tried increasing baud rate with setserial, stty and mgetty; also, I tried modifying the divisor, but none would help. Using mgetty or stty, /proc/tty/driver/serial would cat 115200 baud vs. original 9600, but still no change.
Has anyone got an idea on how to increase the speed of direct access via ioctl? I did not write the code, and I trust LF to be professional enough, but in order to be complete, here is the raise of clock as an example:
int arg=TIOCM_RTS;
ioctl(fd, TIOCMBIS, &arg);
Thank you in advance for any suggestions.
David,
running lynx, so don't blame me for any formatting errors
Ed: Kernels are 2.4.20 (SUSE) and 2.6.12-1 (Debian).
Ed: Just tried to modify the baud rate inside the program with information from the manpages... can anyone tell me if this code is correct? (Re-Ed: Effect even shows in /proc - but not in RL
)
struct termios attr;
tcgetattr(fd,&attr);
tcsetospeed(&attr,B115200);
tcsetattr(fd,TCSANOW,&attr);
Where fd is my open terminal.