command

Why I am not able to receive sms using AT commands?

允我心安 提交于 2019-12-01 20:58:54
问题 I want to send / receive sms using AT commands from my computer to my mobile phone. I connected my phone to my computer using a USB port. My computer detects the modem and I am able to send sms from the computer to mobile phone. However, I am not able to receive sms in my computer.. I am presenting a sample of what I get from AT editor AT+CMGF=1 OK AT+CNMI=1,2,0,0,0 Error What can I do to send this prob and why am I getting this Error? 回答1: Every phone has different capabilities so you should

Why I am not able to receive sms using AT commands?

亡梦爱人 提交于 2019-12-01 19:50:34
I want to send / receive sms using AT commands from my computer to my mobile phone. I connected my phone to my computer using a USB port. My computer detects the modem and I am able to send sms from the computer to mobile phone. However, I am not able to receive sms in my computer.. I am presenting a sample of what I get from AT editor AT+CMGF=1 OK AT+CNMI=1,2,0,0,0 Error What can I do to send this prob and why am I getting this Error? Every phone has different capabilities so you should check which values for each parameter are valid for your phone by sending it a AT+CNMI=? For example my

How to check exit if used tee?

前提是你 提交于 2019-12-01 19:24:08
I try to use tee to save output in file like: myapp | tee log.txt But I have a problem with checking of exit. Previous code: myapp if [ $? -eq 0 ] then ..... But $? will be exit of tee! Does it possible catch exit of myapp? Thanks. For bash, there's a convenient special array: PIPESTATUS. The return code for myapp would be in ${PIPESTATUS[0]} and so on. zsh has a roughly identical method. There's also a rather more annoying, hacky way to do it in strict bourne shells that you can read about in the comp.unix.shell FAQ . Use PIPESTATUS myapp | tee log.txt if [ $PIPESTATUS[0] -eq 0 ] then .....

How to check exit if used tee?

江枫思渺然 提交于 2019-12-01 18:50:45
问题 I try to use tee to save output in file like: myapp | tee log.txt But I have a problem with checking of exit. Previous code: myapp if [ $? -eq 0 ] then ..... But $? will be exit of tee! Does it possible catch exit of myapp? Thanks. 回答1: For bash, there's a convenient special array: PIPESTATUS. The return code for myapp would be in ${PIPESTATUS[0]} and so on. zsh has a roughly identical method. There's also a rather more annoying, hacky way to do it in strict bourne shells that you can read

How to combine “lsof -i :port” and “kill pid” in bash

故事扮演 提交于 2019-12-01 18:21:50
How do i combine these two commands in the bash: lsof -i :port kill pid The first one returns the PID i want to kill to release the port. The second one kills the returned PID. I am doing this because I don´t know of any way to kill a jetty webserver within the Netbeans IDE on OSX. Is there a way? You can use $(): kill $(lsof -t -i:port) You can use kill -9 `lsof -t -i:port` 来源: https://stackoverflow.com/questions/33101725/how-to-combine-lsof-i-port-and-kill-pid-in-bash

Can't save baud rate settings?

落爺英雄遲暮 提交于 2019-12-01 18:04:11
The GSM modem I have is set to 115200 baud-rate by default. I have PIC18 Microcontroller connected to it with 19200 baud-rate. I changed the modem baud-rate to 19200 then saved the settings but every time I reset the modem, the baud-rate changes back to 115200. These are the following commands I used. Change baudrate AT+IPR=19200 Then I reopened the hyper-terminal (Putty) with 19200 baud-rate to save the current settings. Save settings AT&W But upon reset of the modem, the baud-rate changes back to 115200. I am using M6000 GSM/GPS Module(Tk115 Gps Tracker) but there isn't a lot of support for

Can't save baud rate settings?

别等时光非礼了梦想. 提交于 2019-12-01 17:38:22
问题 The GSM modem I have is set to 115200 baud-rate by default. I have PIC18 Microcontroller connected to it with 19200 baud-rate. I changed the modem baud-rate to 19200 then saved the settings but every time I reset the modem, the baud-rate changes back to 115200. These are the following commands I used. Change baudrate AT+IPR=19200 Then I reopened the hyper-terminal (Putty) with 19200 baud-rate to save the current settings. Save settings AT&W But upon reset of the modem, the baud-rate changes

Redirect java -version to file or variable

走远了吗. 提交于 2019-12-01 16:57:07
Maybe it is a silly question, but I'm trying to redirect the exit of "java -version" command to a file or variable but it doesn't work. Server = Linux CentOS 6 My code in shell script java -version >> test.txt Also I'm trying to assign it to a variable: JAVA_CHECK=`java -version` Even running those command from command-line it still not working. when I say it doesnt work, I mean that the exit of the command is being showed in my screen instead to redirect it to a file or wherever ... Nigel Tufnel java -version writes to stderr (fileno 2), not stdout (fileno 1). You can redirect stderr to a

Multiple Key Event Bindings in Tkinter - “Control + E” “Command (apple) + E” etc

点点圈 提交于 2019-12-01 16:48:01
Mac OS X 10.6.6 - Tkinter I want to bind multiple-key events, and while I have found an effbot article and the Tk man pages, I've been unable to make this work correctly. I'm new here. I've had mixed success. I've been able to get Shift + letter key, but not Control or Command (Apple key). What I really want to do is Command + letter and Control + letter key so it would theoretically work in Windows and OS X. I want it to work at window-level, so I'm using root. Perhaps there is a better way. Below is what I've tried: root.bind('<Shift-E>', self.pressedCmdE) # Works root.bind('e', self

How to run a shell command through vimscript?

試著忘記壹切 提交于 2019-12-01 16:11:13
In my Vim setup I'd like to add a configuration that runs a shell command with a certain mapping. Is there any possible way to do this in Vimscript? There is a system() function in vim ,try this: :call system('date') I do this with traditional vi, so I assume it would work with vim as well. In my .exrc I have: map ^_ !}fmt 71 72^M (That's a ^_ entered by typing ctrl-V ctrl-_ , and a ^M entered by typing ctrl-V ctrl-M When I hit ctrl-_ in vi, it reformats my current line to 72 characters. 来源: https://stackoverflow.com/questions/10766033/how-to-run-a-shell-command-through-vimscript