15.06.2020, 13:01
Hi, do you also know how to conenct to AWS IoT ?
AWS provides:
- the root CA :AmazonRootCA1.pem and AmazonRootCA3.pem
- the client cert : 0a1b2c3d4e-certificate.pem.crt
- the client private key: 0a1b2c3d4e-private.pem.key
- the client public key: 0a1b2c3d4e-public.pem.key
i would assume below is the correct way to connect, i left out login_set because auth is only certificate based
broker = 'random-ats.iot.eu-central-1.amazonaws.com'
client:tls_set('/data/ftp/AmazonRootCA1.pem', nil, '/data/ftp/0a1b2c3d4e-certificate.pem.crt', '/data/ftp/0a1b2c3d4e-private.pem.key')
local ok, rc = client:connect(broker,8883)
assert(ok)
I get this error:
AWS IoT Test 15.06.2020 14:53:44
Resident script:15: Invalid function arguments provided.
stack traceback:
[C]: in function 'tls_set'
What am I doing wrong ?
AWS provides:
- the root CA :AmazonRootCA1.pem and AmazonRootCA3.pem
- the client cert : 0a1b2c3d4e-certificate.pem.crt
- the client private key: 0a1b2c3d4e-private.pem.key
- the client public key: 0a1b2c3d4e-public.pem.key
i would assume below is the correct way to connect, i left out login_set because auth is only certificate based
broker = 'random-ats.iot.eu-central-1.amazonaws.com'
client:tls_set('/data/ftp/AmazonRootCA1.pem', nil, '/data/ftp/0a1b2c3d4e-certificate.pem.crt', '/data/ftp/0a1b2c3d4e-private.pem.key')
local ok, rc = client:connect(broker,8883)
assert(ok)
I get this error:
AWS IoT Test 15.06.2020 14:53:44
Resident script:15: Invalid function arguments provided.
stack traceback:
[C]: in function 'tls_set'
What am I doing wrong ?