You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
833 B

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. /**************************************************************
  2. *
  3. * To run this tool you need StreamDebugger library:
  4. * https://github.com/vshymanskyy/StreamDebugger
  5. * or from http://librarymanager/all#StreamDebugger
  6. *
  7. * TinyGSM Getting Started guide:
  8. * http://tiny.cc/tiny-gsm-readme
  9. *
  10. **************************************************************/
  11. #include <TinyGsmClient.h>
  12. #include <StreamDebugger.h>
  13. char apn[] = "YourAPN";
  14. char user[] = "";
  15. char pass[] = "";
  16. StreamDebugger GsmSerial(Serial1, Serial);
  17. GsmClient gsm(GsmSerial);
  18. void setup() {
  19. // Set console baud rate
  20. Serial.begin(115200);
  21. delay(10);
  22. // Set GSM module baud rate
  23. GsmSerial.begin(115200);
  24. delay(3000);
  25. gsm.networkConnect(apn, user, pass);
  26. // Access AT commands from Serial
  27. GsmSerial.directAccess();
  28. }
  29. void loop() {
  30. }