Instructing the GSM/GPRS Modem or Mobile Phone to Operate in SMS Text Mode

Instructing the GSM/GPRS Modem or Mobile Phone to Operate in SMS Text Mode

First, enter the command line "AT+CMGF=1" in a terminal program (for example, HyperTerminal in Microsoft Windows) to instruct the GSM/GPRS modem or mobile phone to operate in SMS text mode. This step is necessary because the default mode is SMS PDU mode. Below shows the response returned from Nokia 6021 to HyperTerminal after the execution of the command line "AT+CMGF=1":

 

AT+CMGF=1
OK

 

The final result code OK indicates the +CMGF AT command was executed successfully. If the final result code ERROR is returned, it is likely that the GSM/GPRS modem or mobile phone does not support SMS text mode. To check whether the GSM/GPRS modem or mobile phone supports SMS text mode, enter the command line "AT+CMGF=?" in the terminal program. Here is the response returned from Nokia 6021 to HyperTerminal:

 

AT+CMGF=?
+CMGF: (0,1)

OK

 

The values in the parentheses indicate the modes that the GSM/GPRS modem or mobile phone can operate in. The value 0 represents SMS PDU mode and the value 1 represents SMS text mode. From the above response, we know that Nokia 6021 can operate in either SMS PDU mode or SMS text mode. See the section titled "Selecting the Operating Mode (AT+CMGF) " of this SMS tutorial if you want to learn further details about the +CMGF AT command.

 

Setting the SMSC Number to be Used to Send SMS Text Messages

Second, use the AT command +CSCA (command name in text: Service Centre Address) to set the SMSC number to be used to send SMS text messages. Usually the default setting is correct and you do not need to make any changes. Below demonstrates how to use the +CSCA AT command to set "+85290000000" as the SMSC number:

 

AT+CSCA="+85290000000"
OK

 

Detailed information about the +CSCA AT command can be found in the "Setting or Reading the Service Center Address / SMSC Address (AT+CSCA) " section of this SMS tutorial.

 

Sending Text Messages

Third, use the +CMGS AT command to send a text message to the SMSC. Suppose you want to send a text message to the mobile phone number +85291234567, you should enter something like this in a terminal program:

 

AT+CMGS="+85291234567"

 

Then, press the Enter key of the keyboard to send a carriage return character to the GSM/GPRS modem or mobile phone. The GSM/GPRS modem or mobile phone will send back a prompt formed by four characters. They are the carriage return character, the linefeed character, the ">" character and the space character. If all characters are to be displayed, the characters you have sent to and received from the GSM/GPRS modem or mobile phone so far are:

 

AT+CMGS="+85291234567"<CR>
<CR><LF> ><Space>

 

However, the carriage return character and linefeed character have special meanings to a terminal program. When a terminal program sees a carriage return character, it moves the cursor to the beginning of the current line. When it sees a linefeed character, it moves the cursor to the same position on the next line. So, here is what you will actually see in a terminal program such as HyperTerminal:

 

AT+CMGS="+85291234567"

 

If you want to cancel the send command at this point, press the Esc key on the keyboard. The GSM/GPRS modem or mobile phone will then return the OK final result code. Here shows the response returned from Nokia 6021:

 

AT+CMGS="+85291234567"

  OK

 

Some mobile devices return a slightly different response. One example is Philips 598:

 

AT+CMGS="+85291234567"


OK

 

If you do not want to cancel the send command, enter the body of the SMS text message that you want to send from your computer / PC. Press Enter on the keyboard if you want to start a new line. When finished, press Ctrl+z on the keyboard. The GSM/GPRS modem or mobile phone then attempts to send the SMS text message to the SMSC and returns a response to the computer / PC. Suppose the SMS text message is "It is easy to send text messages.". Below shows what you should see in a terminal program:

 

AT+CMGS="+85291234567"
> It is easy to send text messages.
+CMGS: 12

OK

 

The value in the information response, 12, is the message reference number allocated to the SMS text message. The final result code OK indicates the sending of the SMS text message was successful. If the execution of the +CMGS AT command fails, the GSM/GPRS modem or mobile phone will return either the final result code ERROR or +CMS ERROR.

### CPU Core-to-Core Latency Measurement and Optimization Core-to-core latency refers to the time taken for one processing unit within a multi-core processor to communicate with another. For AMD's Ryzen CPUs, using the Epyc model definition in QEMU can influence how these cores interact by defining structures and caches of the CPU[^1]. However, specific measurements require dedicated tools or methods. #### Tools and Methods for Measuring Core-to-Core Latency To accurately measure core-to-core latency: - **Performance Counters**: Utilize hardware performance counters available through Linux perf events. ```bash sudo perf stat -e cycles,instructions ./your_application ``` - **Micro-benchmarks**: Develop micro-benchmark applications specifically designed to test inter-core communication times. These programs typically involve sending messages between different cores while measuring response times. - **Oprofile/Valgrind Callgrind**: Although primarily profiling utilities, they offer insights into program execution paths which might indirectly help understand latencies involved during context switches across multiple cores. #### Factors Influencing Core-to-Core Communication Delay Several factors contribute significantly towards increasing delays when communicating among cores inside modern processors like those found in Ryzen series: - **Cache Coherency Protocols**: Ensuring cache consistency requires additional overhead especially under heavy workloads where frequent updates occur simultaneously over several levels deep hierarchies such as L1D/L2 shared amongst siblings before reaching unified last level Cache (LLC). - **NUMA Architecture Effects**: Non-uniform memory access architectures may introduce asymmetry depending upon relative positions occupied by each node containing both compute resources alongside local DRAM banks leading potentially higher penalties whenever remote accesses become necessary outside immediate vicinity. - **Interconnect Bandwidth & Contention Issues**: Limited bandwidth coupled together along highly contended pathways connecting distant parts could result not only longer round trip durations but also unpredictable variations making precise predictions challenging without empirical studies beforehand. #### Optimizing Inter-Core Communications Optimization techniques focus mainly around minimizing bottlenecks caused due to above mentioned reasons plus others including software aspects too: - **Affinity Settings Adjustment**: Pinning threads/processes closer physically reduces chances encountering cross socket traversals thereby lowering overall jitter experienced throughout runtime operations. - **Software Prefetching Instructions Usage**: Explicitly instructing preloading certain chunks ahead expected usage points helps mask some fetch costs otherwise paid later synchronously at critical moments impacting negatively perceived responsiveness metrics reported back end users interacting directly against affected services running atop underlying hardware platforms. - **Algorithmic Improvements Focused On Reducing Dependencies Between Threads Or Processes Running Across Separate Units Within Same Chip Package**: Design algorithms so that dependencies are minimized thus reducing synchronization primitives required maintaining orderings preserving correctness properties desired application domains demand strictly adhered regardless implementation specifics chosen ultimately deployed production environments.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值