SIM7600G-H - How to create file

Hi there,

I’m trying to create a file (for CA certificate) on SIM7600G-H. I have managed to create a directory using Putty, but not create the file.

image

But, when I try to create the new file, I get error:
image

According to this manual, as far as I can see, there is no commands for creating files? Is that corrent? How can I manage to create this file then? :confused:

Any advice is very appreciated! :slight_smile:

I would not expect that you would ever create a file. You would create a file system with folders, but files would only be moved, copied, renamed etc amongst the host system and other systems, eg by getting from a FTP server.

Thank you for your reply. If I can not create a file, how can I save the SSL root certificate? :grimacing:

Not sure if this is meant to be public, but I did find it via a google search

page 235 : AT+CCERTDOWN Download certificate into the module
As I have not read over how to use the module I can only assume it somehow knows where its downloading from,

page 233/234
There are two ways to download certificate files to module:

  1. By AT+CCERTDOWN.
  2. By FTPS or HTTPS commands

Thank you so much! Using AT+CCERTDOW, I was able to create the certificate file, and after download its content to this file.

When listing all certificates, it shows up:
image

Then, i added the sert to my SSL setup (hopefully?):
image

Then, I try to connect to my broker. The last 2 red spots are my username and password.
image

I get error code 12, which means:
image

So… I don’t know what to do. So any help is very appreciated! :slight_smile:

Did you try with the server address as “tcp://…”

as per

Thanks, I tried that now and it returns code 9 network error instead of code 12. Not sure what that means, I think my network connection is good…

To be honest Im just reading the PDF and dont know how this device is meant to work.

So my guess is that you setup the SSL to an SSL Context, which you seem to do with the AT+CSSLCFG (in your post above) that has a context id of 0

I think you now need to “bind” that to your MQTT

Thank you so much for helping me out with this issue, very appreciated! I have done the binding as you mention. Below I have listet all the setup I have done.

I have tried to connect 4 different ways, and 3 of them returns error 12. But TCP without username/pass returns error 31, which means: connection refused: not authorized.

EDIT:
AT+CDNSGIP command was tested with my actual broker URL, and command returned its IP adress.

It would be worth ensuring you paste any response/error codes. While the document has lots of details it can also be a bit vauge in parts.

Looking up some error codes from above, you said it change from 12 to 9 when you changed from ssl:// to tcp://
That seems to make sense as 12 (could be) Failed to parse server name; which makes sense if its meant to be tcp:// as per the guide.

So then we are down to 9 “Operation rejected by server”

So the key question is why did the server reject.
While reject could mean anything but success the error code table does list other things. So to me it sounds like something your sending to the server is not what it expects to get from you. e.g. bad username/password; or if it expects a client certificate but not supplied?

I would be ensuring you have all the needed details to connect to the server and make sure (as best we can) that they device is setup to do the connection the way it expects it.

While Im not sure of your setup or skill set, a wireshark sniff might help; or at least rule out somethings.

1 Like