Max Serial Cable Length?
Capacitance in the cable begins to affect serial communications, typically many manufacturers/devices set a limit of approximatly 15m or 50ft on cable lengths for anything up to 9600 baud, and about 4m for 38.4k.  That being said, with decent cable it is easily possible to go longer in tested or non-commercial use, but I would stick to the guidelines for a commercial product, if only to leave an out for support calls.

If you really need length, RS232 to RS422/485 converters are very inexpensive, and you can run the differential modes (422/485) over two wires for well over 100m.

In your case, 5m really shouldn't be a problem at 38.4, as long as your cable is of reasonably quality.  Almost any shielded multi-conductor cable should work at that distance, and probably three times it.