Archive for the ‘Allstar Link’ Category

Google TTS – Weather Scripts

Tuesday, August 11th, 2015

Google has limited repetitive use of their free online TTS converter.  Google TTS is a great asset but unfortunately they have set limits I can only assume due to usage.  This is an example of the web url message:

About this page

Our systems have detected unusual traffic from your computer network. This page checks to see if it’s really you sending the requests, and not a robot. Why did this happen?

This page appears when Google automatically detects requests coming from your computer network which appear to be in violation of the Terms of Service. The block will expire shortly after those requests stop. In the meantime, solving the above CAPTCHA will let you continue to use our services.

This traffic may have been sent by malicious software, a browser plug-in, or a script that sends automated requests. If you share your network connection, ask your administrator for help — a different computer using the same IP address may be responsible. Learn more

Sometimes you may be asked to solve the CAPTCHA if you are using advanced terms that robots are known to use, or sending requests very quickly.
IP address: 7x.xx.xxx.184

I am looking at other options for Text to Speech (TTS), but not very promising for audio quality.  I have been testing espeak, it’s better than festival but not by much.  Cepstral can be used but you have to pay for licensing.

73,

Chris

AllStar Micro Node with Baofeng BF-888s

Sunday, January 18th, 2015

This has been done before so lot’s of credit to kp4tr and w0fcm!  For my Micro Node, I am using a modified audio fob, a Baofeng BF-888s, power hub, and wireless FOB (optional).  I also added a push button for the power for the BeagleBone Black for powering down. This is located on the side of the BeagleBone Black case.  The case is an all metal case from Logic Supply.  The power converters are from E-bay and allows a high range of input voltages and reduces the voltages for the BBB (5v) and BF-888s supply (3.8V).  The modified Audio FOB is a Star Tech USB device which has a small board extension for the PTT control. Note that I had RFI issues with the stock antenna getting into the audio usb device. I use an external antenna without any RFI issues.

 

 

Links

Allstar Weather Scripts – BBB (Version 1.2.1)

Wednesday, January 14th, 2015

Allstar Weather Scripts Information for the BeagleBone Black

IMPORTANT NOTE –   Failing Text to Speech converstion due to Google Changes.

This includes specific information for the BeagleBone Black (BBB) weather script release found in the latest Allstar BBB release.

Weather Scripts Online Documentation and FAQ

Weather alerts now use NWS County code information and not Zone codes. Below reflects the latest version using NWS County codes for alert notification.

Allstar Weather Script General Information

The following BBB weather scripts provide weather reports, alerts, and forecasts to the Allstar user by downloading text from the National Weather Service (NWS) and converting them into speech which can be output can be played on the Allstar node. The following is a brief description of the files being installed and their function.

Script/File Name Description

wx_alert_product.txt
Used by “getWxAlert” to parse the alerts.
getWxFor [] Gets the weather forecast for the local area (can be changed). This also converts from text to audio file by calling text to audio script. This script is normally called by cron. Files are are downloaded to the following directory and creates the ul audio file based upon the text file:
 
     /tmp/wx/forecast//wx_forecast.txt
     /tmp/wx/forecast//forecast.ul
getWxRpt_ug [<WX_UNDERGRND_STN>] Gets the current condition (based upon xml data) from Weather Underground Stations. The xml data is downloaded from the Weather Underground station and converted to local variables. The script then uses these values to create a weather report. Since this data is more verbose, it allows greater detail including pressure trends, precipitation data, as well as other information. This script is called by cron. Files are located at:
     /usr/local/bin/Weather/getWxRpt_ug/

 
clearWxAlerts Clears and removes playWxAlertBg lockfiles. This script should be used when debugging or during a force clear of wx alerts. The main function is to remove all lock files and alert messages. This will not prevent new alerts being generated.
playWxAlertBg [<COUNTY>] This program is not a user executed program. The program  is called by getWxAlert and placed in background when an alert is issued from the NWS. The script will play the alert message as follows: initial, 15m, 15m, 15m, 30m, 30m, then every 60m. If this message broadcast is not desired, then you can modify this feature by running the wx_config.sh script which is found at: /usr/local/bin/Weather/wx_config.sh
trend The trend script is called by crond every six hours to determine the pressure trends; steady, rising, falling. The cron entry is created when the wx_config.sh script is executed and weather reports are selected.
wxtext_conv.sed This is a general text conversion sed file.  This sed conversion file converts the weather text  files into a more pleasing sounding text to speech conversion. For example: “MPH” to “Miles per Hour”, etc.  Many times you will need to change a pronunciation, like “wind” to “wynd” to make the audio clearer or correct pronunciation. The Google TTS actually does a good job with most pronunciations. This file uses the “sed” format for conversion.
wx_scripts.conf Configuration file which is created by the wx_config.sh script.

