How did bells become a part of Buddhist ritual? Bells seem to be pervasive throughout Buddhist ritual. I get the impression that many monasteries ring a large bell in the morning, and other monasteries still ring regular bells throughout the day to encourage mindfulness. Most meditation apps on smartphones have a bell-ringing sound.
Where did this come from? What other usage do bells have in Buddhist ritual? Are there references to bells in canonical texts?

Answers from all sects appreciated.
A "bell" is mentioned in the Visuddhimagga.

In this translation it says,


  
  And, though sometimes not separate, applied thought is the first impact of
  the mind in the sense that it is both gross and inceptive, like the striking of a bell.
  Sustained thought is the act of keeping the mind anchored, in the sense that it is
  subtle with the individual essence of continued pressure, like the ringing of the
  bell. Applied thought intervenes, being the interference of consciousness at the
  time of first arousing [thought], like a bird’s spreading out its wings when
  about to soar into the air, and like a bee’s diving towards a lotus when it is
  minded to follow up the scent of it. The behaviour of sustained thought is quiet,
  being the near non-interference of consciousness, like the bird’s planing with
  outspread wings after soaring into the air, and like the bee’s buzzing above the
  lotus after it has dived towards it
  


A 'bell' is even mentioned in the Dhammapada,


  134. If, like a broken gong, you silence yourself, you have approached Nibbana, for vindictiveness is no longer in you.