Wednesday, August 13, 2014

Still Here!

I've been getting a few questions lately about mesh hardware and decided to look back at my blog and saw that it's been over a year since I've posted anything here!

Between work, home and outdoor activities I haven't had much time to dedicate to experimenting with mesh items but I do have a handful of blog posts started to document a few more aspects of what I have done in the last year.

I've got posts started talking about more VoIP items, experimenting with XIPAR, installation of a permanent mesh node, a simple FTP server for a mesh network, and a few more.  Hopefully in the next couple of weeks I'll have time to finish them up and post them.

73,
David

Tuesday, May 21, 2013

HSMM-MESH™ Outdoor enclosure

Here in the Midwest, we are subjected to the entire gamut of weather conditions that mother nature can throw at us.  Extreme cold (-20°F), extreme hot (>100°F), snow, ice, rain, straight-line winds in excess of 100 MPH, etc.  Especially for the nodes that are to be permanently installed outside, I want to house them in an enclosure to ensure that the electronics inside have the best chance of surviving.

In order to find a suitable enclosure to mount a HSMM-MESH™ node outside, I first started by defining some requirements:
  • Shall be weatherproof
  • Shall be shielded
  • Shall be large enough to mount at least one WRT54G series router and any required accessories
  • Should be economical
  • Should be easy to install/replace entire unit
  • Should have bulkhead N-connector mounts
  • Should have waterproof Ethernet feed-through

Next was looking at what others have used for outdoor enclosures.
  • Sprinkler box - 
    • http://hsmm-mesh.org/component/content/article/51-mesh-node-examples.html
    • http://www.w5adc.com/HSMM%20Enclosure%20Implementation.htm
  • PVC electrical box - 
    • http://hsmm-mesh.org/documentation/121-drop-boxes.html
  • Surplus NEMA box - 
    • http://hsmm-mesh.org/hsmm-mesh-forums/view-postlist/forum-7-austin/topic-237-south-austin-k5amd-oak-hill.html
I like that the sprinkler box is easily found at local hardware stores but it's lack of shielding and appropriate mounting is a problem.  It might still be useful for temporary nodes that you need easy access and semi-weatherproof, however.

The PVC box is another nice temporary node enclosure but I don't know how it will survive long-term in the sun and again, is not shielded.

Surplus NEMA boxes will work, however I don't have a good source for one.  eBay shows enclosures for $100 on up, which wouldn't satisfy the economical constraint.


I'm not sure if I found the die-cast enclosure by searching on my own or found others using them but I found an enclosure that seemed to satisfy all of my constraints and easy on the pocket book too.

What I found was a  Tycon TPENC-DC-10x8x3 Outdoor Die Cast Enclosure
  • 10" x 8" x 3"
  • IP67 waterproof
  • 3 cutouts for N-connectors
  • 2 cutouts for Ethernet glands (one gland included)
  • Aluminum construction (shielded)
  • Painted off-white
  • Only $35 (depending on source)*
* As far as I can tell, these are mass-produced overseas and sold under various names and configurations at multiple vendors.

I was impressed enough that I went ahead and bought one to evaluate.

Temperature testing:

After mounting a WRT54GL in the case, I put it in my deep freeze to simulate extreme cold conditions.  I did a 24-hour cold soak with the freezer set to 0°F, the temperature inside the WRT case never got below 21°F, which is still within the specified operating range of the WRT54 routers.  A spray of conformal coating prior to installation should mitigate any issues there.

Sitting in the box downstairs, ambient temperature 68°F, inside the case got to 81°F

I haven't put it in an oven yet with the router running to see how it reacts to heat.

All tests did not have a fan circulating air within the box (I did put a heatsink on the processor) and the router was still mounted inside it's blue/black plastic case.


Sources:

Willigear WOE-001
http://www.wiligear.com/?q=products/accessories/outdoor-enclosure

Titan Wireless:
http://www.titanwirelessonline.com/Die-Cast-Outdoor-Enclosure-2-N-Hole-p/en-tw2n.htm

Amazon (non-Prime):
http://www.amazon.com/Die-Cast-Hinged-Outdoor-Enclosure/dp/B004EI0KKE

Search for "Die Cast Hinged Outdoor Enclosure" and you should see plenty of hits.