Installation

Starting with the BeagleBone Black 1.2 Allstar release, the weather scripts are included in the distribution. Installation is simple, but you will need to gather some information prior to running the weather configuration scripts, wx_config.sh.

You will need the following:

  1. NWS County information for your location
  2. NWS Zone information for your location
  3. Weather Underground local station indentifer.

The following sections will help you determine these values.

NWS Zone Information (used for Wx Forecast)

where <st> is the 2 letter state abbreviation, for example:

Pick from the various cities/areas displayed.

Select the desired identifier; this will be used for the ZONE variable for example, Wright County, MN is MNZ059. Write down this Zone number for your area (default ZONE). If you want to be alerted on multiple areas, choose those areas.

NWS COUNTY Information (used for Wx Alerts)

  • Now, pick from the various State Counties displayed.
  • Select the desired identifier; this will be used for the COUNTY variable for example, Wright County,

MN is MNC171. Write down this COUNTY number for your area/county. If you want to be alerted on multiple areas, make a note of those counties.

Weather Underground Information (used for Wx Reports)

Browse the map for your local area. You will see the Station ID’s of various weather stations. Once you select one on the map, you will find the station ID. This will be begin K, then two letter state abbreviation, and location. for example:

Underground Weather Station Example

Underground Weather Station Example

 

The station selected is KMNSTMIC3. When selecting the desired station and review the captured information to make sure that this has all of the values you want to capture. For example, some stations do not include precipitation. I prefer the “rapid fire” stations since they update most frequently. You will use the “Station ID” for the configuration file.

Once you have the NWS Zone, NWS County and Weather Underground Station ID values from above, you are now ready to execute the wx_config.sh script.

Running the Configuration Script

Type the following commands:

    cd /usr/local/bin/Weather

    ./wx_config.sh

You will see the following output:

    Weather configuration script...

============================================================================
|                            IMPORTANT NOTICE!                               |
|                                                                            |
| No matter what the Weather Alerts are  indicating, the information         |
| gathered and presented here may NOT be accurate. You MUST use your own     |
| judgement to determine your best course of action in any given             |
| circumstance! The are many reasons WHY the data here may not be accurate,  |
| including, but not limited to, software problems, network problems, and or |
| hardware problems. The Weather Alerts and other Weather information should |
| NOT be used to make any determination of actual current conditions, it is  |
| merely an indication of what the software is seeing as a result of it's    |
| attempts to read publicly available data sources.  These data sources may  |
| be unavailable, unreachable, or inaccurate. Please check other sources to  |
| verify any information presented here.                                     |
 ============================================================================

Do you understand and acknowledge the above notice?  [y,n,q]?

You will need to enter “y” to acknowledge the notice. The next section you will be prompted if you want to various areas. Select “y” or “n” for the next selections. Below I am selecting all of the configurable options:
Do you understand and acknowledge the above notice?  [y,n,q]? y

Do you wish to setup/update the weather alerts:  [y,n,q]? y

Do you wish to setup/update the weather reports:  [y,n,q]? y

Do you wish to setup/update the weather forecasts:  [y,n,q]? y

Based upon your select, the script will provide a brief note on the next entries. If you are reading this here, you already should have all of the necessary codes. Below is an example of each area:
----------------------------------------
Weather alert setup...
----------------------------------------

Weather Alert Setup.  This script will allow you to get short alert messages 
via your node audio.  

You will need to have the NWS County number information to setup the Weather 
Alerts.  Refer to the following URL:

    http://www.weather.gov/alerts

Select the "Warnings By State" under "Active Alerts". Select the County List 
listed by the desired state.  You will see the "County Code", now pick from the 
various State Counties displayed and write this "County Code" down for reference.

For example, under Minnesota you will find - Wright. The County Code for
this county is  MNC171. If you want to be alerted on multiple areas, make a 
note of those counties and you can re-execute the script and enter the 
additional counties.

Please enter the National Weather Service County for your area
  (for example, MNC171): mnc171

