please choosego to mobile | Continue to access the PC version
View: 31753|Reply: 12

OrangePi 2G-IOT GSM SMS,Call Phone,connect Internet

[Copy link]

10

threads

35

posts

305

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
305
Published in 2017-6-23 18:47:07 | Show all floors |Read mode
Edited by Buddy at 2017-6-23 18:47


OrangePi 2G-IOT Linux distro Modem User Manual

First! Thank you @Reinhard  share more important information to me, it's very useful to make Modem work well on Linux dirstro.
OrangePi 2G-IOT has support SMS, Call phone and connect Internel via ppp. People will utilize these function on different application.
So, I will share more information to introduce how to utilize modem on OrangePi 2G-IOT distro.

Contents
  •     OrangePi 2G-IOT Modem introduce
  •     OrangePi 2G-IOT Linux  SMS
  •     OrangePi 2G-IOT Linux  Call Phone
  •     OrangePi 2G-IOT Linux connect Internet via ppp
  •     More infromation

OrangePi 2G-IOT Modem Introduce
  • SoC – RDA Micro 8810PL ARM Cortex A5 processor @ up to 1.0 GHz with 2Gbit (256 MB) on-chip LPDDR2 RAM
  • 4Gbit (512 MB) on-chip SLC NAND flash
  • 256KB L2 cache, Vivante GC860 3D GPU
  • GSM/GPRS/EDGE Modem (Download datasheet)

