Connect to car alarm alligator program for android. Making an alarm from a smartphone: an experiment with Android applications

Let's create a new circuit (for example, under the name radioaudi-reversing.grc), where the signal will no longer be taken from the bladeRF, but from the recorded file. To do this, we use the File Source block, to which we simply pass the file name. Now the fun begins. When translating the “picture” obtained at the previous stage (Fig. 2) into the dependence of the signal level on time, its value is taken as the sum of all amplitudes over all covered frequencies of the spectrum for each moment of time, so the signal under study must be separated from the noise. To do this, you can use the Low Pass Filter module, but it cuts off frequencies, leaving a corridor around the zero frequency, that is, exactly in the center (0 MHz).

In any case, we have a signal from a direct current in the electrical circuit of the device in the center, and changing the freq parameter will not solve the problem. But the entire spectrum can be shifted by multiplying the signal coming from osmocom Sink by another, with a frequency equal to the required shift (this is mathematics). To do this, let's add a Multiply block and a Signal Source, to the input of the first we will apply the signal of the second along with the output of the File Source. The Multiply output, in turn, will be passed to the Low Pass Filter. Here I have chosen a cutoff frequency of 10 kHz (value 10e3) and a transition width of 1 kHz (value 1e3, this parameter is responsible for how sharply the filter cuts the signal, that is, how blurred the edges of the boundary area are).

Another important parameter is the Signal Source frequency - the value by which the existing signal will be shifted. It makes sense to bring it to the workspace with a slider, just like freq, under the name, for example, freq_0. The output of the Low Pass Filter is now simply directed to the WX GUI Waterfall Sink - the useful signal should hit exactly in the middle, at a conditional frequency of 0 MHz.

Hooray! At this stage, we can already get close to signal analysis. Drag and drop a WX GUI Scope Sink onto the workspace and connect it to the Multiply output via the Complex to Mag block, which serves, as you might guess, to transfer the signal values ​​from the complex area to the area of ​​more convenient real values ​​for operating. On fig. 3 you can see how it should look.

Fortunately, the data we have is transmitted using amplitude modulation and there are only two levels, so we can immediately go to the binary representation. To do this, we direct the Complex to Mag output to the Binary Slicer block, which converts the sequence of signal amplitudes into a sequence of zeros and ones, depending on whether the value is greater than zero or not. Since we have all signal amplitude values ​​greater than zero, using a simple Add const arithmetic block with a value of approximately -170m, we will lower the graph so that the Binary Slicer has something to distinguish. We will direct the output of the latter to a file through the File Sink block already familiar to us.

Note that such a scheme is complicated in practice by modules such as Rational Resampler and Throttle. The first one allows you to reduce the signal sampling rate in order not to operate with redundant data in the future, the second one essentially works the same way and is used to reduce the load on the processor in cases where it is not necessary to process the entire data stream without missing values ​​(for example, it is enough just to output data on the screen, as we have). It is also worth noting that it is considered more correct to use the Frequency Xlating FIR Filter block for frequency shifting, but for the sake of clarity, we use Multiply for this.

Rice. 3. Type of signal as a dependence of the amplitude on time

On the Waterfall Plot screen at zero second, you can see a useful signal. On the Scope Plot, it is shown as amplitude versus time.

Rice. 4. View of the working circuit for working with the signal

INTERPRETATION OF THE DATA OBTAINED

So, we got a file with a sequence of bytes reflecting the signal in binary form. 0x01 - one, 0x00 - zero. For reading, let's make a simple Python script that will interpret a sequence of ones and zeros over a certain threshold as 1 or 0, and also separate different signals from each other.


When presenting the received data in hexadecimal form, we get the following sequences:

2e23a99426bd8018

2e23a929426b805e

2e23a91f29428039

2e23a9031f298058

2e23a9cf031f809e

A mobile application that turns a smartphone into an “electronic watchman” is an idea, in general, lying on the surface! As you know, in a good modern alarm system, in addition to the traditional response to body vibrations, glass breaking, door opening, ignition on, etc., it is possible to control the channel mobile communications, communicate with the owner through phone calls and SMS. And besides, to do various useful things using GPS: to report the coordinates of a parked car, to report the car leaving the boundaries of a predetermined area, to draw a route track...

Actually, most smartphones could do the same if they were controlled by an application with an algorithm of work close to that of a car alarm. There are many such applications, and although some of them are designed to counter the theft of the phone itself, some are also designed to protect the car. Find them in the app store Google Play not difficult. And just outdated devices that have long been “decommissioned ashore” are suitable for these tasks.

"Alarm" applications

Let's install and try a couple of programs to understand their essence and capabilities. The application under the uncomplicated name "Signalka" is free and has a fairly simple and logical interface, which pleases. It also has two modes of operation.

  1. First mode of operation. In it, the application makes an “alarm” from a smartphone that calls and SMS to a pre-filled number in the event of a motion sensor being triggered, the car leaving a certain zone, etc. Accordingly, the second phone, which will receive alarm messages, does not need such an application and may even be a normal one. push-button telephone. But then you will have to turn on / off the alarm manually, which is difficult to do if the smartphone is deeply hidden in the car.
  2. Second mode of operation. In this case, you will need two smartphones - the Signalka application is installed on both, after which one hides in the car and serves as a watchman, and the second smartphone, which the owner always has with him, uses the same application as a control panel for the first one via Bluetooth . This is the most convenient mode that allows you not to touch the gadget hidden in the cabin unnecessarily - if, of course, it is constantly connected to the power supply.

