I'm try to publish my data to ThingsBoard server i use this types of AT commands
AT+QIACT=1
OK
AT+QMTOPEN=1,"demo.thingsboard.io",1883
OK
AT+QMTCONN=1,"demo.thingsboard.io","MY_ACCESS_TOKEN",""
OK
AT+QMTPUB=1,0,0,0,"v1/devices/me/telemetry"
>{"temperature":35.00,"humidity":80.00} // MY_POST_DATA This line hanging my module
All AT commands response is ok But i finally enter MY_POST_DATA the module doesn't provide no response hanging the previous command.. and i check my ThinksBoard data never post telemetry..
Please help any one how can i fix this problem and publish MQTT server.
Step 1: Get hold of the official AT command documentation for the modem (Quectel BG96 I assume?). It should document how the AT+QMTPUB command behaves and what it expects. Everything else is just guessing. The manufacturer should provide this, and if not you should demand to get one.
...
Step 873, when you have exhausted absolutely all possible ways of getting hold of the official AT command documentation for the modem: You can try my guess that the command behaves similar to other commands that read arbitrary length user data, most notably AT+CMGS which sends SMS messages, which expect a Ctrl-Z (ascii value 26) as an end of data indicator.
+QMTPUB: 1,0,0 simply mean that BG96 has successfully published and your broker (thingsboard) have also acknowledged publication of message.
If you can't see data on broker, then please check if the topic you are publishing is correct or not.
It may happen you are publishing to another topic (or to a different PATH).
Ask 'thingsboard' for help regarding proper topic.
Related
There's a simple game that my friends and I play both in person and and online. I developed a CLI that records our in-person games (I just type in each move), but I now want to use it to record our online games. All I need to do is pipe the HTTP response bodies being sent to my browser (Firefox) to my CLI. Unfortunately. I can't figure out how to do this.
Ideally, I'm looking for a Ubuntu package that I can run from the command line that will capture and return all HTTP response bodies from a specific endpoint. I've looked into tcpdump and some simple proxy servers, but I'm not sure they do what I want them to do.
Thanks for your help! Let me know if I need to provide any further information!
I used MITMProxy as ZachChilders recommended in the comments. I found it somewhat difficult to get set up, so I'll include what directions I followed to get it up and running:
1) Install MITMProxy.
2) Configure Firefox.
3) Create Add On to parse body.
4) Stream data via Python to CLI (TODO).
Im hoping someone could help me please. I am trying to retrieve time and date from the Sim800L and I am coming short. I have a Sim800L here and I am communicating with it successfully over the Arduino IDE. I have used the following AT commands as suggested online with the following results.
AT+CCLK?
+CCLK: "04/01/01,03:59:51+00"
OK
AT+CLTS=1
OK
AT&W
OK
AT+CLTS?
+CLTS: 1
OK
After restarting, the date and time however is not set to network time. The network is a national carrier and should be able to do this.
AT+CCLK?
+CCLK: "04/01/01,03:59:51+00"
OK
Any ideas?
Thank you
I found the same trouble. in this page embedded world i Found something that works for me. it is add the following instruction
AT&W
Read current time (You can see that the time is not right):
AT+CCLK?
+CCLK: "04/01/01,00:14:12+22"
OK
Enable auto network time sync :
AT+CLTS=1
OK
Check if value is set :
AT+CLTS?
+CLTS: 1
OK
Save the setting to permanent memory so that module enables sync on restart also :
AT&W
OK
Restart the module and check time :
AT+CCLK?
+CCLK: "18/06/21,12:00:21+22"
OK
and it is all.
You do correct but
Base on "SIM800 Series_AT Command Manual_V1.09" Edited on 2015-08-03
in page 154 in "6.2.12 AT+CLTS Get Local Timestamp" section
"Support for this Command will be network dependent."
Change your network provider
In the UK, "AT+CCLK?" usually works (the network sets this time) IF using a network-branded-SIM (eg. EE or O2 branded). However for SOME MVNO-SIMs (Mobile Virtual Network Operators SIMS) "AT+CCLK?" does NOT work (even where the same network-branded-SIM does).
Under these cases (for my SIM800L), if you need a valid time (for example so you can send a GPRS-email with a valid time-stamp), you have to manually set the time using: AT+CCLK="21/10/15,18:55:00+04"
I'm a new Robot Framework user, and I've added the MQTTLibrary.
I can set up a subscription as per the documentation, and successfully receive messages. It's also possible to subscribe to wildcards, e.g.
${message}= Subscribe topic=test/mqtt_test/+ qos=1 timeout=2
The above will successfully pick up messages published to test/mqtt_test/apples, test/mqtt_test/oranges, test/mqtt_test/pears etc.
However, ${message} appears to only contain the content of the message payload, and I've been unable to work out if it's possible to determine the exact topic of the received message.
Can this be done with MQTTLibrary?
=============
Additional details (to provide an answer to ILostMySpoons's comment):
Sure - it's basically just the message content. So if I use...
mosquitto_pub -h 127.0.0.1 -t test/mqtt_test/apples -m "Hello to you"
...and my robot framework script does...
Log to console ${message}
...I see...
['Hello to you']
The debug output from the mosquitto broker (mosquitto -v) doesn't show message payloads but it does show the full topic path of test/mqtt_test/apples.
I've taken a deeper look into the MQTTLibrary and have come up with a solution. I'm both a Robot Framework and Python noob, so this may not be the best/most appropriate implementation, but it seems to work.
On my installation, the MQTTLibrary source is contained in C:\Python27\Lib\site-packages\MQTTLibrary. Everything of interest is in the MQTTKeywords.py file.
In the _on_message_list() function, change...
self._messages.append(message.payload)
...to...
self._messages.append([message.topic, message.payload])
Use the Subscribe keyword in your Robot Framework script as before, but you'll now have a list of lists; specifically each entry in the list will be a list of [topic, payload]. E.g.
${messages}= Subscribe topic=test/mqtt_test/+ qos=1 timeout=20 limit=0
${third_message}= Get From List ${messages} 2
${topic}= Get From List ${third_message} 0
${payload}= Get From List ${third_message} 1
Log to console \nTopic:\n${topic}
Log to console \nPayload:\n${payload}
The above example assumes that at least 3 messages were received during the 20 second timeout window.
Note that this change would break existing scripts, so a more complete solution would perhaps need to add new keywords (e.g. Subscribe And Get Topics), with additional work to ensure Subscribe still returns just the payloads.
I'll try provide as much information as possible:
No error message.
The instance stays in the "ready service instances".
The receive location has the same parameters (except URI, the three polling queries, user account/pw and receive pipeline) as another receive location that points to another database/table which works.
The pipeline is waiting for the correct schema.
The port surface and receive location are both waiting for the correct schema.
In my test example, there are only 10 lines being returned.
The message, which contains those 10 lines, validates against the schema.
I tried to let the instance alone to no avail - 30+ minutes - and no change in its condition.
I had also tried suspending and then resuming it which then places the instance in the "dehydrated orchestrations" list. Again, with no error message.
I'm able to get the message by looking at the body of the message that's in the "ready to run" service. (This is the message that validates versus the schema I use in Visual Studio.)
How might something like this arise?
Stupid question, but I have to ask... Is the corresponding host instance running?
here's my situation:
We are using Facsimile/400 on a IBM System i and sometimes it just stops sending faxes. Everything seems in order but the faxes just pile up with a "Sending" status.
This is an intermittent problem that cannot be provoked manually so I want to come up with a program that checks that the fax is still running.
Here are the problem's symptoms when it happens:
In CHKFAXSTS, all the faxes have the "Sending" status
The QFFSNDFAX output queue is empty
The QFFSNDERR output queue is filled with the currently sending faxes and the previous faxes in error
Now how can I know that the fax is still sending faxes?
I can get the list of the spooled files in QFFSNDERR and check if a spooled file is lingering there too long, but how can I know it's status is "Sending"? - I don't want to catch the faxes that have a wrong fax number etc.
If you are still looking for a solution try asking on the MIDRANGE-L mailing list
Here's the approach I used:
I found the table QUSRSYS/QAFQSND, which contains the complete list of faxes as they can be seen in CHKFAXSTS.
With a SQL query, I can now check if there are faxes on the "Sending" status for too long.