OrangePi 2G-IOT Linux distro SMS
From OrangePi offical, OrangePi 2G-IOT Linux dirstro has support Ubuntu, Debian and Raspbian, these new dirstro all support SMS function.
You can get newest offical Image from  http://www.orangepi.cn/downloadresourcescn/ 。And before you utilize SMS on OrangePi 2G-IOT Linux dirstro,
Please prepare a SIM card that has been already activation.

  •     Dead Work
    First, you should prepare a SIM card. for example, I use an China Unicom SIM card.
    According frequency range of Modem, you can select different SIM from different Telecom operators.
    The frequency range that OrangePi 2G-IOT supports as follow:
    main frequency range
    other
    850
    900
    1800
    1900
    After got a SIM card, you should cut SIM card to suit SIM slot. The format of SIM slot on OrangePi 2G-IOT is micro.
    Now, you should plug SIM into SIM slot, as follow:

    Note! Absence of horns on the outside. eg
  • Login OrangePi
    You can utilze terminal or ssh to connect OrangePi, the band rate is 921600. Details refer offical user manual.
    Default account number: root/orangepi
    Default password: orangepi
  • Usage of SMS
    OrangePi 2G-IOT support different way to utilize SMS, such as terminal and C-program.
    I will introduce two way to utilize SMS on OrangePi 2G-IOT.
  • Terminal to SMS
    On hardware, CPU connect to Modem via serial port. When Linux startup, the system will register modem on /dev/modem0.
    CPU will exchange message via this virtual port. So, you can use terminal tools to connect Modem under /dev/modem0.
    The mainstream terminal tools is  "minicom", "picocom", "kermit" and so on. The default Linux dirstro doesn't install those tools,
    and you should install it firstly. such as
    1. sudo apt-get install minicom
    Copy code
    When finish installing minicom, you should configure minicom firstly. such as:
    1. sudo minicom -s
    Copy code
    Entry "Serial port setup"

    Push "A" to alter "Serial Device", and input /dev/modem0

    Now, we can input "AT" command to test Modem.
    If modem return OK, it means connect OK, we can input more AT command to control Modem.

    Then, configure modem mode as full function, use command "AT +CFUN=1",
    If command is successful implementation, termial will get some userful information. eg

    And then, you can select clearly mode but Modem also support Cipher mode,
    Input "AT +CMGF=1", If command is successful implementation ,terminal will return OK.

    Next, It's very import and fallible on this step, you should configure SMS center number.
    Differnet country and City has a unique SMS center number, If you set an incorrect number, SMS can work.
    So, please get correct SMS center number, you can search goolg to get correct SMS center number.
    We can use AT +CSCA="+86xxxx" to configure SMS center number.
    For example, The country code of China is +86, and the SMS center number of ShenZhen is 13010888500

    If command is successful implementation ,terminal will return OK.
    You can input "AT +CSCA?" to check current configure of SMS center number.
    Finally, we can use "AT +CMGS=+86xxx" to send message.
    The format of +86xxx contain Country Code and the number of receiver.
    For example, the country code of China is "+86" and the number of receiver is "135xxxxxxx"

    After input command, terminal will output a character ">", then we can input message that you want.
    When you finish input message, you should push Ctrl + Z to send message.
    If command is successful implementation ,terminal will return OK.

    Now, we have finish to send message via serial on OrangePi 2G-IOT.
  • Send message on C-Program
    The main routine is same with serial way, we also utilize terminal on C-program.
    You can write you program as follow:
    First, you should initlize serial

    Next, create function to send AT command:

    And then, send AT command stream

    Above is main routine of send message.
    Running this program:






    Finally, Receive message from OrangePi 2G-IOT


    Full C-program
    1. /*
    2. * OrangePi 2G-IOT GSM Demo
    3. *  (C) Copyright 2017 OrangePi
    4. */
    5. #include <stdio.h>
    6. #include <stdlib.h>
    7. #include <unistd.h>
    8. #include <fcntl.h>
    9. #include <string.h>
    10. #include <termios.h>
    11. #include <sys/types.h>
    12. #include <sys/stat.h>

    13. #define NR_CITY  30
    14. #define MODEM_PATH  "/dev/modem0"
    15. #define VERSION     "0.1.0"

    16. struct Centry_number {
    17.         char *city;
    18.         char *number;
    19. } City_Number[NR_CITY] = {
    20.         { "ShenZhen",           "13010888500" },
    21.         { "Beijing",            "13010112500" },
    22.         { "Shanghai",           "13010314500" },
    23.         { "Shandong",           "13010171500" },
    24.         { "Jiangsu" ,           "13010341500" },
    25.         { "Zhejiang",           "13010360500" },
    26.         { "Fujian",             "13010380500" },
    27.         { "Sichuan",            "13010811500" },
    28.         { "Chongqing",          "13010831500" },
    29.         { "Hainan" ,            "13010501500" },
    30.         { "Heilongjiang",       "13010980500" },
    31.         { "Jilin",              "13010911500" },
    32.         { "Tianjin",            "13010130500" },
    33.         { "Hebei",              "13010180500" },
    34.         { "Inner Mongolia",     "13010950500" },
    35.         { "Shanxi",             "13010701500" },
    36.         { "Anhui",              "13010305500" },
    37.         { "Xinjiang",           "13010969500" },
    38.         { "Qinghai",            "13010776500" },
    39.         { "Gansu",              "13010879500" },
    40.         { "Ningxia",            "13010796500" },
    41.         { "Guizhou",            "13010788500" },
    42.         { "Yunnan",             "13010868500" },
    43.         { "Hunan",              "13010731500" },
    44.         { "Hubei",              "13010710500" },
    45.         { "Guangdong",          "13010200500" },
    46.         { "Guangxi",            "13010591500" },
    47.         { "Henan",              "13010761500" },
    48.         { "Jiangxi",            "13010720500" },
    49.         { "Liaoning",           "13010240500"},
    50. };

    51. /*
    52. * Initialize serial  
    53. */
    54. void serial_init(int fd)
    55. {
    56.         struct termios options;

    57.         tcgetattr(fd, &options);
    58.         options.c_cflag |= (CLOCAL | CREAD);
    59.         options.c_cflag &= ~CSIZE;
    60.         options.c_cflag &= ~CRTSCTS;
    61.         options.c_cflag |= CS8;
    62.         options.c_cflag &= ~CSTOPB;
    63.         options.c_iflag |= IGNPAR;
    64.         options.c_oflag = 0;
    65.         options.c_lflag = 0;
    66.         cfsetispeed(&options, B9600);
    67.         cfsetospeed(&options, B9600);
    68.         tcsetattr(fd, TCSANOW, &options);
    69. }

    70. void display_message(int direction, const char *message)
    71. {
    72.         if (direction) {
    73.                 printf("Send Message ------> %s\n", MODEM_PATH);
    74.                 printf(">> %s\n", message);
    75.         } else {
    76.                 printf("Rece Message <------ %s\n", MODEM_PATH);
    77.                 printf("<< %s\n", message);
    78.         }
    79. }

    80. void Send_AT(int fd, const char *str1, const char *str2, const char *str3)
    81. {
    82.         char buff[128];
    83.         char answer[128];

    84.         memset(buff, 0, sizeof(buff));
    85.         if (str1 != NULL)
    86.                 strcpy(buff, str1);
    87.         if (str2 != NULL)
    88.                 strcat(buff, str2);
    89.         if (str3 != NULL)
    90.                 strcat(buff, str3);
    91.         write(fd, buff, strlen(buff));
    92.         display_message(1, buff);

    93.         memset(answer, 0, sizeof(answer));
    94.         sleep(1);
    95.         read(fd, answer, sizeof(answer));
    96.         display_message(0, answer);

    97. }

    98. int send(int fd, char *cmgf, char *cmgs, char *csca, char *message)
    99. {
    100.         /* AT Test */
    101.         Send_AT(fd, "AT\r", NULL, NULL);
    102.         /* Set Modem Full Function */
    103.         Send_AT(fd, "AT +CFUN=", "1", "\r");
    104.         /* Set CMGF */
    105.         Send_AT(fd, "AT +CMGF=", cmgf, "\r");
    106.         /* Set Message Centr Number */
    107.         Send_AT(fd, "AT +CSCA=", csca, "\r");
    108.         /* Set Receive Number */
    109.         Send_AT(fd, "AT +CMGS=", cmgs, "\r");
    110.         /* Send Message */
    111.         Send_AT(fd, message, NULL, NULL);
    112. }

    113. int Send_Message(int fd)
    114. {
    115.         char buff[128];
    116.         char num1[64];
    117.         char num2[64];
    118.         int i;
    119.         int choice;

    120.         printf("********* City Select **********\n");
    121.         for (i = 0; i < NR_CITY; i++)
    122.                 printf("[%2d] %s\n", i, City_Number[i].city);
    123.         printf("Please select your City!\n");
    124.         scanf("%d", &choice);
    125.         do {
    126.                 memset(num1, 0, sizeof(num1));
    127.                 printf("\nPlease Entry Receive phone number:\n");
    128.                 scanf("%s", num1);
    129.         } while (strlen(num1) != 11);

    130.         sleep(1);
    131.         memset(buff, 0, sizeof(buff));
    132.         printf("Please input Meesage:\n");
    133.         scanf("%s", buff);

    134.         /* Restruct buff */
    135.         i = strlen(buff);
    136.         buff[i] = 0x1A;
    137.         buff[i+1] = '\r';
    138.         buff[i+2] = '\0';

    139.         memset(num2, 0, sizeof(num2));
    140.         strcpy(num2, "+86");
    141.         strcat(num2, num1);

    142.         memset(num1, 0, sizeof(num1));
    143.         strcpy(num1, "+86");
    144.         strcat(num1, City_Number[choice].number);
    145.         
    146.         send(fd, "1", num2, num1, buff);
    147. }

    148. /*
    149. * Call Phone.
    150. */
    151. void Call_Phone(int fd)
    152. {
    153.         char buff[128];
    154.         char number[20];

    155.         do {
    156.                 memset(number, 0, sizeof(number));
    157.                 printf("\nPlease input phone number:");
    158.                 scanf("%s", number);
    159.         } while (strlen(number) != 11);

    160.         memset(buff, 0, sizeof(buff));
    161.         strcpy(buff, "+86");
    162.         strcat(buff, number);
    163.         strcat(buff, ";");

    164.         /* AT Test */
    165.         Send_AT(fd, "AT\r", NULL, NULL);
    166.         /* Call */
    167.         Send_AT(fd, "AT", " DT ", buff);
    168. }

    169. int main(int argc, char *argv[])
    170. {
    171.         int fd;
    172.         char choice;

    173.         fd = open(MODEM_PATH, O_RDWR | O_NOCTTY | O_NDELAY);
    174.         if (fd < 0) {
    175.                 printf("Can't open %s\n", MODEM_PATH);
    176.                 return -1;
    177.         }

    178.         /* Initialize /dev/modem0 */
    179.         serial_init(fd);
    180.         
    181.         printf("************************************************\n");
    182.         printf("\tWelcome to OrangePi 2G-IOT\n");
    183.         printf("\tModem version %s\n", VERSION);
    184.         printf("************************************************\n");
    185.         printf("Entry your select:\n");
    186.         printf("1. Send Message\n");
    187.         printf("2. Call Phone\n");
    188.         printf("3. Exit\n");
    189.         choice = getchar();

    190.         switch (choice) {
    191.         case '1':
    192.                         Send_Message(fd);
    193.                         break;
    194.         case '2':
    195.                         Call_Phone(fd);
    196.                         break;
    197.         default:
    198.                         break;
    199.         
    200.         }
    201.         close(fd);

    202.         return 0;
    203. }
    Copy code


