Hallo zusammen,
ich möchte ein NodeMCU V2 ESP 8266 (Arduino) mit einem SIM 800L Modul
verbinden. Das Netz ist voll mit verschiedenen Beispielen, leider
funktioniert keines.
Das ESP Modul bekommt seine Spannung über die USB Schnittstelle.
Masse ist zwischen ESP und SIM 800 gebrückt.
SIM TX geht auf PIN D7 vom ESP
SIM RX geht auf PIN D8 vom ESP
RESET des SIM (VCC oder Tristate)
SIM VCC über externes Netzteil das einen Strom auch über 2A liefern
kann. (3,7 V)
Das Sim 800 Modul blinkt in ca 800ms Takt.
SIM Karte ist eingelegt und besitzt keine PIN Sperre.
Ich scheitere schon dabei die AT Befehle zu senden und überhaupt ein
"OK" zurück zu bekommen. (Den RX und TX Pin habe ich auch schon
vertauscht).
Im Terminal ist das Senden mit NL und CR aktiviert.
Ich habe folgende zwei Beispiele aus den Anleitungen kopiert:
1 | #include <SoftwareSerial.h>
|
2 |
|
3 | String Arsp, Grsp;
|
4 | SoftwareSerial gsm(7, 8); // RX, TX
|
5 |
|
6 | void setup()
|
7 | {
|
8 | // put your setup code here, to run once:
|
9 |
|
10 | Serial.begin(4800);
|
11 | Serial.println("Testing GSM SIM800L");
|
12 | gsm.begin(4800);
|
13 |
|
14 | }
|
15 |
|
16 | void loop()
|
17 | {
|
18 | // put your main code here, to run repeatedly:
|
19 |
|
20 | if(gsm.available())
|
21 | {
|
22 | Grsp = gsm.readString();
|
23 | Serial.println(Grsp);
|
24 | }
|
25 |
|
26 | if(Serial.available())
|
27 | {
|
28 | Arsp = Serial.readString();
|
29 | Serial.println(Arsp);
|
30 | gsm.println(Arsp);
|
31 | }
|
32 |
|
33 | }
|
auch folgendes Beipiel brachte keine Verbindung:
(Auch hier habe ich schon RX und TX mehrfach getauscht)
1 | #include <GSMSim.h>
|
2 | #include <SoftwareSerial.h>
|
3 |
|
4 | #define RX 8
|
5 | #define TX 7
|
6 | #define RESET 3
|
7 | #define BAUD 4800
|
8 |
|
9 |
|
10 | GSMSim gsm(RX, TX);
|
11 |
|
12 | /*
|
13 | * Also you can this types:
|
14 | * GSMSim gsm;
|
15 | * GSMSim gsm(RX, TX);
|
16 | * GSMSim gsm(RX, TX, RESET, LED_PIN, LED_FLAG);
|
17 | */
|
18 |
|
19 |
|
20 | void setup() {
|
21 | // put your setup code here, to run once:
|
22 |
|
23 | Serial.begin(9600);
|
24 |
|
25 | Serial.println("GSMSim Library - Module Information");
|
26 | Serial.println("");
|
27 | delay(1000);
|
28 |
|
29 | //gsm.start(); // baud default 9600
|
30 | gsm.start();
|
31 |
|
32 |
|
33 | Serial.print("Manufacturer:\t\t");
|
34 | Serial.println(gsm.moduleManufacturer());
|
35 | delay(250);
|
36 | Serial.print("Model:\t\t\t");
|
37 | Serial.println(gsm.moduleModel());
|
38 | delay(250);
|
39 | Serial.print("Revision:\t\t");
|
40 | Serial.println(gsm.moduleRevision());
|
41 | delay(250);
|
42 | Serial.print("IMEI:\t\t\t");
|
43 | Serial.println(gsm.moduleIMEI());
|
44 | delay(250);
|
45 | Serial.print("IMSI:\t\t\t");
|
46 | Serial.println(gsm.moduleIMSI());
|
47 | delay(250);
|
48 | Serial.print("ICCID:\t\t\t");
|
49 | Serial.println(gsm.moduleICCID());
|
50 | delay(250);
|
51 | Serial.print("Is Connected?:\t\t");
|
52 | Serial.println(gsm.isRegistered());
|
53 | delay(250);
|
54 | Serial.print("Signal Quality:\t\t");
|
55 | Serial.println(gsm.signalQuality());
|
56 | delay(250);
|
57 | Serial.print("Operator:\t\t");
|
58 | Serial.println(gsm.operatorName());
|
59 | delay(250);
|
60 | Serial.print("Operator From Sim:\t");
|
61 | Serial.println(gsm.operatorNameFromSim());
|
62 | delay(250);
|
63 | }
|
64 |
|
65 | void loop() {
|
66 | // put your main code here, to run repeatedly:
|
67 |
|
68 | }
|
als Ausgabe erhalte ich:
1 | GSMSim Library - Module Information
|
2 |
|
3 | Manufacturer:
|
4 | Model:
|
5 | Revision:
|
6 | IMEI:
|
7 | IMSI:
|
8 | ICCID:
|
9 | Is Connected?: 0
|
10 | Signal Quality: 99
|
11 | Operator: NOT CONNECTED
|
12 | Operator From Sim: NOT CONNECTED
|
Kann mir bitte jemand weiterhelfen?
Vielen Dank!