Author Topic: SIM900 module connection problem (SOLVED)  (Read 3734 times)

0 Members and 1 Guest are viewing this topic.

Offline MerlynTopic starter

  • Contributor
  • Posts: 35
SIM900 module connection problem (SOLVED)
« on: November 18, 2020, 02:04:37 pm »
Hi,

I got this module recently and it wouldn't neither connect to the NodeMCU ESP-12E not it could detect the network. So I flashed the firmware successfully via PC's COM port (which I assume means Tx/Rx lines are OK). Now the module can detect the network (status LED flashes every 3 secs and when I call the card it gives me free signal) but NodeMCU can't connect to the module. I used every tool in Arduino IDE and the message they all give is cannot initialize modem.
I did some PCB tracing and measurements which I found somewhat odd. To make things more complicated the schematics floating around turned out to be for different versions of this module and with some mistakes so I compiled the one below according to what I found on my module.
The other thing I noticed on the scope is that signal at pin 9 is OK in amplitude but after R8 it's very weak at ~1V (maybe that's why it can't communicate with the MCU?). Also voltage drop across one of the MOSFETs is much bigger than the other. It looks like there's something going on with this MOSFET but since my main field of expertise is away from things like this I would need your advice on this one. 
I ordered some replacement MOSFETs just in case but since NodeMCU Tx/Rx lines are 3.3V I was wondering if I can remove those and connect directly to R8/R9 (T3V/R3V)?
Voltages in yellow are when module is connected only to PSU. In green when connected to the MCU. 5V PSU used.


« Last Edit: November 29, 2020, 07:15:24 pm by Merlyn »
 

Offline MerlynTopic starter

  • Contributor
  • Posts: 35
Re: SIM900 module connection problem
« Reply #1 on: November 21, 2020, 06:10:58 pm »
Replaced the MOSFETS without any effect. Flashed the module twice successfully. Still no connection. No signal at Tx from module.
 

Offline MerlynTopic starter

  • Contributor
  • Posts: 35
Re: SIM900 module connection problem
« Reply #2 on: November 24, 2020, 08:58:48 pm »
I was able to establish communication with the module from the PC COM port with several terminal programs. It accepts and responds to AT commands. I was also able to make a phone call which means the module itself is working properly. The question is why it doesn't connect to the NodeMCU? Does it have anything to do with the fact NodeMCU uses the same Tx/Rx line for USB connection or it's a software problem?
 

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1716
  • Country: pt
    • VMA's Satellite Blog
Re: SIM900 module connection problem
« Reply #3 on: November 24, 2020, 10:44:29 pm »
Just a side note: SIM900 does only GSM, if I recal it correctly. Many providers have dropped GSM support meanwhile. Not the best platform to start with.

Cheers,
Vitor

Offline MerlynTopic starter

  • Contributor
  • Posts: 35
Re: SIM900 module connection problem
« Reply #4 on: November 25, 2020, 09:20:03 am »
Thanks. I'll be using it for simple thing like switch remotely this and that. Also to transmit data from few sensors (Blynk). The 2G network here is not going anywhere anytime soon so I guess it will do the job.
« Last Edit: November 25, 2020, 09:23:38 am by Merlyn »
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: SIM900 module connection problem
« Reply #5 on: November 25, 2020, 09:24:32 am »
Just a side note: SIM900 does only GSM, if I recal it correctly. Many providers have dropped GSM support meanwhile. Not the best platform to start with.

Cheers,
Vitor

Any sources to support these strong claims?
 

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1716
  • Country: pt
    • VMA's Satellite Blog
Re: SIM900 module connection problem
« Reply #6 on: November 25, 2020, 10:22:43 am »
Just a side note: SIM900 does only GSM, if I recal it correctly. Many providers have dropped GSM support meanwhile. Not the best platform to start with.

Cheers,
Vitor

Any sources to support these strong claims?

Just do a simple Google search "2G shutdown".

I selected a few links for you:

https://www.digi.com/blog/post/2g-3g-4g-lte-network-shutdown-updates
https://www.techuk.org/insights/reports/item/16165-the-potential-impact-of-switching-off-2g-in-the-uk
https://www.smartcitiesworld.net/news/news/not-so-fast-2g-switch-off-could-impact-smart-meters-the-elderly-and-critical-services-4701
https://www.emnify.com/blog/global-2g-phase-out
https://en.wikipedia.org/wiki/2G

From the last link:

"Various carriers have made announcements that 2G technology in the United States, Japan, Australia, and other countries is in the process of being shut down, or have already shut down 2G services so that carriers can reclaim those radio bands and re-purpose them for newer technologies (e.g. 4G LTE).[9][10]"

The page shows a table with the 2G shutdown status in different countries.

The problem is simple: the bandwidth used by 2G has many pretenders for newer protocols, hence there is big pressure to shutdown 2G.