OrangePi 2G-IOT Linux distro Call Phone


From OrangePi offical, OrangePi 2G-IOT Linux dirstro has support Ubuntu, Debian and Raspbian, these new dirstro all support Call Phone function.
You can get newest offical Image from  http://www.orangepi.cn/downloadresourcescn/ 。And before you utilize Call Phone on OrangePi 2G-IOT Linux dirstro,
Please prepare a SIM card that has been already activation.

  •     Dead Work
    First, you should prepare a SIM card. for example, I use an China Unicom SIM card.
    According frequency range of Modem, you can select different SIM from different Telecom operators.
    The frequency range that OrangePi 2G-IOT supports as follow:
    main Frequency range
    other
    850
    900
    1800
    1900
    After got a SIM card, you should cut SIM card to suit SIM slot. The format of SIM slot on OrangePi 2G-IOT is micro.
    Now, you should plug SIM into SIM slot, as follow:

    Note! Absence of horns on the outside. eg

    Plug headset
  • Login OrangePi
    You can utilze terminal or ssh to connect OrangePi, the band rate is 921600. Details refer offical user manual.
    Default account number: root/orangepi
    Default password: orangepi
  • Usage of Call Phone
    OrangePi 2G-IOT support different way to utilize Call Phone, such as terminal and C-program.
    I will introduce two way to utilize Call Phone on OrangePi 2G-IOT.
  • Terminal to Call Phone
    On hardware, CPU connect to Modem via serial port. When Linux startup, the system will register modem on /dev/modem0.
    CPU will exchange message via this virtual port. So, you can use terminal tools to connect Modem under /dev/modem0.
    The mainstream terminal tools is  "minicom", "picocom", "kermit" and so on. The default Linux dirstro doesn't install those tools,
    and you should install it firstly. such as
    1. sudo apt-get install minicom
    Copy code
    When finish installing minicom, you should configure minicom firstly. such as:
    1. sudo minicom -s
    Copy code
    Entry "Serial port setup"

    Push "A" to alter "Serial Device", and input /dev/modem0

    Now, we can input "AT" command to test Modem.
    If modem return OK, it means connect OK, we can input more AT command to control Modem.

    Then, use command AT DT "+86xxxxx;" . The format of "+86xxxxx;" contain country code, call number and a character ';'
    For example, the country code of China is "+86" and call numer is "xxxxxx", at last, adding ';'.
  • C-program
    The main routine of Call phone is same as serial way on C-program.
    So, at first, we should initialize serial.

    Then, create Send At function

    Final, Send AT command


    Running this C-program


    Full source code of Call Phone on OrangePi 2G-IOT
    1. /*
    2. * OrangePi 2G-IOT GSM Demo
    3. *  (C) Copyright 2017 OrangePi
    4. */
    5. #include <stdio.h>
    6. #include <stdlib.h>
    7. #include <unistd.h>
    8. #include <fcntl.h>
    9. #include <string.h>
    10. #include <termios.h>
    11. #include <sys/types.h>
    12. #include <sys/stat.h>

    13. #define NR_CITY  30
    14. #define MODEM_PATH  "/dev/modem0"
    15. #define VERSION     "0.1.0"

    16. struct Centry_number {
    17.         char *city;
    18.         char *number;
    19. } City_Number[NR_CITY] = {
    20.         { "ShenZhen",           "13010888500" },
    21.         { "Beijing",            "13010112500" },
    22.         { "Shanghai",           "13010314500" },
    23.         { "Shandong",           "13010171500" },
    24.         { "Jiangsu" ,           "13010341500" },
    25.         { "Zhejiang",           "13010360500" },
    26.         { "Fujian",             "13010380500" },
    27.         { "Sichuan",            "13010811500" },
    28.         { "Chongqing",          "13010831500" },
    29.         { "Hainan" ,            "13010501500" },
    30.         { "Heilongjiang",       "13010980500" },
    31.         { "Jilin",              "13010911500" },
    32.         { "Tianjin",            "13010130500" },
    33.         { "Hebei",              "13010180500" },
    34.         { "Inner Mongolia",     "13010950500" },
    35.         { "Shanxi",             "13010701500" },
    36.         { "Anhui",              "13010305500" },
    37.         { "Xinjiang",           "13010969500" },
    38.         { "Qinghai",            "13010776500" },
    39.         { "Gansu",              "13010879500" },
    40.         { "Ningxia",            "13010796500" },
    41.         { "Guizhou",            "13010788500" },
    42.         { "Yunnan",             "13010868500" },
    43.         { "Hunan",              "13010731500" },
    44.         { "Hubei",              "13010710500" },
    45.         { "Guangdong",          "13010200500" },
    46.         { "Guangxi",            "13010591500" },
    47.         { "Henan",              "13010761500" },
    48.         { "Jiangxi",            "13010720500" },
    49.         { "Liaoning",           "13010240500"},
    50. };

    51. /*
    52. * Initialize serial  
    53. */
    54. void serial_init(int fd)
    55. {
    56.         struct termios options;

    57.         tcgetattr(fd, &options);
    58.         options.c_cflag |= (CLOCAL | CREAD);
    59.         options.c_cflag &= ~CSIZE;
    60.         options.c_cflag &= ~CRTSCTS;
    61.         options.c_cflag |= CS8;
    62.         options.c_cflag &= ~CSTOPB;
    63.         options.c_iflag |= IGNPAR;
    64.         options.c_oflag = 0;
    65.         options.c_lflag = 0;
    66.         cfsetispeed(&options, B9600);
    67.         cfsetospeed(&options, B9600);
    68.         tcsetattr(fd, TCSANOW, &options);
    69. }

    70. void display_message(int direction, const char *message)
    71. {
    72.         if (direction) {
    73.                 printf("Send Message ------> %s\n", MODEM_PATH);
    74.                 printf(">> %s\n", message);
    75.         } else {
    76.                 printf("Rece Message <------ %s\n", MODEM_PATH);
    77.                 printf("<< %s\n", message);
    78.         }
    79. }

    80. void Send_AT(int fd, const char *str1, const char *str2, const char *str3)
    81. {
    82.         char buff[128];
    83.         char answer[128];

    84.         memset(buff, 0, sizeof(buff));
    85.         if (str1 != NULL)
    86.                 strcpy(buff, str1);
    87.         if (str2 != NULL)
    88.                 strcat(buff, str2);
    89.         if (str3 != NULL)
    90.                 strcat(buff, str3);
    91.         write(fd, buff, strlen(buff));
    92.         display_message(1, buff);

    93.         memset(answer, 0, sizeof(answer));
    94.         sleep(1);
    95.         read(fd, answer, sizeof(answer));
    96.         display_message(0, answer);

    97. }

    98. int send(int fd, char *cmgf, char *cmgs, char *csca, char *message)
    99. {
    100.         /* AT Test */
    101.         Send_AT(fd, "AT\r", NULL, NULL);
    102.         /* Set Modem Full Function */
    103.         Send_AT(fd, "AT +CFUN=", "1", "\r");
    104.         /* Set CMGF */
    105.         Send_AT(fd, "AT +CMGF=", cmgf, "\r");
    106.         /* Set Message Centr Number */
    107.         Send_AT(fd, "AT +CSCA=", csca, "\r");
    108.         /* Set Receive Number */
    109.         Send_AT(fd, "AT +CMGS=", cmgs, "\r");
    110.         /* Send Message */
    111.         Send_AT(fd, message, NULL, NULL);
    112. }

    113. int Send_Message(int fd)
    114. {
    115.         char buff[128];
    116.         char num1[64];
    117.         char num2[64];
    118.         int i;
    119.         int choice;

    120.         printf("********* City Select **********\n");
    121.         for (i = 0; i < NR_CITY; i++)
    122.                 printf("[%2d] %s\n", i, City_Number[i].city);
    123.         printf("Please select your City!\n");
    124.         scanf("%d", &choice);
    125.         do {
    126.                 memset(num1, 0, sizeof(num1));
    127.                 printf("\nPlease Entry Receive phone number:\n");
    128.                 scanf("%s", num1);
    129.         } while (strlen(num1) != 11);

    130.         sleep(1);
    131.         memset(buff, 0, sizeof(buff));
    132.         printf("Please input Meesage:\n");
    133.         scanf("%s", buff);

    134.         /* Restruct buff */
    135.         i = strlen(buff);
    136.         buff[i] = 0x1A;
    137.         buff[i+1] = '\r';
    138.         buff[i+2] = '\0';

    139.         memset(num2, 0, sizeof(num2));
    140.         strcpy(num2, "+86");
    141.         strcat(num2, num1);

    142.         memset(num1, 0, sizeof(num1));
    143.         strcpy(num1, "+86");
    144.         strcat(num1, City_Number[choice].number);
    145.         
    146.         send(fd, "1", num2, num1, buff);
    147. }

    148. /*
    149. * Call Phone.
    150. */
    151. void Call_Phone(int fd)
    152. {
    153.         char buff[128];
    154.         char number[20];

    155.         do {
    156.                 memset(number, 0, sizeof(number));
    157.                 printf("\nPlease input phone number:");
    158.                 scanf("%s", number);
    159.         } while (strlen(number) != 11);

    160.         memset(buff, 0, sizeof(buff));
    161.         strcpy(buff, "+86");
    162.         strcat(buff, number);
    163.         strcat(buff, ";");

    164.         /* AT Test */
    165.         Send_AT(fd, "AT\r", NULL, NULL);
    166.         /* Call */
    167.         Send_AT(fd, "AT", " DT ", buff);
    168. }

    169. int main(int argc, char *argv[])
    170. {
    171.         int fd;
    172.         char choice;

    173.         fd = open(MODEM_PATH, O_RDWR | O_NOCTTY | O_NDELAY);
    174.         if (fd < 0) {
    175.                 printf("Can't open %s\n", MODEM_PATH);
    176.                 return -1;
    177.         }

    178.         /* Initialize /dev/modem0 */
    179.         serial_init(fd);
    180.         
    181.         printf("************************************************\n");
    182.         printf("\tWelcome to OrangePi 2G-IOT\n");
    183.         printf("\tModem version %s\n", VERSION);
    184.         printf("************************************************\n");
    185.         printf("Entry your select:\n");
    186.         printf("1. Send Message\n");
    187.         printf("2. Call Phone\n");
    188.         printf("3. Exit\n");
    189.         choice = getchar();

    190.         switch (choice) {
    191.         case '1':
    192.                         Send_Message(fd);
    193.                         break;
    194.         case '2':
    195.                         Call_Phone(fd);
    196.                         break;
    197.         default:
    198.                         break;
    199.         
    200.         }
    201.         close(fd);

    202.         return 0;
    203. }
    Copy code


