This paper describes an algorithm implementing a machine-to-machine communication for sending and receiving information between an On-Board Unit (OBU) in a massive public transportation vehicle and an information system managed by the transportation company that operates the vehicles. The communications interface of this system was implemented by using WebSockets and JSON messages. The prototype was tested and found to be functional, complying the normativity of the Public Transportation of Medellin.