{"title":"让我们用 C# 为物联网研究构建一个 MQTT Pub-Sub 客户端","authors":"Sudipto Chakraborty, P. S. Aithal","doi":"10.47992/ijmts.2581.6012.0334","DOIUrl":null,"url":null,"abstract":"Purpose: MQTT stands for Message Queuing Telemetry Transport. It is a lightweight protocol specifically designed for IoT applications. Nowadays, most IoT projects exchange sensor data over the MQTT protocol. It is simple to integrate and can run on low hardware resources. To test MQTT, the researcher needs MQTT publisher subscriber client software. There are several free and paid software available on the web. But sometimes, researchers need some custom interface or functionality not available in the free version. The paid version demands vast amounts of money for customization. Occasionally, they want to avoid customization for specific projects. Here, we provide a procedure to create our MQTT pub-sub client software interface, which the researcher can easily customize. The project is available to download.\nMethodology/Approach: We installed Microsoft Visual Studio in our working system. Using C# language, we create a GUI (graphical user interface). Inside the GUI, we segregate the info into two. The left is for publishing clients, and the right is for subscribing clients. We installed the M2MQTT package using the NuGet package manager to communicate with the MQTT broker. \nFindings/Result: Using our built application, we test to exchange the sensor data between two clients. We found the data exchanged in almost real-time. In a couple of scenarios, we observed that the data propagation could have been faster when we set the update interval below 500 milliseconds. There may be a network delay, or the MQTT broker we used is a free service. It may be the limited capacity of the accessible mode of the server we used. If the application is not time-critical, we can utilize this communication route to exchange the sensor data. \nOriginality/Value: Every day, new researchers are introduced to the IoT field and integrate MQTT into their projects. They feel one customizable software they can use according to their project requirements. So, using this project, the researcher can fulfill their need. The code is freely available on the web. And scope to customize. This project provides value to them.\nType of Paper: Experimental-based Research.","PeriodicalId":504356,"journal":{"name":"International Journal of Management, Technology, and Social Sciences","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-02-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Let Us Build a MQTT Pub-Sub Client In C# For IoT Research\",\"authors\":\"Sudipto Chakraborty, P. S. Aithal\",\"doi\":\"10.47992/ijmts.2581.6012.0334\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Purpose: MQTT stands for Message Queuing Telemetry Transport. It is a lightweight protocol specifically designed for IoT applications. Nowadays, most IoT projects exchange sensor data over the MQTT protocol. It is simple to integrate and can run on low hardware resources. To test MQTT, the researcher needs MQTT publisher subscriber client software. There are several free and paid software available on the web. But sometimes, researchers need some custom interface or functionality not available in the free version. The paid version demands vast amounts of money for customization. Occasionally, they want to avoid customization for specific projects. Here, we provide a procedure to create our MQTT pub-sub client software interface, which the researcher can easily customize. The project is available to download.\\nMethodology/Approach: We installed Microsoft Visual Studio in our working system. Using C# language, we create a GUI (graphical user interface). Inside the GUI, we segregate the info into two. The left is for publishing clients, and the right is for subscribing clients. We installed the M2MQTT package using the NuGet package manager to communicate with the MQTT broker. \\nFindings/Result: Using our built application, we test to exchange the sensor data between two clients. We found the data exchanged in almost real-time. In a couple of scenarios, we observed that the data propagation could have been faster when we set the update interval below 500 milliseconds. There may be a network delay, or the MQTT broker we used is a free service. It may be the limited capacity of the accessible mode of the server we used. If the application is not time-critical, we can utilize this communication route to exchange the sensor data. \\nOriginality/Value: Every day, new researchers are introduced to the IoT field and integrate MQTT into their projects. They feel one customizable software they can use according to their project requirements. So, using this project, the researcher can fulfill their need. The code is freely available on the web. And scope to customize. This project provides value to them.\\nType of Paper: Experimental-based Research.\",\"PeriodicalId\":504356,\"journal\":{\"name\":\"International Journal of Management, Technology, and Social Sciences\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-02-02\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"International Journal of Management, Technology, and Social Sciences\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.47992/ijmts.2581.6012.0334\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Journal of Management, Technology, and Social Sciences","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.47992/ijmts.2581.6012.0334","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Let Us Build a MQTT Pub-Sub Client In C# For IoT Research
Purpose: MQTT stands for Message Queuing Telemetry Transport. It is a lightweight protocol specifically designed for IoT applications. Nowadays, most IoT projects exchange sensor data over the MQTT protocol. It is simple to integrate and can run on low hardware resources. To test MQTT, the researcher needs MQTT publisher subscriber client software. There are several free and paid software available on the web. But sometimes, researchers need some custom interface or functionality not available in the free version. The paid version demands vast amounts of money for customization. Occasionally, they want to avoid customization for specific projects. Here, we provide a procedure to create our MQTT pub-sub client software interface, which the researcher can easily customize. The project is available to download.
Methodology/Approach: We installed Microsoft Visual Studio in our working system. Using C# language, we create a GUI (graphical user interface). Inside the GUI, we segregate the info into two. The left is for publishing clients, and the right is for subscribing clients. We installed the M2MQTT package using the NuGet package manager to communicate with the MQTT broker.
Findings/Result: Using our built application, we test to exchange the sensor data between two clients. We found the data exchanged in almost real-time. In a couple of scenarios, we observed that the data propagation could have been faster when we set the update interval below 500 milliseconds. There may be a network delay, or the MQTT broker we used is a free service. It may be the limited capacity of the accessible mode of the server we used. If the application is not time-critical, we can utilize this communication route to exchange the sensor data.
Originality/Value: Every day, new researchers are introduced to the IoT field and integrate MQTT into their projects. They feel one customizable software they can use according to their project requirements. So, using this project, the researcher can fulfill their need. The code is freely available on the web. And scope to customize. This project provides value to them.
Type of Paper: Experimental-based Research.