Entry your county name: Wright County

     Checking/Adding crontab entry for user root...

    Adding crontab entry...
    Entry Added...

----------------------------------------
weather report setup...
----------------------------------------

Underground Weather Report Setup.  This script will allow you to get current 
weather conditions based upon Weather Underground stations by a dtmf sequence 
and will announce the weather conditions via your node audio.  

You will need to have the Underground Weather station ID information prior
to running this script. Refer to the URL below:
    http://www.wunderground.com/wundermap/

Browse the map for your local area. You will see the Station ID's of various 
weather stations. Once you select one on the map, you will find the station ID. 
This will be begin K, then two letter state abbreviation, and location. For
example:

      KMNSTMIC3

When selecting the desired station and review the captured information to make 
sure that this has all of the values you want to capture. For example, some 
stations do not include precipitation. I prefer the “rapid fire” stations 
since they update most frequently. You will use the “Station ID” for the 
configuration file.

For more information, refer to:
    http://www.w0anm.com/dokuwiki/doku.php?id=irlp:wx_scripts_doc

Please enter the Underground Weather Station ID
  (for example, KMNROGER1): kmnstmic16

     Checking/Adding crontab entry for user root...

    Adding crontab entry...
    Entry Added...

----------------------------------------
weather forecast setup...
----------------------------------------

Weather Forecast Setup.  This script will allow you to get your NWS weather 
forecast messages by a DTMF sequence and will announce the weather conditions 
via your node audio.

You will need to have the NWS Weather Zone ID information prior to running this script.

Refer to the following URL:

    http://www.weather.gov/alerts

Select the "Warnings By State" under "Active Alerts". Select the "Zone List" 
listed by the desired state.  You will see the "Zone Code", now pick from the 
various State Counties displayed and write this Zone Code down for reference.

For example, Under Minnesota you will find - Wright. The Zone Code for
this county is  MNZ059. If you want to to have forecast for other areas,
make a note of those counties and you can re-execute the script and enter the 
additional counties.

Press any key to continue...

Please enter the NWS Zone forecast ID 
  (for example, MNZ059): mnz059

     Checking/Adding crontab entry for user root...

    Adding crontab entry...
    Entry Added...

Enter Allstar Node Number:29062

Do you want to enable over the air weather alerts?  [y,n,q]? y
y
----------------------------------------
Stanza Modification Example for:
 /etc/asterisk/rpt.conf
----------------------------------------
    You will need to edit the /etc/asterisk/rpt.conf file to include the localplay
    entries under your node's functions stanza.

    Below is an example. Please update dtmf sequence to your requirements.

    (/etc/asterisk/rpt.conf)

        [functions]

    ; Play local wx report, *986 
    986=localplay,/tmp/wx/wxreport_ug/KMNSTMIC16/cur_WxRpt_ug
    ; Play local wx alert, *987
    987=localplay,/tmp/wx/alert/MNC171/alert_short
    ; Play local wx forecast, *988
    988=localplay,/tmp/wx/forecast/MNZ059/wx_forecast

-----------------NOTE-------------------

You can run this script multiple times to add additional weather stations
to your crontab or features.

----------------------------------------
Setup/Update Completed
----------------------------------------

This script can be executed over and over to add additional alert areas, weather forecast areas, or underground weather stations. When the scripted is executed, additional entries will be added to root’s cron entry. However, you will still need to modify the rpt.conf function stanza for the additional dtmf sequences to play the added stations/areas.

Modifying rpt.conf File

In order to play reports, forecasts and alerts, you will need to edit the rpt.conf file and setup the DTMF sequencies. The area to modify is the nodes “function” stanza. Below is an example of selecting:

  • *986 – play underground weather rebport
  • *987 – play NWS weather alert summary
  • *988 – play weather forecast

Edit /etc/asterisk/rpt.conf file and under the “functions” stanza add the localplay commands. The commands can be changed to reflect your nodes dtmf scheme.

        [functions]

    ; Play local wx report, *986 
    986=localplay,/tmp/wx/wxreport_ug/KMNSTMIC16/cur_WxRpt_ug
    ; Play local wx alert, *987
    987=localplay,/tmp/wx/alert/MNC171/alert_short
    ; Play local wx forecast, *988
    988=localplay,/tmp/wx/forecast/MNZ059/wx_forecast

