The Mesh Potato
Low-cost Wi-Fi SoC devices are highly integrated. They have minimum hardware interfaces—just enough for their core purpose.
To support an FXS interface, we normally use a CPU that has some sort of Time Division Multiplex (TDM) bus to support one or more 64kb/s bit streams of speech samples. The TDM bus hardware then handles DMA of the speech samples, presenting them as buffers to the device driver.
Every chip I have worked on in 20 years of telephony hardware design had a TDM bus. The AR2317 has many other features we need (low cost, Wi-Fi, OpenWRT support), however, there's no TDM bus!
So, I worked out a scheme to send and receive speech samples via the RS-232 console port, using some external glue logic and a small microcontroller to buffer the speech samples. It's not elegant, but it's reasonably low cost and it works, allowing us to use a low-cost AR2317 SoC for a very different application (VoIP) than it was designed for.
As the speech samples arrive in the RS-232 port, they are buffered by the SoC serial FIFO. When the FIFO fills, it interrupts the CPU every 1ms. Now, 1ms is a very high interrupt rate. What this means is every 1ms, the CPU must stop what it's doing and run the Interrupt Service Routine (ISR). This can cause a big performance hit, as the instruction cache contents must be flushed and replaced every 1ms.
To minimise this performance hit, I rewrote the Linux drivers/serial/8250.c interrupt handler to be as small as possible (Listing 1). This is small enough to consume only a tiny amount of valuable instruction cache and is likely to stay resident in the cache between interrupts. The functions it “calls” are either macros or very short inline functions.
Listing 1. Small, Fast Serial ISR to Minimise Instruction-Cache Thrashing
static irqreturn_t serial8250_interrupt(int irq, void *dev_id)
{
struct irq_info *i = dev_id;
struct list_head *l;
struct uart_8250_port *up;
unsigned int lsr;
unsigned char ch;
unsigned int iir;
int count = 0;
spin_lock(&i->lock);
l = i->head;
up = list_entry(l, struct uart_8250_port, list);
lsr = serial_inp(up, UART_LSR);
while (lsr & UART_LSR_DR) {
ch = serial_inp(up, UART_RX);
ch = mp_buffertxrx(ch);
serial_outp(up, UART_TX, ch);
lsr = serial_inp(up, UART_LSR);
count++;
}
spin_unlock(&i->lock);
return IRQ_RETVAL(1);
}
Being a small team on a modest budget, we have experienced difficulty obtaining all the data we require from the SoC vendor, Atheros. This is a problem with some chip vendors. Unless you can pay big up-front fees or have a one-million chip order pending, it is hard to get support or even basic data. This is a pity, as I feel many chip vendors rely increasingly on the Open Source community for their firmware and build tools and hence their chip sales. Also, we are trying to design a mass-market product that will sell more of their chips.
This is not true of all chip vendors. Analog Devices has been very helpful with the IP04-based open hardware embedded IP-PBX (see Resources) that uses the Analog Devices Blackfin CPU. The company provided comprehensive data, time from many support engineers and even funded some of the IP04's development.
One particular problem area with the AR2317 has been RF calibration. Each AR2317 chip is slightly different and must be calibrated on the production line using automated test equipment. The software to perform this calibration and even the calibration registers' documentation is very closed. This has made it hard to calibrate our prototypes to obtain optimum RF performance.
However, where there is a will, there is a way. With Atcom's help, we have teamed with other Wi-Fi router vendors who have the required calibration equipment on their production lines.
In early 2009, we started design of the actual custom Mesh Potato hardware. By the middle of 2009, we had built approximately 20 prototype Mesh Potatoes, and in July, we held the second Village Telco Workshop to test the alphas and plan the next phase of the project.
One nice demo was a simple Asterisk dialplan, placed on each Mesh Potato:
exten => _XX,1,Dial(SIP/4000@10.130.1.${EXTEN})
This allowed us to construct a serverless, peer-to-peer voice network. This dialplan takes a two-digit number XX and lets you dial another Mesh Potato with the IP of 10.130.1.XX. It's an instant local phone network on just a few watts/node, no server required (let alone a cell-phone tower or central office exchange). Simply switch on your potato, and you can make calls. Imagine the applications for Katrina-style disaster situations where you need instant communications.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Validate an E-Mail Address with PHP, the Right Way
- RSS Feeds
- Introduction to MapReduce with Hadoop on Linux
- Weechat, Irssi's Little Brother
- New Products
- Developer Poll
- Reply to comment | Linux Journal
2 hours 36 min ago - Reply to comment | Linux Journal
3 hours 21 min ago - Didn't read
3 hours 32 min ago - Reply to comment | Linux Journal
3 hours 37 min ago - Poul-Henning Kamp: welcome to
5 hours 47 min ago - This has already been done
5 hours 48 min ago - Reply to comment | Linux Journal
6 hours 33 min ago - Welcome to 1998
7 hours 22 min ago - notifier shortcomings
7 hours 45 min ago - heroku?
9 hours 22 min ago
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
The best Mesh / Telecoms Idea I have ever heard of...
Have been installing some Open-Mesh networks in low income areas as well as local small network groups and this combined Mesh CPE and Voip ATA is the best invention I have seen since the Meraki Mini. (or OM1 - lol)
I cant wait to test some of these.
Congratulations from www.bnetwifi.com Spain.
PS: Please tell me how I can test some Patatas and your Dashboard Control / Provisioning System: bnetwifi@gmail.com
Encryption
Since the analog signals from the phones are digitized, is there any encryption to at least keep the casual evesdroppers at bay?
Also is there any way that one could buy an unpopulated PC board, any proprietary chips and a parts list for the rest to make one at home? This looks like a really interesting way to establish a small, localized phone system.
Also, IIRC there was an ethernet block on the system diagram. Does that mean this thing could function as an RF LAN/WAN? If that were so secure comm could be handled by encrypting VOIP on a laptop.
ultrawideband?
This is a very cool device, kudos! I just got to wondering though...what would it be like to use ultrawideband? From what I've read, it's possible to get a lot more data throughput with a lot less power. The FCC doesn't allow it in the U.S. but maybe in the third world that won't be an issue...and it would be nice if they paved the way for us!
Digital Comm on Version of Mesh Potato
Mesh networking for analog phones is a good concept, but to be broadly useful it also needs to support digital communications, with computers or smart phones as the client devices. It would seem what while developing them, you ought to go ahead and enable them for broader uses.
My concern is emergency disaster situations, and here in the U.S., as elsewhere, emergency response will require the conveyance of data as well as voice. I have been involved in some disasters and data communications proved to actually be more important than voice communication. From maps to inventories, logistic control to medical imaging, ground-penetrating radar to biometric identification. The list goes on. We can use CB or handheld shortwave for voice. Data is the main need.
Data Comm on the Potato
The block diagram indicated an ethernet connection. That should take care of data transport needs.