Tag Archives: internet

IP Cameras on the Farm: Part 1

Security_camMany people start building an AyrMesh network on their property to provide Internet access across their acreage. However, having an Internet Protocol (IP) network across your property gives you the opportunity to connect devices on the property to help you be more productive, more efficient, safer, and happier.

When I ask people what else they’d like to do with their AyrMesh Network, the first thing that usually comes up is cameras – the ability to see their property remotely.

There are two distinct reasons for putting cameras on your property: the first is what I call “situational awareness” – being able to bring up a view of some part of your farm any time you want. The second is for security – automatically monitoring some view of your property and alerting you when something happens.

If you have animals on the farm, you probably worry about them – especially if your livelihood is tied up in them. One of the most common uses for cameras on the farm is to be able to check on the animals, whether it’s just so the kids can see the horses when you’re away or if you need to check on farrowing sows, calving cows, or foaling mares to protect your investment.

A lot of people also just want to be able to view some part of the property, like the driveway or the kid’s play area, so they can know what’s going on any time. Sometimes these cameras may be dual-purpose, serving both a security function and for situational awareness.

Putting a camera on your property gives you a “view” – you get the IP address of the camera from your router and you can bring up that view from anywhere on your property. Then you can do what’s called a “port forward” on your router to make your camera viewable from the Internet, wherever you may be. For instance, I always forward port 9001 to a camera in my living room. I can look at my public IP address on AyrMesh.com and find that it’s 99.100.101.102 (it’s not, but let’s pretend…), so I just need to point a browser to http://99.100.101.102:9001 and log into my camera (note: you HAVE to have a good, strong password on your camera).

Next we’ll talk a little about the different kinds of IP cameras and the tradeoffs and compromises you can make – see part 2 here.

Getting the most out of your router – part 3

Once you have your router set up properly, your devices on-line, and ports forwarded to those devices, there’s one more small problem: being able to reach your devices over the Internet. There are two problems: first, Internet Service Providers (ISPs) usually provide dynamic IP addresses, so your “home address” may change from time to time; second, IP addresses are hard to remember.

The solution is what is called “DDNS” – Dynamic Domain Name Service. Domain Name Service (DNS) is simply the service that translates a domain name (ayrstone.com) into an IP address (162.159.242.105) so you can access it. DDNS is a service that continually and automatically updates the IP address so that you can always reach your home network using a simple, easy-to-remember domain name.

There are two parts to DDNS: first, it involves a service, for which there is usually (but not always) an annual fee, and an “updater” that notifies the service when your IP address changes. Dyndns.com is the leader in this area; they used to offer a single DDNS account for free, but they have since gone to charging $25 a year. For this they offer a very good service with email support if you need it.

Using Dyndns.com is very easy: you typically sign up with a username (e.g. “ayrstone”) and you can select an extension on one of their “house” domains (e.g. ayrstone.dyndns.org – you can actually select up to 30 – or you can use a domain name you actually own). You then need to set up an “updater:”

  1. Many brands of routers have an updater “built in” for dyndns.com, or
  2. You can download a small program from http://dyn.com/support/clients/ that you run on a computer that is ONLY in use on your home network (it won’t help if it updates your domain name to point to Starbucks…) so it can automatically tell when your IP address changes and “tell” dyndns.com.

One of the advantages of using Dyndns.com is that many brands of router are pre-configured for them; all you have to do is fill in your credentials and go. Dyndns.com also has good, downloadable background programs to run on your home or office computer to update the IP address – this is actually how I use the service. My router doesn’t have a built-in Dyndns.com updater, but my office computer is always on here in the lab, so that’s the easiest way to keep Dyndns.com up-to-date on the lab’s IP address..

There are still a number of organizations that offer free DDNS, and here’s a nice article on Lifehacker that talks about them. The free DDNS services are generally not as convenient: many routers don’t even have a “generic” DDNS setup, but, if yours does, that’s what you’ll use if you want the router to update your IP address. If not, most of them have instructions how to set up a script on your home PC to update the address – entirely doable, but not as easy as just downloading an application. Also, most of the free services don’t have any technical support – they’ll typically have “FAQs” on their site, but you’re on your own. I use one of the free services at home, and it works just as well as Dyndns.com, but it was a bit tricky to set up.

Once you get it set up, accessing your home or office network is simple: just use the domain name you selected. For instance, here in the lab I have my desktop computer accessible via VNC accessible on port 7999, two IP cameras (ports 9005 and 9006), and a weather station on port 8000 (as well as my router on port 80). If the lab’s DDNS domain is ayrstone.dyndns.org (it’s not really, of course… even though everything here has a good password, I’m not inviting people to try to hack them), then I can VNC into my computer at ayrstone.dyndns.org:7999, view my IP cameras at http://ayrstone.dyndns.org:9005 and 9006 (I actually have IP Cam Viewer on my phone set up for those ports already), view my weather station at http://ayrstone.dyndns.org:8000, and re-configure my router at http://ayrstone.dyndns.org (port 80 is the default for http connections).

If your goal is to automate information-gathering and enable remote control for machinery on your farm, you need to have access to your farm’s network from wherever you are. DDNS is a way to make that much easier.