After editing the /etc/asterisk/rpt.conf file, you must restart rpt module to allow the changes to take affect.  This is done by entering the following command:

asterisk -rx “rpt reload”

Testing Weather Alerts

Follow the steps below:

  1. list cron entries:

          crontab -l
    

    Which shows:
    # NWS Alert for MNC171 in Wright County
    */14 * * * * (/usr/local/bin/Weather/getWxAlert MNC171 "Wright County" &amp;&gt; /dev/null 2&gt;&amp;1)

    # Underground Weather for station: KMNROGER1
    */16 * * * * (/usr/local/bin/Weather/getWxRpt_ug KMNROGER1 &> /dev/null 2>&1)

    # Underground Weather (pressure trends) for station: KMNROGER1
    0 */6 * * * (/usr/local/bin/Weather/trend KMNROGER1 &> /dev/null 2>&1)

    # National Wx Service Forecast based on Zone: MNZ059
    */16 * * * * (/usr/local/bin/Weather/getWxFor MNZ059 &> /dev/null 2&>1)

  2. Execute the getWxAlert entry:

    /usr/local/bin/Weather/getWxAlert MNC171  "Wright County"

  3. Verify the following files that were created in /tmp/wx by entering:

    ls /tmp/wx/alert/

For an example, the county id that I have setup is MNC171. Here is the output for the command above:

ls -la /tmp/wx/alert/MNC171                           
total 64                                                                       
drwxr-xr-x 2 root root   160 Oct 19 12:47 .                                    
drwxr-xr-x 3 root root    60 Oct 19 12:42 ..                                   
-rw-r--r-- 1 root root  1775 Oct 19 12:47 alert.info                           
-rw-r--r-- 1 root root   172 Oct 19 12:42 alert_prev_summary.txt               
-rw-r--r-- 1 root root 41208 Oct 19 12:42 alert_short.ul                       
-rw-r--r-- 1 root root   172 Oct 19 12:47 alert_summary.txt                    
-rw-r--r-- 1 root root    74 Oct 19 12:42 no_alerts.txt                        
-rw-r--r-- 1 root root    56 Oct 19 12:47 wx_new.txt

You will notice that there is an audio file created alert_short.ul

  • Verify that the DTMF sequence works. In the above examples, I have “*987” defined to play the alert message. Enter your dtmf squence with by a remote radio, or by using the asterisk command line as follows:

    asterisk -rx "rpt fun [node_number] [dtmf_seq] "
    
        asterisk -rx "rpt fun 29062 *987"

You can also use the lsnodes web interface to inter the sequence. You should hear the output of the audio file.

Weather Alert Troubleshooting

  • Check to make sure that the county id is valid and was entered correctly.
  • If dtmf sequence fails to output, make sure that there is an audio file in /tmp/wx/alert/<county_id>/alert_short.ul and it’s a “non-zero” length file meaning that the file size is greater than 0, and typically it’s 41K in size.
  • In the rare event that the locking files are in a “dead lock” condition, you can clear the weather alerts by using the “/usr/local/bin/Weather/clearWxAlert” script as follows:

    /usr/local/bin/Weather/clearWxAlerts                  
      Stopping Weather Alert Messages...     Done.                              
      Removing lock files from /tmp...     Done.                                
      Cleaning up the alert weather directories...     Done.                    
      Removing temporary files in /tmp/wx..     Done.

Testing Weather Forecast

Verify that the crontab entry for the weather forecast is present. Type:

crontab -l

Look for the entry:

# National Wx Service Forecast based on Zone: MNZ059
*/16 * * * * (/usr/local/bin/Weather/getWxFor MNZ059 &amp;&gt; /dev/null 2&gt;&amp;1)

If the entry is not present, you will need to execute the /usr/local/bin/Weather/wx_config.sh script and select “y” to the prompt “Do you wish to setup/update the weather forecasts”. For weather forecasts, first get the data manually using the following commands:

/usr/local/bin/Weather/getWxFor ;

For example:
/usr/local/bin/Weather/getWxFor MNZ059

There will be a delay before the prompt is returned. The getWxFor script is pulling data from the NWS website and parsing the data. Once the data is parsed, the data files and audios files are created in /tmp/wx/forecast/;. For example:
/tmp/wx/forecast/MNZ059
wx_forecast.txt  wx_forecast.ul

The wx_forecast.txt file is the text file for the weather forecast and the wx_forecast.ul is the audio file.

