How I developed the device, from idea to production. Part 2

Whoever has not read the first part, it can be found here , but for now I am publishing the second part, which contains more technical details than the first. The third and final part is in turn, it is still being prepared, as saturated with details, photos of prototypes and technical information as possible. I hope that the second part of the harazhitelami enjoy no less than the first. Let's get started?
A little lyrical digression about ZigBee technology.
ZigBee is a special case of the IEEE 802.15.4 standard.
Like much of what has firmly entered our everyday life, ZigBee is actually a civilian application of military technology. Imagine that you need to establish a reliable connection between several command posts (or collect a lot of some kind of data on the territory). A plane flies over the terrain, from which a large number of devices almost invisible to the enemy that are able to work autonomously for a long time are scattered. These devices, being scattered on the ground, imperceptibly form a data network, which is almost impossible to break. When one of the network nodes is destroyed, information is automatically transmitted along other routes. It turns out a sort of local mini-Internet.
About visual applicationtechnologies can be viewed on the website of Meshnetics, the Russian company developing the ZigBee protocol stack for global brands. It is noteworthy that this company is developing SW and exporting it outside of Russia, but over time (in three to four years) these developments will come back to us in the form of ready-made solutions. And they are sold with us already for other money.

Choose a chip and software!
Naturally, a mass product needs to be done cheaply. Making a device on ready-made ZigBee modules is pop (simple and expensive). And to do it yourself on chips is cheap but difficult (but interesting).
Worldwide, on the fingers of the hand you can count the manufacturers of ZigBee chips. And the decisive role, all other things being equal, is played by the level of technical support from the manufacturer. Since I often attended various technical seminars (at Kompele, Symmetron, Macrotime), I was able to evaluate various debugging tools and the level of support from different manufacturers. A worthy manufacturing company has been found.
I really love Linux, freedom, and when the documentation is written in a language that is clear to Russian brains (in order to understand this, you need to at least once in your life try to read the English version of Hitachi's documentation).
The young English company Jennic provided the highest level of technical support. Starting the project with its documentation was not difficult. And after I talked with English engineers and programmers, from the online technical support service, I really realized that they were really great.
Again, this company is notable for the fact that all the tools are developed on OpenSource platforms, moreover, it has developed its own microcontrollers on the free core of the OpenRisc-1000 processor!
FSF (Free Software Foundation, FSF.org) is forever, I thought, choosing Jennic!

So. The choice of wireless communication technology has been made - we are doing on a Jennic 2.4GHz, 802.15.4, ZigBee chip .
And what does a person need? Fortunately, an ordinary person does not like, does not want and is not able to program. Anyway, we are all lazy. And this is good. Imagine, if we were not lazy to walk up the stairs, we would never have invented an elevator. Or a car. Or a GUI. Or an iPod.
It seems to me that in this case everything should work on the principles of plug & play. And that means that simplicity was to become the cornerstone of the MT9000 project. In particular, attention should be paid to usability, so to speak, of the software and hardware. Often a simple Chinese lamp is a mystery even to an electrical engineer. In our case, I wanted to do everything as needed, and not “as always”.
Therefore, in the software, we must lay down at least 2 languages, Russian and English, and the possibility of long human messages of the form “Far bathroom: Leak detected.”, But in no case is the idiocy of the form “d1 = 0, d2 = 1, d3 = 0, d4 = 0 ".
It seems to me that we managed to implement the simplicity and humanity of the interface: the software is written in such a way that to install the kit the first time you turn it on, you need to spend 2 minutes:
- remove the insulators protecting the batteries from the sensors and base;
- insert the SIM card;
- call from your mobile phone to the device;
- lay out (attach) the sensors in those places that we want to control.
Everything, a set for battle (flood, fire, hacking) is ready.
The principle of simplicity lies in the design of the wireless sensor. It is a device capable of simultaneously performing all three functions:
- if you drop the sensor on the floor, it will report a water leak;
- if fastened to the door with a magnet, the sensor will report the opening and closing of the door (there is Velcro for fastening);
- if the temperature rises, the sensor will also inform about this.
With a small sensor size, the CR2430 lithium battery lasts a year!

It took half a year to write and test software with colleagues. Writing software was greatly helped by understanding the slot / channel model of interaction between entities (the idea of TrollTech's QT library). Therefore, theoretically, any of our sensors (including those that are currently under design) or an actuator can be connected to the MT9000.
In the software of the first versions of the device, a bug happened, shameful. In Russia, 11 characters are used in mobile communications, but in general there can be from 10 to 14. For example, in Ukraine, for a domestic call, you can use the simplified 10-digit dialing method or the full, 12-digit one. Due to the difference in the number of dialed characters, the device did not work in ex-USSR except Russia, plus in some sensors the battery ran out quickly. I had to recall and fix all these devices from the market. But now everything is OK, the project is ready, the device can be purchased, and it seemed to me that it would be interesting for the Khabrasociety to read about all this.
That's how the MT9000 product was made, which can already be seen on the manufacturer’s website and purchased. In the continuation of the article about the project, in the third and final part, I will try to indicate as many technical details as possible, including photos of the device, starting with early prototypes and other things that can be very interesting to you, habra people. In anticipation of the third part, you can evaluate other Master Kit gadgets .
Next in line is something new (namely, the third part of the article is already ready for use by Habr).
UPD . At the request of colleagues from MasterKit, I am publishing an announcement on cooperation with the authors:
We offer representatives of the habrasociety to collaborate with those who like different kinds of gadgets, and who can describe them like this,