📜 ⬆️ ⬇️

How to make sim900a work in our networks

To start the background information:
sim900 is a representative of the new generation of budget GSM / GPRS modules from SIMCom.
Sim900a - analog sim900, intended for use in the Asian market, does not work with Russian operators.




Visual inspection


So, I got the sim900a mini v3.8.2 module, based on the very sim900a. A visual inspection showed that the MAX232 signal converter is present on the module, which makes it possible to quickly connect the module to the com com port for detailed research. Also, the module has outputs with a TTL level, which makes it possible to use it with arduino. Also, from the features of the scheme, it was noted that there is no software control on / off the module, but it is easy to fix, which is likely to be done. There are no outputs to the microphone and headphones, also have to unsolder.

')
Next, we study the datasheet, everything is very rosyly painted on 47 pages. The first thing we need is to power the module. On the board, VCC 5 is written, 3.2V - 4.8V is written in the datasheet, however, two paragraphs below, a 4.1V connection is provided. Actually, both sim900 and sim900a will be very picky about nutrition. It also becomes clear that the old sims on 5V will not work in it ... For them, you need to fence the converter based on Max1686.

Following the instructions of the datasheet, we take the Li-ion battery of the 18650 form factor at 3.7V, and it will serve as a power supply for us.


Connection


Now we are dealing with a com port, we are sure to put 2 jumpers, as shown in the photo. On whom we need 2, 3 and 5 legs, on the module it is 1, 2 and 3, respectively.


We insert a SIM card (it is advisable to check its performance in the phone beforehand), we connect a com port, we supply power to the module. To communicate with the module, we need a terminal. Under Windows, I use either the terminal program or putty.

In the factory settings of the module, automatic speed selection is set, but for its correct operation it is necessary when the first AT command is sent, the AT is written in one register.

Visually I observe that the status LED blinks, we look at the datasheet, there are 3 modes:

In my case, this is 1 option.

We go to understand why we could not register. We launch our favorite terminal, connect to the desired port.
Check if Simka requires entering a pin code:
AT + CPIN?
If the SIM requires PIN or PUK code, then you will receive a SIM PIN or SIM PUK answer, respectively.
After entering the PIN code:
AT + CPIN = 0000
We check the status again. In my case, I saw:
+ CPIN: PH-NET PIN
This means that the module is locked to certain SIM cards and it will not work with your SIM card.
In this case, either use the card of the Asian operator, or reflash the module. However, in order not to do extra work, first we will check to see if the module of the network is at all. This can be done with the command:
AT + COPS =?
After some waiting for the scan range in search of the network, we see approximately the following answer:
+ COPS: (2, "MGTS", "", "25001"), (1, "MegaFon RUS", "MegaFon", "25002"), (1, "Beeline", "Beeline", "25099") ,, (0,1,4), (0,1,2)

Each bracket is a network. The first digit is the status of this network. 0 is unknown, 1 is available for registration, 2 is the network corresponding to the SIM card operator, 3 is the blocked network. The remaining network parameters are their identifiers.
If you saw your network (first digit = 2). Then there are hopes that you can reanimate the module and make it work.

Flashing!


This is a separate big story, but I will describe the main points of the flashing.
Searching on the Internet for possible firmware versions, I came across the fact that these modules come with flash memory capacities of 32 and 64 megabytes. There is a special program for flashing them. And many versions of firmware for different versions of modules. For example, here
I was not lucky, I got a 32-megabyte module, and there are very few firmwares for them. Instructions for flashing the module reads as follows. Run the program for flashing, choose the required version, press the start button of the fill ,
After that, hold down the power button of the module and hold it down until the start of the firmware upload. But as we found out earlier, we do not have a power on / off button for the module, this mini-version turns on at the time of power-up and remains on for the entire time. Therefore, in our version, we de-energize the module completely, start the fill program, select the required version, and all the settings, click on the button to start uploading the firmware to the module, then supply power to the module.
However, before you start doing something, prepare the module:

In order not to drag the cat by the tail for a long time, I’ll immediately open the cards and say that if you have a 32 megabyte version, you can only make sim900b working in our regions using firmware version 1137B09SIM900B32_ST from your module. If you got a 64-bit module, then you have the opportunity to get a full-fledged sim900 with firmware: 1137B02SIM900M64_ST_ENHANCE
So, reshuffled, rebooted the module. We start all over again. Check the status of the SIM card:
AT + CPIN?
+ CPIN: SIM PIN
If so, then enter the pin:
AT + CPIN = 0000
Ok
We check that the card accepted the code and the module is ready to work with it:
AT + CPIN?
+ CPIN: READY
Check the status of registration in the network:
AT + CREG?
+ CREG: 0.1
The first digit is auto-registration enabled, the second one is registered. We look at the diode, which displays the status, the indication corresponds to the documentation about successful registration in the network.
Check which network the module is registered in:
AT + COPS?
+ COPS: 0.0, "MTS-RUS"
Check balance:
AT + CUSD = 1, "* 100 #"
Ok
+ CUSD: 0, "041C0438043D04430441003A003400360032002C003700310440002C041B0438043C04380442003A003300300030003004400020", 72
This is unicode (USC2), decoded:
Minus: 462,71r, Limit: 3000r
We have not yet rested against the limit, you can try to send SMS (take care that your terminal knows how to send service characters, to indicate the end of the sent SMS, use the symbol with code 26)
AT + CMGF = 1
AT + CMGS = "+ 790 ........"
> Privet! Davay posmotrim film!
> (Alt +26)
+ CMGS: 3
SMS sent!
Now we will try to call:
ATD + 790 .........;
+ COLP: "+790 .........", 145, "", 0, ""
Put the phone down:
ATH
Ok
Please note that in the ATD command, the semicolon ";" is required at the end!
If you see "NO CARRIER" then the phone number is dialed incorrectly.
The module is working! What should be achieved. In the following articles, the iron revision of the module and its use with the Arduino.
Useful links:
Official website of the manufacturer
The official representative of simcom in Russia
A page with links to docks mod sim900
Module specification
Signal converter for sim card
Collection of firmware for sim800 and sim900 modules
AT Commands Module Specification
Article about flashing sim900

Source: https://habr.com/ru/post/391555/


All Articles