Weather Weather Underground Reports

Verify that the crontab entry for the weather forecast is present. Type:

crontab -l

Look for the entry:

# Underground Weather for station: KMNSTMIC3
*/16 * * * * (/usr/local/bin/Weather/getWxRpt_ug KMNSTMIC3 &amp;&gt; /dev/null 2&gt;&amp;1)

# Underground Weather (pressure trends) for station: KMNSTMIC3
0 */6 * * * (/usr/local/bin/Weather/trend KMNSTMIC3 &> /dev/null 2>&1)

If the entry is not present, you will need to execute the /usr/local/bin/Weather/wx_config.sh script and select “y” to the prompt “Do you wish to setup/update the weather reports: [y,n,q]?”. For weather reports, first get the data manually using the following commands:

/usr/local/bin/Weather/getWxRpt_ug 
/usr/local/bin/Weather/trend

For example:
/usr/local/bin/Weather/getWxRpt_ug KMNSTMIC3
/usr/local/bin/Weather/trend KMNSTMIC3

There will be a delay before the prompt is returned. The getWxPrtp_ug script is pulling data from the Weather Underground Station and parsing the data. Once the data is parsed, the data files and audios files are created in /tmp/wx/wxreport_ug/<WX_Underground_STNID>. For example:
/tmp/wx/wxreport_ug KMNSTMIC3

The directory will contain several files:
cur_WxRpt_ug.txt  cur_WxRpt_ug.ul  KMNSTMIC3.xml  saved_pressure.var  var.src

The cur_WxRpt_ug.txt file is the text file for the weather forecast and the cur_WxRpt_ug.ul is the audio file. There are also pressure trend files that are saved in this directory. This monitors the pressure trends in a six hour period if the data is available.

Using the Scripts

Once the scripts are setup in cron to gather the information and the rpt.conf file has been modified, there is not much to using the scripts. The cron entries will automatically gather the weather information. I would suggestion to stagger the gathering times if you are gathering a lot of weather information. This can be accomplished by editing the corntab by using the command:

crontab -e

The format of the crontab file is as follows:
 The time and date fields are:

              field          allowed values
              -----          --------------
              minute         0-59
              hour           0-23
              day of month   1-31
              month          1-12 (or names, see below)
              day of week    0-7 (0 or 7 is Sunday, or use names)

The first field, minute, can follow a range with “/<number>” specifies skips of the number’s value through the range. For example, “0/20” can be used to specify command execution every 20 minutes, or you can select a step range. For example:
0, 18, 34, 46 * * * * (/usr/local/bin/Weather/getWxRpt_ug KMNSTMIC3 &amp;&gt; /dev/null 2&gt;&amp;1)

This will execute the script on top of the hour, 18 minutes past the hour, 34 minutes past the hour, and then 46 past the hour.

WxScripts FAQ’s

I rebooted my system and now the weather information is missing?

This is normal, all data is stored in /tmp directory which is cleared when the BBB is rebooted. You can ether run the getWx scripts manually or just let the cron daemon run the scripts which will re-populate the weather files. Prior to creating the new files, any weather dtmf sequence will not play any weather information. If there was a weather alert occurring at the time of the reboot, it will resend the alert message after cron daemon has re-excuted the getWxAlert script.

Recommendations

Another thing that will be changing on the next release is a  result too many cron entries pulling down data and using the BBB processing power.  I have addressed this issue with the next release  of the weather scripts, but for the release you are using, I would recommend that you add “nice -19” in front of the entries to avoid issues:


# NWS Alert for MNC171 in Wright County
*/14 * * * * ( nice -19 /usr/local/bin/Weather/getWxAlert MNC171 "Wright County" &amp;&gt; /dev/null 2&gt;&amp;1)

# National Wx Service Forecast based on Zone: MNZ059
*/28 * * * * (nice -19 /usr/local/bin/Weather/getWxFor MNZ059 &> /dev/null 2>&1)

# Underground Weather for station: KMNSAINT16
*/16 * * * * (nice -19 /usr/local/bin/getWxRpt_ug KMNSTMIC3 &> /dev/null 2>&1)

# Underground Weather (pressure trends) for station: KMNSTMIC3
0 */6 * * * (/usr/local/bin/Weather/trend KMNSTMIC3 &> /dev/null 2>&1)

 

Allstar Nano Node Construction

Thursday, December 18th, 2014

