BCD536HP Recordings

Status
Not open for further replies.

Roveer

Member
Joined
Apr 29, 2011
Messages
189
Is there any way to gain access to the recordings on a BCD536HP while it is in use?

I have a 536HP that is in FTO most of the time. I want to create a program to send any recording of a EMS call to my cell phone (email) with the wav file attached.

One method would be to connect the audio to a RPi and create a program to record and listen for the presence of audio then send that to an email address.

Seemingly simpler (since the 536 can record) would be to look for the instance of a file (meaning there was a call) and send that file to an email address.

Any possibility of gaining access to the recordings while the scanner is running?

Roveer
 

AggieCon

Member
Premium Subscriber
Joined
Nov 25, 2015
Messages
1,448
Location
Texas
The 536 doesn't do per call recording files as far as I am aware.
 

Roveer

Member
Joined
Apr 29, 2011
Messages
189
I think I realized that right after I made the post and started noodling around with the mkII software.
 

jonwienke

More Info Coming Soon!
Premium Subscriber
Joined
Jul 18, 2014
Messages
13,460
Location
VA
The 536 doesn't do per call recording files as far as I am aware.
Every transmission is recorded to a separate audio file.

You can either scan or access the memory card, but not at the same time.

You could use the wifi streaming to feed an app on your phone though.
 

Roveer

Member
Joined
Apr 29, 2011
Messages
189
Every transmission is recorded to a separate audio file.

You can either scan or access the memory card, but not at the same time.

You could use the wifi streaming to feed an app on your phone though.
Thanks for the clarification. Streaming is not an option as it would consume way too much battery on an Android phone. I see 2 choices to get what I want.

1. Gain access to the audio files and have them emailed to the phone (but that does not seem possible)
2. Set up a device to record calls and have them emailed to the phone

I was initially thinking option 2, but option 1 would would cut down on the complexity of the code needed to do this. However it does not seem possible to access the recorded files while the scanner is running in FTO mode.
 

jonwienke

More Info Coming Soon!
Premium Subscriber
Joined
Jul 18, 2014
Messages
13,460
Location
VA
It would be possible to write a server-side program that captures the stream from the 536 and only sends messages to the phone app when calls matching given criteria are received. I don't know if that is available off the shelf or not. I'd inquire in the ProScan thread if it could be used in that way somehow.
 

Roveer

Member
Joined
Apr 29, 2011
Messages
189
I'm looking at ProScan. It seems like it will attach to the scanner via IP and will record my FTO's and put them in a directory. I can then write a very simple batch file to look in that directory for the existance of a file then execute a script that will email that file and then delete it.

If this works, then I can probably do this very simply.

I've also emailed the ProScan people asking if email capabilities are in their software. ProScan has a ton of features. I don't think it has that capability, but I mentioned that it might make a good addition to their software for those who use FTO and don't want to stream.

Roveer
 

jhampton2000

Member
Joined
Dec 19, 2005
Messages
892
I'm definitely not a script expert, but I've able to throw together a set of Windows batch files for a text-based application that sounds a little bit similar to what you're aiming to do here.

A few thoughts:
- ARC536PRO will allow you to connect to the 536 and record while scanning, plus you can specify the destination of the record folder etc

- You'd need to check to see if the folder created by the recording software varied day by day, with the folder named with a time/date stamp.....your windows bat file/script would likely need to search for all wildcard .wav files created in a specified folder

- The application I use is a freeware command line tool called cmail (google cmail.exe). One advantage over things like blat is that it easily handles TLS/SSL which most email servers require now for authentication. I use it to email alerts as text in the body of an email, but I think it does attachments too.
 

Roveer

Member
Joined
Apr 29, 2011
Messages
189
Excellent!!! Thank you for sharing your findings.

I just looked at Arc536 and I think I'm liking ProScan a little more. Both will record and allow me to place into a directory. ProScan will allow me to customize the directory structure and remove the day/date and just drop all the files into a single directory and has a very nice graphic representation of the 536HP.

At 50 bucks for 2 licenses this will give me one for recording and one to remote my scanner to the kitchen. I'm not sure what arc536 licensing allows, but I believe it was more expensive.

Now for the good stuff...

I'm going to grab cmail and start crafting my batch files. This might be working tonight! Whoowaaa. stackexchange.com is my friend when it comes to crafting batch files.

I'll report back.

--- update ---

2/3 rds done in 15 minutes!. Completed the cmail command line to send file attachment successfully to my email. Now I just have to add the rest of the batch file to detect the presence of a file then execute the cmail command and then delete the file.

I love a good project!

Roveer
 
Last edited:

jhampton2000

Member
Joined
Dec 19, 2005
Messages
892
Good job.....if it helps my particular bat file detects the presence of a file in the following manner:

@echo off
:loop
IF EXIST "filename.wav" (TYPE Text.txt | C:\CMail.exe -host:email: pw @ domain.com -secureport -to:user@domain.com -from:user@domain.com "-subject:alert" --
DEL filename.wav)
goto loop
EXIT
REM @echo off
@echo
:loop
EXIT
 
Last edited:

Roveer

Member
Joined
Apr 29, 2011
Messages
189
Didn't get a chance to play with batch files tonight. Had a refrigerator I had to get out of the kitchen. I'm having a little trouble with the ProScan software reliably recording the fire calls. I'm going to keep at it and hopefully I can get it to work. I took a quick look at the ARC536 and it did not appear to connect to the scanner via TCP/IP, only USB. That brought me back to ProSoft.

Once I have it recording reliably (hopefully), then I'll get those batch files humming.

Of course a lot of this is waiting for their to be an actual fire call.

