Distinctive telephone Ring
Donwalkworth
Posts: 1
I have very limited experience with the BS2 and have not been able to figure this out. I would like the BS2 to tell the difference between a regular telephone ring and a distinctive ring (two short rings). If it is a regular ring the BS2 ignores it but if it is a distinctive ring it "answers" waits for a DTMF "password" and if correct produces a #6 DTMF into the phone line. Any help would be coding and additional info would be greatly appreciated
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
For decoding tones I use a SSI202P chip, for encoding or dialing out I use the Stamp's DTMFOUT.
If you can put two short rings on the line, then it would easy to determine two short from a standard ring sequence by testing. The code below will answer the phone before first ring has terminated.
I use to buy the DAA devices directly from XECOM in 1 to 5 units at a time, but that has been awhile. I recall they were ~20$. If you want to try using the device you can check their WEB site for ordering.
Once you get something prototyped I'd be glad to help you along.
Donnie
· IF RI = 0 THEN······················ ' Active low indicates phone ringing
·· HIGH OH····························· ' Take phone off-hook - Pin on DAA - Data Access Arrangement
· IF DV = 1 THEN····················· ' DV is pin on 202P indicating a valid tone received when high
··GOSUB AAAA
.
.
············································ 'INB are the 4 pins connected to 202P tone decoder
············································ 'So I am decoding·0-9 + # and *.·The code for 1, 2 and # sign
············································ 'follows.
AAAA:
··· SELECT INB
···· CASE 1·········· ' Turn power to camera ON
····· cmd=0
····· GOSUB Play_Msg
····· AUXIO
····· XOUT Mpin, Zpin, [noparse][[/noparse]HouseA\Unit2\2, HouseA\UNITON]
····· MAINIO
····· SEROUT pTX, Baud, [noparse][[/noparse]"!NB0W26:ON", CLS]
····· SEROUT pTX, Baud, [noparse][[/noparse]"!NB0W00:", HEX 1, CLS]
···· CASE 2·········· ' Turn power to camera OFF
····· cmd=0
····· GOSUB Play_Msg
····· AUXIO
····· XOUT Mpin, Zpin, [noparse][[/noparse]HouseA\Unit2\2, HouseA\UNITOFF]
····· MAINIO
····· SEROUT pTX, Baud, [noparse][[/noparse]"!NB0W26:OFF", CLS]
····· SEROUT pTX, Baud, [noparse][[/noparse]"!NB0W00:", HEX 0, CLS]
.
.
.
···· CASE 12································· ' A #·which is·decoded as 12·terminates the conversation.
····· cmd=1
····· GOSUB Play_Msg
····· LOW OH································ ' Place phone on-hook - HANG-UP
A timer is started after each tone is received that allows ~30 seconds to key the next tone before the Stamp will terminate the call.