OrangePi 2G-IOT Linux connect Internet via pppFrom OrangePi offical, OrangePi 2G-IOT Linux dirstro has support Ubuntu, Debian and Raspbian, these new dirstro all support connect Internet via ppp.
You can get newest offical Image from  http://www.orangepi.cn/downloadresourcescn/ 。And before you utilize ppp on OrangePi 2G-IOT Linux dirstro,
Please prepare a SIM card that has been already activation.

  •     Dead Work
    First, you should prepare a SIM card. for example, I use an China Unicom SIM card.
    According frequency range of Modem, you can select different SIM from different Telecom operators.
    The frequency range that OrangePi 2G-IOT supports as follow:
    Main Frequency Other
    850
    900
    1800
    1900
    After got a SIM card, you should cut SIM card to suit SIM slot. The format of SIM slot on OrangePi 2G-IOT is micro.
    Now, you should plug SIM into SIM slot, as follow:

    Note! Absence of horns on the outside. eg
  • Login OrangePi
    You can utilze terminal or ssh to connect OrangePi, the band rate is 921600. Details refer offical user manual.
    Default account number: root/orangepi
    Default password: orangepi
  • Utilize ppp to connect Internet
    OrangePi 2G-IOT currently support GSM to connect Internet, and base on ppp and wvdial tools.
    First, you should install tools on OrangePi 2G-IOT, such as:
    1. sudo apt-get install ppp wvdial
    Copy code
    Then, alter /etc/wvdial.conf to configure wvdial
    1. [Dialer defaults]
    2. ISDN = 0
    3. Modem Type = Analog Modem
    4. Phone = *99***1#
    5. Stupid Mode = 1
    6. Dial Command = ATDT
    7. Modem = /dev/modem0
    8. Baud = 460800
    9. Init1 = AT+COPS=0
    10. Init2 = AT+CFUN=1
    11. Init3 = AT+CGATT=1
    12. Init4 = AT+CGDCONT=1,"IP","OrangePi_2G-IOT","",0,0
    13. Init5 = AT+CGACT=1,1
    14. Username = " "
    15. Password = " "
    Copy code
    Next, alter /etc/ppp/peers/wvdial to configure ppp
    1. noauth
    2. name wvdial
    3. defaultroute
    4. replacedefaultroute
    Copy code
    Final, connect Internal via wvdial
    1. wvdial Tom &
    Copy code

    Check net state

    Utilize "ping" to test Internel state