Look for a post on how I mounted a router in one of these boxes soon.

Wednesday, January 23, 2013

Antenna Data!

Over the past few months, I have been collecting data on different kinds and styles of antennas and am finally getting around to publishing the information.  I've created a separate page on this blog to keep the data and will update it when I get more antennas tested.

Thursday, January 3, 2013

KC0ALC-1 Digipeater

KC0ALC-103 HSMM-MESH router

The current iteration of my digipeater is a WRT54GSv1 router, running APRS4R which is written in Ruby.  The Ruby packages for OpenWRT takes up more than the available memory space on other routers (G and GL versions) so I'm using a GSv1 that has more flash and memory to handle both APRS4R and HSMM-MESH™ firmware.   Previously, I had been using a WRT54Gv2 router with the USB modification and had the OS running on a flash drive, later on an external 2.5" hard drive.  The USB sticks would die after a month or two of usage and the hard drive required a USB hub to provide enough power so I decided to upgrade it to a GSv1.

The TNC is a TNC-X v1, KISS only TNC that I bought at a swapmeet for $5 and the radio is a FM-2030, a 70s vintage mobile radio that I had no other use for.

The TNC is connected to the router via one of the built-in serial ports on the WRT router.  I found a TTL-RS232 converter chip laying around that works on a 3.3V Vcc voltage (ICL3232) so I wouldn't have to add any other voltage regulators. I made up a simple interface-board, dead-bug style, for the converter and used a couple of DB9 cables to provide external

Other additions to the router include a heat sink on the main processor and a fan inside the case to circulate air.  The fan is a 12V fan I found in a junk box with a current limiting resistor to slow it down.  Since this router will be running 24/7 I wanted to minimize the thermal stress on the components.



APRS4R is running as a fill-in digipeater (only responds to WIDE1-1 packets) and also a transmit I-Gate, limited only to the polygon weather alerts coming through the APRS-IS servers.  I further limit the packets to my county and surrounding counties via the APRS-IS filtering I have set up.  I'm using APRS4R right now mostly for the ability to share the APRS data and have other computers connect to the digipeater and use it as a TNC interface.  I have the port forwarded through my home router so I can access my TNC wherever I have an Internet connection and also available to any HSMM-MESH™ routers that are connected to the router.

APRS4R also needs regular restarts to behave correctly (due to a memory leak issue, I believe) so I have a cron job reboot the router at specified intervals.

Here is an overall system diagram:


Some pertinent links:

Monday, November 12, 2012

7911G behind NAT

I can happily report that I have been able to run VoIP phones across a HSMM-MESH link.  I was surprised at how easy it was, once I was able to reproduce the results.


First off, I set the VoIP phones to static IP addresses.  I chose 172.27.0.51 since it was outside the range of  the router's DHCP (and I have been using the 172.27.0.5x space as VoIP experiments anyway).  

On the router that has the server on it, I forwarded UDP ports 5060 and 10000-20000 to the server by adding a line to the /etc/config/firewall file on the router.  This line will looks like:
forward:wifi:dport=5060,10000-20000 proto=udp dest=routerWiFiaddress:serverIPaddress
Replace the bolded fields with the appropriate IP addresses for your equipment; note there is a colon between the two IP addresses.



The router with just the phone attached, do the same thing but instead of the server IP address, put in the IP address of the phone:
forward:wifi:dport=5060,10000-20000 proto=udp dest=routerWiFiaddress:phoneIPaddress
For me, this was all that was needed.  The phones started working as if they were connected to the same LAN.



Here is a photo of a demonstration I set up at the November 2012 CVARC club meeting:

The Trixbox server running on the laptop and one phone connected to the left router (hiding behind the phone) and the other phone connected to the router on the right.

Helpful links:
http://fonality.com/trixbox/forums/trixbox-forums/trixbox-endpoints/need-help-remote-sip-extension-using-cisco-7940-60

Future work:
Move the Asterisk server to a small nettop, Rasberry Pi, Beagleboard, etc.

Tuesday, October 9, 2012

Cisco 7911G Hardware Info


