+QMTOPEN: 0,-1 error

Dear Maker,
Got it. If that it is better to catch module debug log to confirm the reason. If you want to flash the firmware, you also can email to support@quectel.com to get it. Thanks!

also

use 0xFFFF or skip this line… Kernel OpenSSL use some values by default

and test: first ACT(data call) then config ?

@Kyson
This video is operation of my EC25.

Yes, This value is used value when it was connected to AWS IOT using BG96.

Yes, I executed AT+QIACT=1 before saving the certificate on EC25.
image

are you sure for your accaunt / device in AWS IoT Core
QMTOPEN return result after full mqtt connection
connection “path” is

  • create socket
  • connect socket to host
  • SSL Handshake
  • MQTT Connect

all this can return error -1

if you know Python here is simple script to test/simulate AWS connection ( certificates ) … etc

# pip install paho-mqtt
import paho.mqtt.publish as publish
import paho.mqtt.client as mqtt
import ssl
auth = {
  'username':"ignore",
  'password':"ignore"
}
CERT_PATH = "D:\\CERTS\\" # create folder and put certificates
AWS_CRT   = "ae8b8adb75" # your device
AWS_HOST  = "a2m9g340vhtc2w-ats.iot.us-east-2.amazonaws.com" # your host
tls = {
  'ca_certs' : CERT_PATH + "sf-class2-root.pem", 
  'certfile' : CERT_PATH + AWS_CRT + "-certificate.pem.crt",
  'keyfile'  : CERT_PATH + AWS_CRT + "-private.pem.key"
}
print("BEGIN")
publish.single("topic",
  payload   = "hello world",
  hostname  = AWS_HOST,
  port      = 8883,  
  client_id = "client_id",
  auth      = auth,
  tls       = tls,
  protocol  = mqtt.MQTTv311)
print("END")

I connect the PC between EC25 and AWS iot using Python code.
EC25 connect to PC(TCP connection ) and PC to AWS(TCP Connection)
EC25 send the data to PC and PC resend it to AWS iot and visa versa.

EC25(5.35.166.154) <-> PC(222.98.173.200… using Python) <->AWS iot(3.130.56.185)

This is a packet capture using the PC.AWS iot(3.130.56.185) sends a packet including bad certificate message.

are you have “clear” connection from python?
for me work

Thank you
I executed using your python file.

I think it looks like it’s connected, is it right?

console BEGIN END … no error is OK
you can view message in AWS MQTT console
so … use this settings & certificates for EC2x
check / debug again your AT commands
or … contact with Quectel support

Thank @WIZio
I could see the message on AWS MQTT test console.
In the end, it will likely have no choice but to check the setting or firmware version.

… and ask last firmware

I have been using the latest firmware for EC20 (EC20CEFILGR06A05M1G) and I am getting the same result.
Weird part is the same setup works for MQTT brokers other than aws iot core. And aws iot core is working with desktop clients like mqtt.fx

I am grappling with this problem for a week now.

One work around would be to use a mqtt bridge between working MQTT broker such as mosquitto broker or emqx broker and aws iot core.

Other way would be to implement poho mqtt client with mbed TLS in the application.

@Kyson
How is it going? Is this firmware version supported for AWS iot?
F/W : EC25EFAR06A03M4G

Please email to support@quectel.com to get the latest firmware and upgrade it to have a try. If it is still have such issue, please also email to such address to get the debug log catch tool and feedback the debug log to us.Then we will help to analyze it. Thanks!

I e-mailed support@quectel.com last friday and I still have not received an answer from you.
Also I sent one more email today

Do not worry about it. The FAE who in charge of your country will answer your email. Please be patient. Thanks!

@Kyson
Hi~~ I e-mailed support@quectel.comtwo weeks ago and I still have not received an answer from you.
Should I wait for a bit more?

@Maker_i
You need the latest firmware of EC25E, right?
If yes, please click the following link to download it. Thanks!
https://cnquectel-my.sharepoint.com/:u:/g/personal/asean-fae_quectel_com/EcpbVIk4FfhPqgjnoKfQSqoBYHM4L3jwVA8a-coPIk0hdw?e=fmbahT

About the support email, please provide the email screenshot that you have sent, and your country, your company name. I will notify the local FAE internal. Thanks!