Getting the most out of your router – part 1

The venerable Linksys WRT54G – Courtesy of Linksys

The world of networking is complex, including that little bundle of technology sitting on your shelf – your router. It is actually a pretty amazing little device that can probably do more than you realize. In truth, the typical “consumer” router is a combination of three devices:

  1. A router – a router is a device with two or more ports that is used to connect two or more networks together. Typically, the consumer router has a “WAN” port that connects to the “Wide Area Network” of your Internet Service provider and “LAN” ports for your Local Area Network.
  2. An Ethernet switch – you may have noticed that your router doesn’t have two ports; most actually have five: one WAN port and four LAN ports. Inside the box is an Ethernet switch that turns the LAN port of the router into 4 LAN ports to which you can connect wired computers, servers, and even additional Ethernet switches if needed. Actually, it’s 5 LAN ports, because the fifth one is connected to…
  3. A WiFi Access Point – this is simply a wireless radio connected to an internal LAN port that provides a WiFi signal for computers, tablets, smartphones, IP cameras, entertainment systems, and all kinds of other things. This WiFi radio is usually optimized for short-range, indoor use, providing maximum throughput for a short distance.

One of the odd and important facts about a router is that it has two Internet Protocol (IP) addresses: one on the network to which its WAN port is connected (which should be a public IP address, visible from the Internet – e.g. 108.162.198.52, ayrstone.com’s address), and one on the LAN port, the network it creates for you (a private address, not usable from the Internet, e.g. 192.168.1.1). Its job is to take data packets from each network and move them to their destination network. So, if your computer is at 192.168.1.50 on the LAN, and it receives a packet on its WAN port destined for 192.168.1.50, it passes it to the LAN port where it finds its way to your computer. Similarly, if your computer creates a connection to 108.162.198.52, the router receives packets from your computer on its LAN port and routes them to the WAN port. When you print to your networked printer (at, say, 192.168.1.100), it receives packets from your computer and then just turns them around and sends them back down the LAN port, since they are not destined for the Internet.

The ability of the router to accept traffic on a single public IP address and enable several different computers at private IP addresses to have separate “conversations” with the Internet is called “Network Address Translation” or NAT. The way it does this is by using “ports” – simply numbers associated with every IP address.

Each IP address has 65,535 possible ports. Some ports have pre-assigned purposes, some are available for use by applications, and some are ephemeral – here’s a good explanation of which are which. NAT uses those ephemeral ports to keep the conversations between your network and the Internet straight; for instance, your computer’s conversation with this website might be using your public IP address’s port 55135, while another computer on your network might be having a conversation with another website on port 61234. To the two websites, it looks like the traffic is coming from a single computer, specifically your router. Your router then routes the responses from the websites to the correct computer based on the port on which the data comes in.

The private IP addresses on your network are usually assigned by your router using Dynamic Host Configuration Protocol or DHCP. When a computer connects to your network, it will ask the router for an address via DHCP, and the router will provide it one (assuming it has one to provide). The address is referred to as a “lease,” because it will expire at some point after the device leaves the network, so it can be used by another device. However, note that you can simply assign a static IP address to a device in your network, as long as (1) it is an IP address inside your network (usually meaning it has the same three first numbers as everything else on your local network, e.g. 192.168.1.x) and (2) it does not interfere with the DHCP settings on your router (if your DHCP server begins at 192.168.1.50 and your router is at 192.168.1.1, use static addresses between 192.168.1.2 and 192.168.1.49, and KEEP TRACK OF THEM WHEN YOU ASSIGN THEM!!!)

The first tip for getting the most out of your router is this: set up your router’s DHCP server carefully. I suggest setting your router’s IP address as 192.168.1.1 and setting your router’s DHCP range from 192.168.1.50 to 192.168.1.254 (204 addresses). The reason for this particular range is that, first, it allows for a large number of devices to automatically use your router, getting private IP addresses via DHCP (204) but still leaves you 48 addresses you can use for devices you want to statically assign. This gives you the flexibility to maintain, expand, and control your home network.

Alternately, most modern routers support DHCP Reservations, which allow you to ensure that the router ALWAYS provides the same IP address to a device on the network. That way you get the advantage of a static IP address (knowing where a device is at all times) with the advantage of DHCP (ease of configuring devices and the IP addresses being managed by the router).

Click here to go to part 2

Myths about Wireless Farm Networking

Myths are fun, but this guy won’t help you get the work done.

We have been talking about the myths of Wireless Farm Networking lately, and I wanted to add my own two cents worth here.

The article about the myths is excellent and stands on its own – I strongly suggest you read it. I thought I’d add a little about the topic here, by focusing on three aspects: Wireless, Farm, and Networking.

Wireless – I have seen “wired” farm networks – a number of livestock producers have trenched and buried fiber lines to their livestock buildings (Ethernet can only go 100 yards) for monitoring and control. However, it’s much cheaper now to go wireless, and it gives you much more flexibility. To build a good wireless network on your farm, you have to learn about “line of sight” (or, more correctly, Fresnel Zones) and position equipment so it has both power available and good radio signal from the rest of the network. It used to be that having a private wireless network across your farm was either technically impossible or cost-prohibitive, but we are proving that wrong every day.