Here is some hardware information on the Cisco 7911G VoIP phones that might be useful to someone down the line thinking of integrating the phones into a HSMM-MESHÔ system.
  • The power connector not same as the WRT54 series routers.  The DC power jack is a 5.5mm OD/2.5mm ID jack rather than the 5.5/2mm of the WRT routers.
  • It also runs off of the POE, which is 48V rather than 12V like some polycom phones.
  • The PoE chip is a TPS2375/2377 which according to the datasheet states it needs at least 30V to start power.  In experiments, I found that the phone won't turn on until at least 34V is presented to the DC power jack.  Using PoE over the Ethernet cable, it requires at least 36V to turn on.
  • PoE does not appear to care what DC polarity is on pins 3/4 and 7/8, either configuration worked for me

Cisco 7911G, SIP and Trixbox

I have seen a few people experiment with VoIP phones running over a HSMM-MESHÔ link and thought this could be an interesting experiment.  I have been thinking of experimenting with VoIP for a couple of years but never found a good reason to as I use my cellphone for just about everything.  I figured I would

One day searching through eBay a couple of weeks ago, I found an auction from a local electronics warehouse that was selling 16 Cisco 7911G phones for a price I couldn't pass up.  Cursory look on-line seemed that the configuration files were adequately documented so I started off on my journey.

I was looking for a entry-level Asterisk server program that I could load on an old laptop for testing.  Searching through the Internet, I found Trixbox - which is a self-contained Linux distro with Asterisk and FreePBX already installed.  Configuration is done through a web page interface - perfect for a Linux Padawan like myself.

Setting Trixbox to talk to my Polycom IP501 phone was extremely easy: went through the extension and phone setup pages and had everything configured in less than an hour thanks to YouTube videos and online tutorials.  Same thing with a softphone application on my Ubuntu desktop - Twinkle.  The Cisco phones, however, were not as easy....



Upgrading the phones to SIP firmware

Cisco has two different firmwares that you can load into the phone which will change it's behavior: SIP (Session  Initiated Protocol) and SCCP (Skinny Call Control Protocol).  SCCP is a proprietary protocol created and defined by Cisco, where SIP is a more open protocol and generally universal from what I've seen.  Since I don't know where this project will go in the long term, I'd rather not limit myself to one brand of phone or equipment so I decided to go with SIP.  Unfortunately the phones I bought were pulled from a business environment so it had SCCP firmware installed and needed to be changed.

Changing the firmware is a relatively easy task.  It involves having a tftp server on the network that serves the firmware files to the phone upon bootup.  After registering for a free account on the Cisco website, I was able to download the SIP9-3-1-1S firmware files and followed the instructions at this link to upgrade 7911 phones to SIP firmware:
http://lodge.glasgownet.com/tech/upgrade-a-cisco-7911-to-sip-firmware/




The configuration file

The Cisco 7911G phones use a XML file that gets loaded during bootup for all of it's settings and configuration.  This file sets things like the time and date format, the IP address of the VoIP server, the username and password for debugging and registration, etc.  This is where it started to get hairy.


My hope was that with Trixbox, I would just go through the same motions that I did with the Polycom phone and it would be a simple matter to get it working.  Boy, was I wrong.  Trixbox apparently has limited support for Cisco phones and does not have a default configuration for the 7911G phones.  Off to the Internet I went, hoping I could find a valid configuration file that someone had posted but came up empty handed.  I found a lot of forum posts that were similar to my situation but none of the configuration files worked.

After a week of trying different configuration files, settings, searching online and just as I was about to write the phones off and re-sell them on eBay, I finally found a configuration file that worked!



