Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT over TLS #857

Closed
TomaszKn opened this issue Jan 5, 2017 · 8 comments
Closed

MQTT over TLS #857

TomaszKn opened this issue Jan 5, 2017 · 8 comments

Comments

@TomaszKn
Copy link

TomaszKn commented Jan 5, 2017

HI
Is possible connect to Mosquitto broker over TLS/SSL on 8883 port?
How convert ca.crt to cert.h?

@slaff
Copy link
Contributor

slaff commented Jan 6, 2017

Is possible connect to Mosquitto broker over TLS/SSL on 8883 port?

@TomaszKn Yes, it is possible - take a look at the MqttClient_Hello ( https://github.com/SmingHub/Sming/blob/develop/samples/MqttClient_Hello/app/application.cpp ) sample.

How convert ca.crt to cert.h?

Do you want to send client certificate?

@TomaszKn
Copy link
Author

TomaszKn commented Jan 6, 2017

True.
I have origin/master where isn't SSL in MQTT, but after change to develop and rebuild all project when I'm flashing my ESP-01 or ESP-07, chip not start.
It test on MQTT SSL and Basic_SSL

Wrote 274432 bytes at 0x9000 in 23.8 seconds (92.3 kbit/s)...
Leaving...
python -m serial.tools.miniterm /dev/ttyUSB0 115200
--- Miniterm on /dev/ttyUSB0 115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
380, len 12528, room 8
tail 8
chksum 0x7c
csum 0x7c
csum err
ets_main.c Fatal exception (28):
epc1=0x4000228b, epc2=0x00000000, epc3=0x00000000, excvaddr=0x000000b5, depc=0x00000000
Fatal exception (28):
epc1=0x4000228b, epc2=0x00000000, epc3=0x00000000, excvaddr=0x000000b5, depc=0x00000000
Fatal exception (28):
epc1=0x4000228b, epc2=0x00000000, epc3=0x00000000, excvaddr=0x000000b5, depc=0x00000000 Fatal exception (28): epc1=0x4000228b, epc2=0x00000000, epc3=0x00000000, excvaddr=0x000000b5, depc=0x00000000 Fatal exception (28): epc1=0x4000228b, epc2=0x00000000, epc3=0x00000000, excvaddr=0x000000b5, depc=0x00000000 Fatal exception (28): epc1=0x4000228b, epc2=0x00000000, epc3=0x00000000, excvaddr=0x000000b5, depc=0x00000000 Fatal exception (28): epc1=0x4000228b, epc2=0x00000000, epc3=0x00000000, excvaddr=0x000000b5, depc=0x00000000 Fatal exception (28): epc1=0x4000228b, epc2=0x00000000, epc3=0x00000000, excvaddr=0x000000b5, depc=0x00000000

On ESP-01 or ESP-07 Isn't available SSL?

@slaff
Copy link
Contributor

slaff commented Jan 8, 2017

It could be that the application is too big for ESP-01 with 512 KB flash. Can you try something for me: Erase your flash before saving the firmware on it.

./esptool.py --port /dev/ttyUSB0 erase_flash

If needed replace the port variable with your one.

After that flash the application.

@TomaszKn
Copy link
Author

TomaszKn commented Jan 9, 2017

Couldn't boot again

@powo01
Copy link

powo01 commented Jan 10, 2017

At my ESP-01 the MqTT Client Example in TLS mode is working. The compiled binary is about 310kB
I have compiled in a cert and key in DER format but the output told me something is wrong

@slaff
Copy link
Contributor

slaff commented Jan 11, 2017

... but the output told me something is wrong

@powo01 can you paste the output to see details?

@slaff
Copy link
Contributor

slaff commented Feb 1, 2017

@TomaszKn Please, paste the output when you flash the ROMs on the device. Type make flash V=1.

@slaff
Copy link
Contributor

slaff commented Feb 6, 2017

Feel free to reopen if there is more information.

@slaff slaff closed this as completed Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants