Page 1 of 2

connect MQTT with BK7231N chip

Posted: 2023年 Nov 7日 14:36
by tuannguyen.aiot

I use CBU module, BK7231N chip, with TuyaOS 3.8.1 platform
How to connect with MQTT. I have done programming but the result is still connect fail.
Does anyone have an example or documentation for this.
End goal: I want to connect with MQTT with SSL/TLS authentication

Thanks a lot!


Re: connect MQTT with BK7231N chip

Posted: 2023年 Nov 8日 14:49
by tuannguyen.aiot

Is there someone here?


Re: connect MQTT with BK7231N chip

Posted: 2023年 Nov 14日 18:31
by 愚者千虑必有一得

Hi,

We have an MQTT client and use it to connect to Tuya Cloud's MQTT server. However, we have not exposed the interface. If you need to connect to another MQTT server, we would need to make preparations and provide you with an example.


Re: connect MQTT with BK7231N chip

Posted: 2023年 Nov 18日 09:09
by tuannguyen.aiot

How long can you provide an example of connecting to another MQTT server? I need to connect to MQTT with SSL/TLS security.


Re: connect MQTT with BK7231N chip

Posted: 2023年 Nov 18日 09:10
by tuannguyen.aiot
愚者千虑必有一得 2023年 Nov 14日 18:31

Hi,

We have an MQTT client and use it to connect to Tuya Cloud's MQTT server. However, we have not exposed the interface. If you need to connect to another MQTT server, we would need to make preparations and provide you with an example.

yes, I want to connect to another MQTT server, can you provide me with an example and documentation?


Re: connect MQTT with BK7231N chip

Posted: 2023年 Nov 23日 17:33
by 愚者千虑必有一得

Hi,

We have discussed internally and concluded that the BK7231N platform currently does not support access to third-party MQTT servers. This is because the BK7231N only supports accessing the tuya MQTT server using the built-in PSK KEY. Unfortunately, this built-in PSK KEY cannot be used to access other MQTT servers.


Re: connect MQTT with BK7231N chip

Posted: 2023年 Dec 4日 10:00
by tuannguyen.aiot

Hello,
Can you provide me with documentation and samples to connect to MQTT typically using port 1883?


Re: connect MQTT with BK7231N chip

Posted: 2023年 Dec 4日 10:11
by 愚者千虑必有一得

The attachment is a sample for a custom MQTT client. It shown how to connect to a custom MQTT server using domain, port, and signature. It also provides publishing and callback functions for receiving messages.

However, it cannot be used on the BK7231N chip because its TLS has been optimized and can only connect to the Tuya Cloud.


Re: connect MQTT with BK7231N chip

Posted: 2023年 Dec 6日 15:31
by tuannguyen.aiot

I connect mqtt and get error ret = -2;
https://drive.google.com/drive/folders/ ... drive_link


Re: connect MQTT with BK7231N chip

Posted: 2023年 Dec 7日 17:33
by 愚者千虑必有一得

Please check if the parameters are valid.

企业微信截图_17019414494800.png