This thread contains more resources

You need to Log in to download or view,No account?    Register

x

0

threads

18

posts

509

credits

Senior member

Rank: 4

credits
509
Published in 2017-6-24 14:43:32 | Show all floors
Very good work! Thank you!
███ Greatings from Germany ███
███             Reinhard              ███
███                                       ███

3

threads

62

posts

950

credits

Senior member

Rank: 4

credits
950
Published in 2017-6-24 19:18:15 | Show all floors
Thank you!
Reply

Use magic report

3

threads

19

posts

87

credits

Registered member

Rank: 2

credits
87
Published in 2017-9-14 17:43:36 from mobile | Show all floors
Thanks for the awesome instruction! Very good work

3

threads

19

posts

87

credits

Registered member

Rank: 2

credits
87
Published in 2017-9-14 17:51:13 from mobile | Show all floors
Thanks for the awesome instruction! Only one question, I am beginner on Linux and I am having trouble configuring the wvdial and ppp. How can I better know What I should fill in on the Fields of configuration wvdial and ppp? Should I let the fields as you let there on the post? How can I exit the this editor right after? Actually I always get stuck and need to close the session on the PuTTy to reboot the Orange Pi 2g iot manually because of this. Can anybody help me out on this?

3

threads

15

posts

211

credits

Intermediate member

Rank: 3Rank: 3

credits
211
Published in 2017-9-15 04:11:32 | Show all floors
Hello, welcome to community. Nano text editor can be closed with Ctrl+X. Tell which carrier are you using, since settings must be changed, especialy APN of operator.

3

threads

19

posts

87

credits

Registered member

Rank: 2

credits
87
Published in 2017-9-15 08:02:53 | Show all floors
I am using VIVO. A brazilian carrier, I tried to input Info I captured for example APN I believe it is "zap.vivo.com.br" but don't know exactly how i can have high confidence level on this info. Please see pics attached

I know 100% that my SIM Card has credits haha

This thread contains more resources

You need to Log in to download or view,No account?    Register

x

0

threads

11

posts

140

credits

Registered member

Rank: 2

credits
140
Published in 2017-9-15 11:25:14 | Show all floors
is the audio from 2g iot jack works?? ,if it works can it play mp3 audio file ??

0

threads

3

posts

36

credits

Novice

Rank: 1

credits
36
Published in 2017-10-27 20:38:59 | Show all floors
LucasBSC replied at 2017-9-15 08:02
I am using VIVO. A brazilian carrier, I tried to input Info I captured for example APN I believe it  ...

Same here using "claro.com.br"... SMS and calls are  working but not reliable.

0

threads

11

posts

140

credits

Registered member

Rank: 2

credits
140
Published in 2017-11-14 15:33:42 | Show all floors
after first boot at+cops=0 always failed show "modem not responding", did u get the same condition?
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list