In the application settings, you can adjust the sensitivity of the vibration sensor, the radius of the tracking zone, the exit of the car beyond which will cause an alarm (from 20 to 120 meters), as well as the events for which SMS will be received - the motion sensor is triggered, enabled / disabled, low charge batteries, etc. There is also a tracker mode, in which after the car leaves the tracking zone, the device will start sending you coordinates every 5 minutes.


The author of another application, under another "original" name "burglar alarm", designed its interface, frankly, unsuccessfully. Not everything in it is intuitively clear, there are a lot of abstruse troubles that load the average user, such as a running graph of vibrations of the smartphone case.

There is no intuition - you need instructions for use. There is an instruction, but among the screen sections (“Main”, “Calibrations”, “Settings”, “Other”) it is not visible - it is detected only if you click on the three dots in the right upper corner screen where an additional mini-menu is hidden. However, the application is also paid ...

One way or another, it is curious that the developer focused on the most complete use of the smartphone's motion sensor - the accelerometer. The user can not only adjust its sensitivity according to the “more / less” principle, as in the previous program, but adjust it in numerical values ​​independently for each of the three coordinate axes X, Y and Z. In the application settings, the user can set the angles, the achievement of which will lead to to trigger an alarm and send an alarm SMS. And in the same SMS you will receive digital data on the change of nodes along the coordinate axes.

With a known position of the smartphone, it will probably even be possible to draw conclusions about what is happening with the car, recognizing jacking, subsidence on ice crackling under the wheel or loading onto a tow truck. Whether this is convenient and how necessary is an open question, but in any case, this solution is unusual, distinguishing the application from others.


This is how the messages that come from the smartphone as an alarm look like:


Benefit or pampering?

An unpleasant feature of the "alarm" based on the phone is that it categorically does not have any protective functions. She will be able to inform the owner about the alarm, but she is unable to prevent the hijackers from starting the car if there are no other protective electronic or mechanical means on the car.

Accordingly, the question arises:

in what situations can a budget alarm system from an old mobile phone make sense? Actually, there are two options here.

  1. If the car already has a good security complex from an alarm, an immobilizer and a hood lock, but the security system has weak service functions - a short-range key fob, there is no GSM and GPS. In this case, an old smartphone will be able to improve the usability of the existing “secret police” - to make the range of control unlimited, report the coordinates of the car, remotely listen to the situation in the cabin, etc.
  2. Even more a budget option- combining a smartphone with home-made simple locks that many people with even small electrical and radio engineering skills can do. A couple of tricky and unexpected locks based on hidden buttons, combinations of regular keys, etc. can sometimes turn out to be no worse than an advanced "signaling". And the smartphone, again, will add remote communication with the car to homemade products.

Mounting and powering a smartphone

Finally, an important digression. The descriptions of “alarm” applications do not say anything about the power supply of the smartphone, and not everyone will immediately think about it. However, the power of a smartphone, if you suddenly decide to use it as an “alarm”, is a special issue.

In the mode of enabled GPS and GSM, as well as with a constantly active G-sensor waiting for vibrations of the car body, the device will be discharged in a maximum of half a day. And if we use a “retired” old man or a new, but super-budget gadget, the battery of which is far from capacity and quality records, it’s good if the battery lasts for several hours ...

This means that you will have to arrange constant power for the phone. This is a simple matter, but requires some fiddling. First you need to find a place for a smartphone in the car - at the same time invisible during a superficial examination and relatively accessible so that you can perform some actions with touch screen if necessary. Well, for the GPS to work. These are, to put it mildly, mutually exclusive things, but we hope you can handle it.

After that, to the place where the smartphone will be hidden, you will have to bring the power wire from the point where 12 volts are constantly (regardless of the position of the ignition key). And then in the immediate vicinity of the smartphone, from these 12 volts you need to make 5 volts - using car charging with a microUSB plug on the cord.

At the same time, it should be noted that permanent connection phone to charge - acceptable, but not the most optimal solution... Yes, after the charge is completed, the battery controller goes into a seemingly safe standby compensation mode, but ...

Description:

Anti-Theft Alarm app will help prevent your device from being stolen. The anti-theft alarm can be used to deter family and friends who are very fond of spying when you are not using your tablet or phone. An alarm will sound if the device is moved or disconnected from the charger. The program is not bad to use to protect children from using the phone without permission. One of best apps to protect your device from thieves.
Application features:
- notification is displayed when Charger connected;
- the device detects movement, disconnection of charging;
- loud alarm;
- light signaling and vibration when an alarm is triggered.
The application "Anti-theft alarm" does not guarantee 100% protection of your device.


Main screen:

There are two main buttons on the screen:
- detection when the charger is off;
- detection when the phone is moving.
To protect your phone from unauthorized movement, click on the phone icon. After that, any attempt to move the phone will cause an "alarm". To unlock the lock, click on the same icon in the form of a phone and enter a four-digit code.

Settings:

In the settings of the "Anti-theft alarm" program, you can change the alarm signal, password, theme. It is also possible to set a grace period before an alarm. In the Pro version you will have access to automatic start applications after rebooting your device, new design templates, battery protection.