<device>
   <deviceProtocol>SIP</deviceProtocol>
   <sshUserId>user</sshUserId>
   <sshPassword>pass</sshPassword>
   <devicePool>
      <dateTimeSetting>
         <dateTemplate>D-M-YA</dateTemplate>
         <timeZone>New Zealand Standard/Daylight Time</timeZone>
         <ntps>
              <ntp>
                  <name>xx.xx.xx.xx</name>
                  <ntpMode>Unicast</ntpMode>
              </ntp>
         </ntps>
      </dateTimeSetting>
      <callManagerGroup>
         <members>
            <member priority="0">
               <callManager>
                  <ports>
                     <ethernetPhonePort>2000</ethernetPhonePort>
                     <sipPort>5060</sipPort>
                     <securedSipPort>5061</securedSipPort>
                  </ports>
                  <processNodeName>xx.xx.xx.xx</processNodeName>
               </callManager>
            </member>
         </members>
      </callManagerGroup>
   </devicePool>
   <sipProfile>
      <sipProxies>
         <backupProxy></backupProxy>
         <backupProxyPort></backupProxyPort>
         <emergencyProxy></emergencyProxy>
         <emergencyProxyPort></emergencyProxyPort>
         <outboundProxy></outboundProxy>
         <outboundProxyPort></outboundProxyPort>
         <registerWithProxy>true</registerWithProxy>
      </sipProxies>
      <sipCallFeatures>
         <cnfJoinEnabled>true</cnfJoinEnabled>
         <callForwardURI>x--serviceuri-cfwdall</callForwardURI>
         <callPickupURI>x-cisco-serviceuri-pickup</callPickupURI>
         <callPickupListURI>x-cisco-serviceuri-opickup</callPickupListURI>
         <callPickupGroupURI>x-cisco-serviceuri-gpickup</callPickupGroupURI>
         <meetMeServiceURI>x-cisco-serviceuri-meetme</meetMeServiceURI>
         <abbreviatedDialURI>x-cisco-serviceuri-abbrdial</abbreviatedDialURI>
         <rfc2543Hold>false</rfc2543Hold>
         <callHoldRingback>2</callHoldRingback>
         <localCfwdEnable>true</localCfwdEnable>
         <semiAttendedTransfer>true</semiAttendedTransfer>
         <anonymousCallBlock>2</anonymousCallBlock>
         <callerIdBlocking>2</callerIdBlocking>
         <dndControl>0</dndControl>
         <remoteCcEnable>true</remoteCcEnable>
      </sipCallFeatures>
      <sipStack>
         <sipInviteRetx>6</sipInviteRetx>
         <sipRetx>10</sipRetx>
         <timerInviteExpires>180</timerInviteExpires>
         <timerRegisterExpires>3600</timerRegisterExpires>
         <timerRegisterDelta>5</timerRegisterDelta>
         <timerKeepAliveExpires>120</timerKeepAliveExpires>
         <timerSubscribeExpires>120</timerSubscribeExpires>
         <timerSubscribeDelta>5</timerSubscribeDelta>
         <timerT1>500</timerT1>
         <timerT2>4000</timerT2>
         <maxRedirects>70</maxRedirects>
         <remotePartyID>false</remotePartyID>
         <userInfo>None</userInfo>
      </sipStack>
      <autoAnswerTimer>1</autoAnswerTimer>
      <autoAnswerAltBehavior>false</autoAnswerAltBehavior>
      <autoAnswerOverride>true</autoAnswerOverride>
      <transferOnhookEnabled>false</transferOnhookEnabled>
      <enableVad>true</enableVad>
      <preferredCodec>g729a</preferredCodec>
      <dtmfAvtPayload>101</dtmfAvtPayload>
      <dtmfDbLevel>3</dtmfDbLevel>
      <dtmfOutofBand>avt</dtmfOutofBand>
      <alwaysUsePrimeLine>false</alwaysUsePrimeLine>
      <alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail>
      <kpml>3</kpml>
      <natEnabled>false</natEnabled>
      <natAddress></natAddress>
      <phoneLabel>Version 3</phoneLabel>
      <stutterMsgWaiting>2</stutterMsgWaiting>
      <callStats>false</callStats>
      <silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts>
      <disableLocalSpeedDialConfig>false</disableLocalSpeedDialConfig>
      <startMediaPort>16384</startMediaPort>
      <stopMediaPort>32766</stopMediaPort>
      <sipLines>
         <line button="1">
            <featureID>9</featureID>
            <featureLabel>6003</featureLabel>
            <proxy>USECALLMANAGER</proxy>
            <port>5060</port>
            <name>cisco1</name>
            <displayName>Cisco Phone 1</displayName>
            <autoAnswer>
               <autoAnswerEnabled>2</autoAnswerEnabled>
            </autoAnswer>
            <callWaiting>3</callWaiting>
            <authName>user</authName>
            <authPassword>pass</authPassword>
            <sharedLine>false</sharedLine>
            <messageWaitingLampPolicy>3</messageWaitingLampPolicy>
            <messagesNumber>1111</messagesNumber>
            <ringSettingIdle>4</ringSettingIdle>
            <ringSettingActive>5</ringSettingActive>
            <contact>cisco1</contact>
            <forwardCallInfoDisplay>
               <callerName>true</callerName>
               <callerNumber>false</callerNumber>
               <redirectedNumber>false</redirectedNumber>
               <dialedNumber>true</dialedNumber>
            </forwardCallInfoDisplay>
         </line>
         <line button="2">
            <featureID>21</featureID>
            <featureLabel>Dial 6004</featureLabel>
            <speedDialNumber>6004</speedDialNumber>
         </line>
      </sipLines>
      <voipControlPort>5060</voipControlPort>
      <dscpForAudio>184</dscpForAudio>
      <ringSettingBusyStationPolicy>0</ringSettingBusyStationPolicy>
      <dialTemplate>DRdialplan.xml</dialTemplate>
   </sipProfile>
   <commonProfile>
      <phonePassword></phonePassword>
      <backgroundImageAccess>true</backgroundImageAccess>
      <callLogBlfEnabled>2</callLogBlfEnabled>
   </commonProfile>
   <loadInformation>SIP11.9-2-1S</loadInformation>
   <vendorConfig>
      <disableSpeaker>false</disableSpeaker>
      <disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
      <pcPort>0</pcPort>
      <settingsAccess>1</settingsAccess>
      <garp>0</garp>
      <voiceVlanAccess>0</voiceVlanAccess>
      <videoCapability>0</videoCapability>
      <autoSelectLineEnable>0</autoSelectLineEnable>
      <webAccess>0</webAccess>
      <spanToPCPort>1</spanToPCPort>
      <loggingDisplay>1</loggingDisplay>
      <loadServer></loadServer>
   </vendorConfig>
   <versionStamp>1143565489-a3cbf294-7526-4c29-8791-c4fce4ce4c37</versionStamp>
   <networkLocale>New_Zealand</networkLocale>
   <networkLocaleInfo>
      <name>New_Zealand</name>
      <version>5.0(2)</version>
   </networkLocaleInfo>
   <deviceSecurityMode>1</deviceSecurityMode>
   <authenticationURL>http://mako/authenticate.php</authenticationURL>
   <directoryURL>http://mako/directory.xml</directoryURL>
   <idleURL></idleURL>
   <informationURL>http://mako/GetTelecasterHelpText.jsp</informationURL>
   <messagesURL></messagesURL>
   <proxyServerURL></proxyServerURL>
   <servicesURL>http://mako/services.xml</servicesURL>
   <dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
   <dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
   <dscpForCm2Dvce>96</dscpForCm2Dvce>
   <transportLayerProtocol>2</transportLayerProtocol>
   <capfAuthMode>0</capfAuthMode>
   <capfList>
      <capf>
         <phonePort>3804</phonePort>
      </capf>
   </capfList>
   <certHash></certHash>
   <encrConfig>false</encrConfig>
</device>


From this base, make sure you change the appropriate values for your setup:
  • Change the timezone information to whatever you prefer
  • Change the <name> tag in the <sipLines> block.  It needs to be the same as the username
  • Change xx.xx.xx.xx to the IP address of the Trixbox server
  • Check all the URLs to make sure they align with the files hosted on the server
    • make a authentication script for the <authenticationURL> field
  • Change the <loadInformation> tag to match the firmware you have loaded in the phone
Go through the Cisco Phone setup, make an extension as usual and a 7940 phone.  Then go in and replace the XML file with this one.

Make sure on the Trixbox extensions to change nat=no and qualify=never -- somehow this was restricting the registration process and not allowing it to complete.



Ongoing work: 
  • Working on the NAT firewall and forwarding so that phones behind a HSMM-MESH nodes will be able to talk to the Trixbox server
  • Coming up with a directory scheme for users
  • connecting multiple Asterisk servers together for redundancy/load sharing?
  • What is the difference between Trixbox SEP.cnf file and one that works?


I hope this helps someone down the line.