An embedded system for wireless data communications on trains