Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:network:wan:wwan:at_commands [2023/09/30 13:04] andrewzdocs:guide-user:network:wan:wwan:at_commands [2024/03/22 01:05] – [echo] andrewz
Line 8: Line 8:
 A better solution is using a proper terminal application like ''picocom'', which can both send commands and print the modem's answers. There are other alternatives available like ''socat''. A better solution is using a proper terminal application like ''picocom'', which can both send commands and print the modem's answers. There are other alternatives available like ''socat''.
  
-Once the appropriate //serial// driver is loaded (typically - ''kmod-usb-serial-option''), the modem will expose a number of ''/dev/ttyUSBx'' interfaces.+Once the appropriate //serial// driver is loaded (typically - ''kmod-usb-serial-option''), the modem will expose a number of ''/dev/ttyUSBx'' interfaces. Usually only one or two of them will respond to AT commands.
  
 As an example, popular Quectel EP06 LTE modem will create 4 serial devices, ''/dev/ttyUSB0'' through to ''/dev/ttyUSB3''. As an example, popular Quectel EP06 LTE modem will create 4 serial devices, ''/dev/ttyUSB0'' through to ''/dev/ttyUSB3''.
Line 27: Line 27:
 picocom /dev/ttyUSB2 picocom /dev/ttyUSB2
 </code> </code>
 +Adding ''--q'' on the command line will suppress extra output with some help and other information.
  
  
Line 45: Line 45:
 ==== echo ==== ==== echo ====
  
-Use ''echo -e'' so as to be able to escape characters such as ''"''.+See examples below. ''echo -e'' is used to send //escaped// characters such as quotation marks. 
 + 
 +Alternative solution - use ''echo'' with ''socat'': ''echo -e ATI | socat - /dev/ttyUSB2,crnl''
  
 ===== From a computer ===== ===== From a computer =====
Line 113: Line 115:
 If the drivers are installed, they will see the modem and issue a special command to switch to a "working" configuration - this is 2,7 interfaces in this example. If the drivers are installed, they will see the modem and issue a special command to switch to a "working" configuration - this is 2,7 interfaces in this example.
  
-:!: **Warning: Never turn Off PC interface! (2:PCUI in this example)** You will lose the ability to access modem with terminal and change the configuration.+:!: **Warning: Never turn Off the AT Command interface! ("PCUIin Huawei terms)** You will lose the ability to access modem with terminal and change the configuration.
  
 You can add more interfaces to be active i.e. SD card: You can add more interfaces to be active i.e. SD card:
Line 120: Line 122:
 If you get an **ERROR**, maybe the numerical mode is not sorted (16,2,7)->(2,7,16). If your device answers to set command with **OK** but ''AT^SETPORT?'' doesn't show your desired settings, you can try using space in between numerical modes(2,7) and alphabetical modes(A2) like so: If you get an **ERROR**, maybe the numerical mode is not sorted (16,2,7)->(2,7,16). If your device answers to set command with **OK** but ''AT^SETPORT?'' doesn't show your desired settings, you can try using space in between numerical modes(2,7) and alphabetical modes(A2) like so:
 <code> <code>
-AT^SETPORT="A1,A2;2,7, A2"+AT^SETPORT="A1,A2;2,7,A2"
 </code> </code>
  
 Or with multiple modes: Or with multiple modes:
 <code> <code>
-AT^SETPORT="A1,A2;2,7, A1,A2"+AT^SETPORT="A1,A2;2,7,A1,A2"
 </code> </code>
  
  • Last modified: 2024/11/10 11:22
  • by andrewz