Roveer
 

Roveer

Member
Joined
Apr 29, 2011
Messages
189
Good job.....if it helps my particular bat file detects the presence of a file in the following manner:

@echo off
:loop
IF EXIST "filename.wav" (TYPE Text.txt | C:\CMail.exe -host:email: pw @ domain.com -secureport -to:user@domain.com -from:user@domain.com "-subject:alert" --
DEL filename.wav)
goto loop
EXIT
REM @echo off
@echo
:loop
EXIT
I wrote my batch file while watching the snow come down on Tuesday. This is a temporary solution as I have to use VOX as a recording solution in ProScan because of a squelch problem with FTO recording. The ProScan author is looking into that problem. When using VOX the recordings are placed in directories based on date which was a challenge. I was able to find code that would look for all of the MP3 recordings in a directory structure and copy them to a single location then delete them. That brought about the next problem which was the fact that when copying the files it could try and copy a file that was being written by the recording software and as a result was giving inconsistent results. A bunch of errorlevel code allowed me to wait until the file was no longer in use by the software and as a result a complete file. I finished up with the cmail statement and now it's pretty much working exactly how I want it. The code is very ugly because I made lots of changes and now that I've gotten it to work I have to clean up the logic and other areas where I just don't know the best programmatic approach, but it does work.

So the result is, I receive an email on my phone entitled FIRE/EMS Alert which contains an attachment of the fire call. Exactly what I wanted.

After I get it all cleaned up, I'll post my code.


Roveer
 

Roveer

Member
Joined
Apr 29, 2011
Messages
189
Here is the current version of the batch file I have running today. So far it's been working perfectly. This is not for the faint at heart. You have to know a lot of the mechanic's in order to get this to work, especially batch files, email smtp, gmail etc, but once it's set up, it's working great.

What does it do:

Simply Put, it email's an audio file (MP3) of your Fire/EMS calls to an email address (your phone) so you always know what's going on in your town without having to carry a scanner, or being out of range.

Assumptions:

1. Make sure you are using ProScan 12.1 or above. Bob fixed a major issue with ProScan which was creating lots of ghost files with FTO recording. You have FTO set up and working on your scanner. (or not, if you leave the scanner on an open dispatch channel, it'll send everything ProScan records). If using FTO, select "each FTO in a new row" option

2. You have to have ProScan set up and connected to your scanner. I have a 536HP so I'm connected via wifi which makes it so easy.

3. If you use gmail as the sending service you have gone into gmail and set the email security to allow
3rd party sending (you have to research how to do this, I did it a long time ago for another project and
can't remember how, it was selecting security low or something similar), or having a an email service
that allows 3rd party sending

4. ProScan installed and set up correctly saving MP3 files at the location specified in the batch file (dSource)

5. cmail.exe located in the correct place (c:\recordings) and set to read only. If you don't set r/o flag it will get accidentally erased when the batch file has a empty value for a file name (which does happen)

If there is any interest from anybody in actually using this, I would be willing to write a little guide to make it easier to implement. I'm assuming nobody will actually run it, I'm always inventing things that only I use, but if you struggle with this, I'll write something up to make it easier to use.

6. you'll need to modify ProScan save audio file location and the batch file for the dSource and dTarget variables to locations that you chose. Mine are not optimal and eventually I'll clean them up, but I was heavy into debugging.

I've attached the batch file to make it a little easier. I have ProScan and the batch file running on my kitchen pc (built into the wall) which is always on. This is a great feature because it brings the scanner (which is upstairs) to my kitchen by virtue of running ProScan on that computer, but also gives me a platform to run the batch file 24/7. ProScan appears in the system tray and the batch file runs minimized.

Basically the batch file scans the dSource directory every minute looking for MP3 files (that ProScan would drop there when it records a fire/ems call). There is logic to delay processing if it detects that the file is still being written by ProScan (otherwise I was getting multiple emails with parts of the same call). It then moves the MP3 to another directory dTarget and then deletes it from it's original location. It then emails the file to a particular recipient configured in the cmail command line (google cmail.exe for complete syntax) then deletes the MP3. It waits a minute then continues looking for MP3 files to send. I'm no code guru so I'm sure you could tear my logic apart from a coding perspective, but it works...

Forum won't let me upload cmail.exe so here's the link: https://www.inveigle.net/CMail_0.7.9b.zip

@echo off
cls
c:
cd \recordings
:start
set dSource=C:\Users\pc\Documents\Recordings\
set dTarget=c:\recordings
set fType=*.mp3
for /f "delims=" %%f in ('dir /a-d /b /s "%dSource%\%fType%" 2^>nul') do (
2>nul (
>>"%%f" echo off
) && (copy /V "%%f" "%dTarget%\") || (goto delay)
del "%%f" > nul
)
IF EXIST *.mp3 (
dir *.mp3 /b > tmp
set /p VAR=<tmp
del tmp
cmail -host:your_gmail_account_here.com:your_gmail_password_here@smtp.gmail.com[/email]:587 -starttls -to:recipient_email_user_here.com -from:FIRE/EMS@home.com "-subject:FIRE/EMS Alert" "-body:See attached" "-a:%VAR%"
echo Sent:%VAR%
del /Q "%VAR%"
goto start
) ELSE (
echo No Work at %time% - Waiting
ping 1.1.1.1 -n 1 -w 60000 > nul
goto start
)
:delay
echo ProScan is Still Writing File - Delay
ping 1.1.1.1 -n 1 -w 10000 > nul
goto start

Let me know if you have any questions.

Roveer
 

Attachments

Last edited:
Status
Not open for further replies.
Top