gemu2015 / Sonoff-Tasmota

Tasmota Fork TCS34725,PN532_i2,ccc1101 Moritz support,m5stack 4,7 epaper, hotplug drivers
GNU General Public License v3.0
24 stars 19 forks source link

Communicate with SIM800L #52

Closed pkkrusty closed 8 months ago

pkkrusty commented 10 months ago

PROBLEM DESCRIPTION

Trying to use scripting to communicate with SIM800L module to send and receive serial data via simple AT commands.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:

Rules output here:

- [ ] Provide the output of this command: `Status 0`:

STATUS 0 output here:

- [ ] Provide the output of the Console log output when you experience your issue; if applicable:
  _(Please use_ `weblog 4` _for more debug information)_

Console output here:


### TO REPRODUCE
_Steps to reproduce the behavior:_

### EXPECTED BEHAVIOUR
_A clear and concise description of what you expected to happen._

### SCREENSHOTS
_If applicable, add screenshots to help explain your problem._

### ADDITIONAL CONTEXT
Trying to get a response back from the SIM800L module. Module Rx is hooked to GPIO1 (Tx) and Tx to Rx. My script is as follows:

D 170 SB=4096 IP=192.168.4.1 command="" res=0 rstr="" substr="" lat=0 lon=0 spd=0 B res=so(1 3 9600 8N1 170) T lat=GPS#lat lon=GPS#lon F res=sa() if (res>100) { rstr=sr() } S print %substr% %rstr% if (upsecs%10==0) { print %5lat% %5lon% %res% command="" command="AT+CCID" ;=>serialsend2 %command% sw(%command%) }


Module is powered on and registered on cell network. What am I doing wrong with serial commands?

(Please, remember to close the issue when the problem has been addressed)

gemu2015 commented 10 months ago

you can not mix scripting serial cmd with tasmota serial send.

the cmd sw() is a script cmd and does not recognize %% but a string

sw(command)