Farm – A farm is pretty much defined as being in a rural area, and we’ve all seen that what works in town doesn’t necessarily work on the Farm, and vice-versa. The AyrMesh network is designed for farm use – relatively few people and machines spread out over a relatively large area. There are lots of good solutions for networking in town, where there are a lot of people in a small area, but they will never work as well as a solution designed specifically for the farm.

Network – The Internet Protocol (IP) network is the single, unified data communications medium for this century. I have seen farms that had a wireless link for their weather station, another wireless link for their GPS corrections, a home WiFI system and cellular coverage. Getting rid of the “point-to-point” solutions and putting everything on the network enables you to collect and transmit the data you need more easily, deliver what you need over the Internet, and gives you the option of adding new technologies to your operation quickly and easily.

Some people think this is revolutionary, but I would argue nothing could be further from the truth: this is the result of a clear evolution over time. In the 1970s academicians started tying computers together and transferring data over the first networks. In the 1980s networks came out of academia and started being used for business and even personal purposes; in the meantime, ham radio operators and researchers were starting to send digital data over radio waves. In the 1990s companies started to network their offices to share files and printers, as well as sending emails. Building-to-building microwave links became relatively common, and Industrial Automation moved to IP networks. In the 2000s the consumer internet became a reality, as did WiFi for wireless data, and we all got “on the net.” Now, in the 2010s, we have the Internet of Things and the low cost of high-power wireless networking, making this the decade of Wireless Farm Networking. The ability to monitor farm data and even control farm operations using a local network connected to the global internet will change agriculture forever.

A new take on the “WiFi vs. Cellular” question

Every so often I run into someone who asks, “Why would I want a WiFi network across my farm? I have a cellphone that will access the Internet anywhere I go…”

It’s kind of a funny argument, for a few reasons:

  1. If you have good cellular data access across your entire farm, you’re in the minority – most people in the rural U.S. and Canada have no or only very slow Internet access via the cellular network on some, most, or all of their properties.
  2. Even if you have Internet access via cellular, it’s almost always slower than WiFi. It’s been my experience that people appreciate WiFi a lot more after they get a smartphone.
  3. Having a local-area network (LAN) enables you to do more than just access the Internet – it allows you to use IP cameras, weather stations, soil sensors, and other devices to keep track of what’s happening on the farm, and even use network-connected relays, grain dryers, irrigation, lighting, and HVAC systems from anywhere on the farm

The cellular service providers (AT&T, Verizon, etc.) originally only used the cellular networks for both voice and data – but the data connections were at “modem-speed” – kilobits per second. Then smartphones (led by the Blackberry and Nokia phones) started to be capable of much more data usage – email and even some web browsing – and phone manufacturers started including WiFi connectivity. Later on, cellular providers offered faster cellular data options (“3G” and “4G”), but modern smartphones still use the cellular network for voice, and the voice network is still separate from the data network. The upshot is that, in many rural areas, you can make or receive voice calls and get or send text messages, but you may not be able to load a web page or send an email unless your have a nearby WiFi network.

A new article in Businessweek points out some new providers are actually turning that model on its head, introducing phones that use the WiFi network by default for voice and data, and only access the cellular network if there is no known WiFi network in range.

Now, I have a cellphone with a data plan, and I pay over $120 per month even though my phone is on WiFi about 90{8fd1ffa65f67a2e931916b3c1288d51eed07dc30586a565c92d055673de7c64e} of the time. If I weren’t traveling all over the place on Ayrstone business, I’d be very tempted to get one of these Republic Wireless or Scratch Wireless phones and save about $80-100 of that bill per month.

For people who have a Wireless Farm Networking system to provide farmwide WiFi, these new phone plans may be very tempting.

Welcome to the Ayrstone Blog!

This is me, but I’ll probably never look this good again.

This is what it’s about: Ayrstone on the farm. This is Matt Hughes’s farm in IL

This is a blog about Ayrstone, our products, networking, particularly wireless networking, the internet, farm/ranch management, and whatever else we find interesting. The primary author is Bill Moffitt, President and Chief technical guy for Ayrstone Productivity.

As Ayrstone customers who have spoken to me can attest, my interests are many and varied, but they always circle back to ways to get things done better, cheaper, safer, and more effectively. I am a strong proponent of technology, but I’m not really what you might call an “enthusiast.” I think of myself more as a crash-test dummy: I want to try new things, see what the potential is, and then talk about what I find (good or bad). The nice thing about this is, I hope, I can find things that are genuinely helpful. The bad part, of course, is that you may not always agree with my assessment. But, of course, that’s what makes this interesting: I expect some lively comments and discussions about the relative merits of different approaches here.

Just so you know what to expect, I’m a “machine gun” writer: I’ll go a long time without writing anything, and then I’ll put up several posts in rapid succession.

I welcome your comments, both positive and negative. This world of networking on the farm has a lot of big, new opportunities, and I hope I can help you make the most of it.

If so, I’ll have done my job.