I have a preliminary schematic of the Allstar Nano Node.  This is still under construction and I will be adding additional construction pictures as I progress through this project.

Nano Node - USB FOB/Transmitter Module Schematic

Nano Node – USB FOB/Transmitter Module
Schematic (updated 12/20/2014)

These modules do need additional filtering. I will be posting a link or provide additional information regarding the output filter.

Nano Node using Modified USB Audio FOB and an 818 UHF Module.

Nano Node using Modified USB Audio FOB and an 818 UHF Module.

The audio FOB shown above was modified based on the following article by Doug, WA3DSP:

http://www.crompton.com/hamradio/usb_fob_modification/

I mounted it above the board using cut resistor leads to raise the board above the proto-board.  This was similarly done with the transceiver module.  There are small copper pads that I made with my punch from a single sided circuit board to insulate the PTT and COS lines and make a convenient junction point.

The three pin edge connector is for programming the module.

Here is the final result:

allstar_node

Links

Doug, WA3DSP, has a 818 transceiver module page. His module  mounted in an Altoid  style tin and uses a 9 pin connector to interface with the URI – USB Radio interface.  He also has information on filtering. The following is a link to his page:

http://crompton.com/hamradio/818_transceiver_module/

URI USB Radio Interface Link:

http://www.dmkeng.com/Products.htm

Audio FOB Modification Links:

http://www.crompton.com/hamradio/usb_fob_modification/

http://www.repeater-builder.com/projects/fob/startech-fob.html

KP4TR – great idea for a simple enclosure:

http://kp4tr.org

Final Notes

I have been using the 818 transceiver modules for a while.  One thing I noticed is that the receiver in the modules  “crackles” with multi-path signals as if the receiver AGC is clipping.  It sounds like a bad mic or connection.  This occurs on all the modules that I have tested and does not matter what radio is transmitting to the module. I can’t explain this issue and I have also seen the same issue on my Baofeng UV-82 transceivers during receiving.  The “crackling” is very noticeable and bothersome and does not matter how the module is programmed or if filters are enabled or disabled.

DRA818/SA818 Module Programming Software

Thursday, December 4th, 2014

I have written a simple program to configure the DRA818/SA818 RF modules. It supports the 3.3V level FTDI USB to serial devices.  I believe that the SA818 modules can be programmed at the 5V TTL levels, but I have not tried this.

Below is a diagram of the minimum configuration to program or set the module for use. Note, +VCC is 3.3V for the DRA818 Modules.

818-moduleSoftware

This program is written in python2 and is configured to use a FTDI USB to Serial Adapter. It works but it has very little checking on the value/range syntax. I have tested these programs  on Linux systems running both Lubuntu and Mint as well as  on BeagleBone Black computer.

The program requires phython2 and pyserial module.  The module information on pyserial can be found at: http://pyserial.sourceforge.net/pyserial.html

Arch Linux

 The packages are python2, and python2-pyserial.  To install, use the following command:

  • pacman -Sy python2 python2-pyserial

Debian/Ubuntu

A package is available under the name “python-serial”.  Note that some distributions may package an older version of pySerial. Note that some distributions may package an older version of pySerial.

  • sudo apt-get install python2.7 python-serial

For the BeagleBone Black, I’ve included a simple install script that will
install any package dependencies.

There are no syntax checking for the value format  at this time. When prompted for values,
pay close attention to the format of the data.

Installation

To install the software, download either the zip or the tar zip’ed file  from the end of this article.  If you are using the BeagleBone Black, there will be an install.sh script. This will install the python package dependencies and copy the two programs, 818cli-prog and 818-prog, to /usr/local/sbin.

For others distributions, you will need to manually install the python package dependencies (as shown above), and copy the programs from the “src” directory to the desired location. I would recommend /usr/local/bin. You may run into permissions issues with the usb/serial device if you are running these programs  with standard user permissions. (more on this later).

Program Syntax

Value Syntax

Frequencies should be entered in MHz as XXX.YYYY using a  four digits suffix. For example, 446.05 should be entered as “446.0500

Likewise, CTCSS/DCS values should be entered with four digits, 0022 or 0754N. See
below for more details.

CTCSS Tones

The CTCSS tones should be entered using all for digits, for example CTCSS
tone 181.8, should be entered as 0020.

DCS Codes

The format needs to be full three digits plus an “N”. For example, DCS code 7

