"port_read_number" and "port_read_string" were really only meant for,
and only tested with, a lite-c application at BOTH ends.
The reason that I tend to use port-read_bytes all the time is because, at its lowest level,
that is what the port is 'physically' doing. So I keep thinking that way to avoid confusion.
In your arduino code, Im going to assume that speedCount is an arduino-int.(appears the same as a liteC-short)
Due to you saying so, and the fact you get two bytes back with your above code.
So try these code-combinations. If you dont mind...
//arduino
Serial.write(1000+speedCount);
//lite-c
short tmp_number = 0;
port_read_bytes(portSerial, &tmp_number, 2);
tmp = tmp_number;
and let me know how it goes...
And try this one too...
//arduino
Serial.write(1000L + speedCount);
//lite-c
long tmp_number = 0;
port_read_number(portSerial, &tmp_number);
tmp = tmp_number;
//if this fails, leave lite-c as is, but change the arduino code to
long tmp_num = 1000 + speedCount;
Serial.write(tmp_num);
Im curious on this one too...