On the other side, there are many automated systems, that rely on 2G, which would need update or replacement.

Anyway, I stand by my "strong claim" that at this point it is not wise to start a new project based on GSM (2G). OP should consider 4G, depending on the nature of his project and his location in the world (to determine the roadmap for the 2G shutdown).

Regards,
Vitor

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: SIM900 module connection problem
« Reply #7 on: November 25, 2020, 02:48:23 pm »
Okay, so if the US and Australia shuts off something, does not mean everyone.  Do not generalize.

Shutting down 2G/GSM network is a pretty dangerous decision without prior thorough research of the situation, as there is quite some industrial and other critical infrastructure, that uses it. I am confident that in EU 2G is not going down any time soon  >:D
 

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1716
  • Country: pt
    • VMA's Satellite Blog
Re: SIM900 module connection problem
« Reply #8 on: November 25, 2020, 06:38:50 pm »
Okay, so if the US and Australia shuts off something, does not mean everyone.  Do not generalize.

Shutting down 2G/GSM network is a pretty dangerous decision without prior thorough research of the situation, as there is quite some industrial and other critical infrastructure, that uses it. I am confident that in EU 2G is not going down any time soon  >:D

Have you made the effort to look at the links I provided? Why do you say "Do not generalize."?

A few examples in Europe:

- Wiki: "Mobile Netherlands will shut down 2G services by 15 November 2020." --> That was 10 days ago! Not sure if it happend, as I am in Portugal, but perhaps someone can confirm.
- Wiki: "Swisscom will cease 2G services due to their "public service requirements" only by 1 January 2021."
- Germany: Bye bye 3G - now LTE is coming for everyone --> Note: it says 3G and doesn't even mention 2G!!! Source: https://www.telekom.com/en/media/media-information/archive/bye-bye-3g-now-lte-is-coming-for-everyone-608220 --> Note that this a communication from German Telekom itself!

I stand 100% to what I wrote! The operators and goverments don't give a sh*t to what "critical" infrastructure might be affected. Instead they will actually consider this an incentive to increase the economy due to required upgrades.

Nobody wants 2G anymore, except those that rely on ancient hardware they don't want to upgrade. Is it fair that because of these few, the majority does not get access to 4G/5G in those frequencies? From this point of view it simply makes no sense to maintain 2G or even 3G! Everyone wants a fast mobile network.

And yes, I own a SIM900 myself and I know it will be obsolete, soon. Which is why it was so cheap to begin with.

Regards,
Vitor

Offline MerlynTopic starter

  • Contributor
  • Posts: 35
Re: SIM900 module connection problem
« Reply #9 on: November 25, 2020, 10:24:07 pm »
I finally managed to get the module going by implementing Softwareserial. It turns out NodeMCU can't handle another uart connection at TX0/RX0. Another thing to try would be Serial.Swap but being a novice I still can't figure out how to do it for example here (hopefully without loosing the serial terminal):


Code: [Select]
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

// Select your modem:
//#define TINY_GSM_MODEM_SIM800
#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_M590
//#define TINY_GSM_MODEM_A6

// Default heartbeat interval for GSM is 60
// If you want override this value, uncomment and set this option:
#define BLYNK_HEARTBEAT 8

#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "token";

// Your GPRS credentials
// Leave empty, if missing user or pass
char apn[]  = "My Telecom";
char user[] = "";
char pass[] = "";

// Hardware Serial on Mega, Leonardo, Micro
// #define SerialAT Serial1

// or Software Serial on Uno, Nano
#include <SoftwareSerial.h>
SoftwareSerial SerialAT(14, 12); // RX, TX

TinyGsm modem(SerialAT);

void setup()
{
  // Debug console
  Serial.begin(115200);

  delay(10);

  // Set GSM module baud rate
  SerialAT.begin(115200);
  delay(3000);

  // Restart takes quite some time
  // To skip it, call init() instead of restart()
  Serial.println("Initializing modem...");
  modem.restart();

  // Unlock your SIM card with a PIN
  //modem.simUnlock("0000");

  Blynk.begin(auth, modem, apn, user, pass);
}

void loop()
{
  Blynk.run();
}

I'm aware of the 2G situation but it looks like 2G will be still available in most countries in Europe.
« Last Edit: November 25, 2020, 10:41:37 pm by Merlyn »
 

Offline MerlynTopic starter

  • Contributor
  • Posts: 35
Re: SIM900 module connection problem
« Reply #10 on: November 29, 2020, 07:15:07 pm »
After some experimenting I'm now running the module on Tx/Rx pins. My serial monitor for debugging purposes doesn't output much and maybe that allows for the module to run without interruptions.
What I did in the example above is to uncomment SofwareSerial and  change #define SerialAT Serial1 to #define SerialAT Serial.
So after all it was not a hardware problem.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf