How do I call the “AT command” of the GSM modem in the codeys? Not a standard Send_SMS and E.T.C

I have a gsm-modem and plc, plc sees a modem (I use *.lib and the function block “openPort”), but I don’t understand how to write “in the modem” at command”, such as “ate0”.
First, in order to increase your understanding of AT commands, please read V. 250 specification. This will make you an AT command expert.

Then for the actual implementation, I don’t know codesys, so the following is the pseudo code of the structure that should have to process AT commands:< /p>

the_modem = openPort();
...
// start sending ATE0
writePort(the_modem, "ATE0 ");
do {
line = readLinePort(the_modem);
} while (! is_final_result_code(line))
// Sending of ATE0 command finished (successfully or not)
...
closePort(the_modem);

Whatever you do, never use delay, sleep or similar instead of waiting for the final result code. You can view the code of atinout as an example of the is_final_result_code function ( You can also compare with isFinalResponseError and isFinalResponseSuccess in ST-Ericsson’s U300 RIL, but please note that CONNECT is not the final result code, it is the intermediate result code, so the name isFinalResponseSuccess is 100% correct).

I have a gsm-modem and plc, plc sees a modem (I use *.lib and the function block “openPort”), but I don’t understand how to write “at command” in the modem, For example, “ate0” .

First, in order to increase your understanding of AT commands, please read the V. 250 specification. This will enable You become an AT command expert.

Then for the actual implementation, I don’t know codesys, so the following is the pseudo-code of the structure that AT commands should have:

the_modem = openPort();
...
// start sending ATE0
writePort(the_modem, "ATE0 ");
do {
line = readLinePort(the_modem);
} while (! is_final_result_code(line))
// Sending of ATE0 command finished (successfully or not)
...
closePort(the_modem);

Whatever you do, never use delay, sleep or similar instead of waiting for the final result code. You can view the code of atinout as an example of the is_final_result_code function (you can also check the ST- Compare with isFinalResponseError and isFinalResponseSuccess in Ericsson’s U300 RIL, but please note that CONNECT is not the final result code, it is the intermediate result code, so the name isFinalResponseSuccess is 100% correct).

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3013 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.