should be entered as : 007N

Inverted DCS Codes

The format for inverted codes is the same as DCS codes except instead of an “N”
you change it to “I”. For example, DCS code 7 inverted, would be entered as:
007I

Here is the program.  The install.sh script is meant to be used for the Beagle Bone Black.  It requires python2 and py-serial.  I have added a non-interactive version to allow command line programming without interaction.  This is included in version 12 below:

Latest changes include channel spacing and updated 818cli-prog help.

Allstar Nano Node Project

Saturday, November 29th, 2014

Allstar Nano Node Project

I am starting a new project for the Beagle Bone Black. This will use the DorJI DRA818U Transceiver module. This will be installed on a proto-cape board along with a modified audio FOB. The following sections will document this process. These will be my raw notes and I’ll clean them up depending upon the outcome of this project.

Thoughts

Dorji DRA818U Information

This module can be found on ebay and is very inexpensive.

Block Diagram of the DRA818U Module:

 Block Diagram of Module

Pin Functions:

Radio Characteristics:

Application Block:

Allstar Nano Node

I was able to get a prototype working on Allstar using the Arduino to program the module. I’ll be drafting up a diagram once I’ve worked out the issues and add some additional features.

I soldered resistor leads to the module. You can then bend the leads slightly to allow the module to be mounted on a standard proto-boards. Be careful the amount of heat that you use as you can damage them.

Next Version mounted on a BBB cape https://www.dropbox.com/s/n3d4uitmtk0l8mp/IMG_20141128_183736.jpg?dl=0

I am working on a program to setup the frequencies, volume and filtering from a usb/serial device. I have also discovered that these modules will save there frequency/setup information, so once it’s programmed, it will remember the settings when powered up. I originally thought that this was not the case with the DRA818u modules.

IMG_20141209_155808a

Above is the original proof of concept board. It uses a modified FOB, DC to DC power converter and the Dorji DRA818u module and is powered by the USB connection from a powered hub.

Additional Information

Here is some additional information regarding these modules DRA-818. There is a command called: AT+DMOCONNECT. Per the programming manual:

Handshake Command Description: It is used to check if the module works normally. DRA818U module will send back response information when it receives this command from the host. If the host doesn’t receive any response from module after three times of continuously sending this command, it will restart the module.

Format:

AT+DMOCONNECT <CR><LF>

Module response:

+DMOCONNECT: 0 <CR><LF>

One thing is that the document does not indicate is that the settings will be reset. This command is useful for checking the module, but after execution, the module will require to be re-programmed by resending the setup commands to the module. When I initially started playing with these modules,  I used the AT+DMOCONNECT command to initialize the module.  This caused the settings to be reset to which  I thought that the settings were not being saved.  Once the module is programmed, power can be removed and the settings will be remembered.

I have a simple Python program that sends down the programming commands and then you can enter additional commands. I am working on improving it as it’s very basic. Let me know if you are interested in this program. It does require a FDDI USB/Serial usb device. I am using this one:

https://www.sparkfun.com/products/9873

Here are other vendors out there, such as Adafruit (http://www.adafruit.com/product/954), that have similar items.

Other Available Modules and Voltage Ratings

There is another vendor for these types of modules, nicerf.com and their module is sa818. This module has the same programming commands but the voltage indicated seem to show that it can go up to 5.5V. the DRA818 has some conflicting information about the max voltage:

DRA818 Power Specs:

ABSOLUTE MAXIMUM RATINGS 
Symbol Parameter            Min.    Max. Units 
VCC Supply Voltage         -3.3     5      V   
VIN Input voltage          -0.3    VCC+0.3 V 
IIN Input current           -10     10     mA 
TST Storage temperature     -40     90     °C

ELECTRICAL SPECIFICATIONS 
Symbol Parameter (condition)   Min.   Typ.   Max. Units 
VCC Supply Voltage             3.3    4.0    4.5    V 
Freq Frequency range           400           470    <abbr title="Megahertz">MHz</abbr> 
Temp Operating temp range       -20    25     70     °C 
IDD_R Current in receive mode @ Audio amplifier on 60 mA

SA818: wide range of working voltage 3.3 to 5.5 V
Specification: 
Parameter Test condition     Min     Typ    Max    Unit 
Power supply                 3.3     4.2    5.5     V

I have been keeping the voltage around 3.3V and I haven’t pushed it; I may try it 😉