Some automated train systems already do this for control such as some of the Vancouver SkyTrain lines.
From the SelTrac wikipedia page:
"in newer versions of SelTrac, the control signal is transmitted inside the running rails at radio frequency using IEEE 802.11 (WiFi) access points. "