WiFi, short for “Wireless Fidelity,” is a technology that allows devices to connect to the internet or communicate with each other wirelessly using radio waves. It’s widely used in homes, businesses, and public spaces to provide internet access without the need for physical wired connections. WiFi operates within the unlicensed radio frequency bands, typically 2.4 GHz and 5 GHz, and it’s governed by the IEEE 802.11 family of standards. These standards define different WiFi versions, such as 802.11n, 802.11ac, and the latest, 802.11ax (Wi-Fi 6), each offering various speeds, range, and features. WiFi routers and access points transmit signals that devices like smartphones, laptops, tablets, and smart home gadgets can receive, enabling them to access the internet or network resources.
Archives
Embedded Protocol – SPI Communication
SPI is an abbreviation for Serial Peripheral Interface, which stands for Synchronous Serial Communication Interface. It is utilized for short-distance communication and was developed by Motorola in 1980, later becoming a de facto standard. SPI communication operates in full-duplex mode. It is also sometimes referred to as the Four-Wire Serial Bus (FWSB), distinguishing it from Three, Two, and One Wire Serial Bus protocols. The four-wire protocol includes SCL, SS, MISO, and MOSI. SPI operates as a single master protocol.
Embedded Protocol – MQTT
Message Queue Telemetry Transport (ISO/IEC PRF 20922), or MQTT, is a lightweight protocol designed for machine-to-machine (M2M) device communication using a Publish/Subscribe pattern. It was developed by Message Queue Telemetry Transport (ISO/IEC PRF 20922) and Lightweight protocol for (M2M) device communication using Publish/Subscribe. It was Developed By Andy Stanford-Clark (IBM) and Arlen Nipper (Eurotech; now Cirrus Link) in 1999. Unlike HTTP, which follows a request/response paradigm, It utilizes a publish/subscribe architecture. The central communication point in It is the Broker. It is available for implementation in C, C++, JavaScript, Lua, Python, and soon in C#.
Client functions
Field | Description |
---|---|
Host | Address of the MQTT broker. |
Port | Default: 1883. |
ClientID | Unique client identifier. |
Username | UTF-8 encoded string for authentication. |
Password | Client’s password if flag set. |
Keep Alive | Duration client stays connected (seconds). |
SSL | Indicates SSL/TLS encryption usage. |
Clean Session | If set, session clears subscriptions and messages. |
Last-will Topic | Topic for “Last Will” message on disconnect. |
Last-will QoS | Quality of Service for “Last Will”. |
Last-will Retain | Retain status for “Last Will” message. |
Last-will Message | Content of “Last Will” in case of disconnection. |
Topic | Message destination hierarchy. |
+ Plush sign | Single-level wildcard in subscriptions. |
# Hash Sign | Multilevel wildcard in subscriptions. |
Publish QoS | Quality of Service levels: |
QoS(0) – At most once | |
QoS(1) – At least once | |
QoS(2) – Exactly once | |
Retain | Message retention by broker. |
Subscriptions | List of subscribed topics. |
Message | Payload data transmitted. |
Broker | Server distributing messages. |
Client | Device or app connected to broker. |
Quality of Service | Message delivery guarantee. |
Retained Messages | Broker-stored messages for new subscribers. |
Persistent Session | Broker-maintained session after client disconnects. |
Last will and Testament and SYS topic | Client’s “Last Will” message and system topics interaction. |
PHP MQTT
Web Apps
WordPress Plugin
DIOT SCADA with MQTT By Ecava
Image Source
DIOT which stands for Decoupled IOT, has its SCADA functionalities decoupled into Host and Node for flexibility and scalability that catered for IoT era. This plugin functions as the SCADA Host to work with your device or system, which will be treated as SCADA Node. You just need to enter the broker/server into the configuration. You may then subscribe to the desired topic with a shortcode to display in any desired web page or post. [diot topic="building/floor/device/sensor"]
Or, if you have a JSON content, you may add dollar sign as JSON root: [diot topic="building/floor/device/sensor$json.data"]
. The content will be updated dynamically when the device publish any data. You may also choose to display your realtime data in trending chart. Check out Ecava DIOT online demo to see how easy things can be done now! For more see here : https://wordpress.org/plugins/ecava-diot-scada/
Image Source
WP-MQTT By Roy Tanck
Setting up Tthis is easy. Simply supply your MQTT broker’s details and configure which WordPress events should trigger messages. “MQTT is a machine-to-machine (M2M)/”Internet of Things” connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport.” (from mqtt.org) A number of events are predefined. Simply check the right checkbox and fill in the message’s subject and text.
- Pageview
- User login
- Failed user login
- Post published
- Page published
- New comment
Other events can be added using the “custom events” section. This allows you to use any WordPress hook (actions and filters) to trigger messages.
Image Source
Android App
Check this below name in Play-store
- Dashboard
- IOT Manager
- IOT
Broker Service Supporter
The following list of brokers may be used online or locally also giving free and paid service
Adafruit IO (Online – Free)
- Website : Adafruit IO
- Adafruit supporting online free service.
- You can use adafruit client libraries to Python, Node JS, Rubby and Arduino. see the client libraries section).
- The following details are to connect a client to Adafruit IO.
- Host : io.adafruit.com
- Port : 1883 or 8883
- Username : Your adafruit account username
- Password : Your adafruit IO Key
CloudMQTT (Online -Free and Paid)
- Website :
- CloudMQTT
- Online – Free Plans : Cute Cat and
- Paid Plans : Keen Kola, Loud Leopard, Power Pug)
- Using Amazon Web Service
- Type : mosquitto
HiveMQ (Online -Free and Paid)
Connect to Public Broker
- Dashboard
- Broker: broker.hivemq.com
- TCP Port: 1883
- Websocket Port: 8000
- Web socket Client : http://www.hivemq.com/demos/websocket-client/
- Broker: broker.mqttdashboard.com
- TCP Port: 1883
- Websocket Port: 8000
Setup local instance
- Genral Download HiveMQ
- Arun Requested : Downloaded Link
m2m
Free public broker service
- q.m2m.io
- Broker: q.m2m.io
- Port: 1883.
- Application : Facebook messenger
Mosquitto (Local and Online free)
Eclipse Mosquitto™ is an open source v3.1/v3.1.1 Broker.
Free public Service
- iot.eclipse.org
- Broker: iot.eclipse.org
- Port: 1883, 80(WebScoket), 443 (WebSockets+SSl)
- mosquitto
- Broker : test.mosquitto.org
- Port:
- 1883 : MQTT, unencrypted
- 8883 : MQTT, encrypted
- 8884 : MQTT, encrypted, client certificate required
- 8080 : MQTT over WebSockets, unencrypted
- 8081 : MQTT over WebSockets, encrypted
- 80(WebScoket), 443 (WebSockets+SSl)
rabbitMQ
- https://www.rabbitmq.com/
- Install on windows
- Download rabbit for windows :
- Installation guide
Free public broker service
- dev.rabbitmq.com
- Broker: dev.rabbitmq.com
- Port: 1883,
SimpleML
- Free MQTT service to evaluate Machine Learning models, documentation
Free public broker service
- simpleml
- Broker: mqtt.simpleml.com
- Port : 1883 (MQTT), 8883 (MQTT +SSl), 80(REST), 80(WebSockets), 5683 (CoAP)
Other free public broker service
- dioty.co
- Broker : dioty
- Port : 1883 (MQTT), 8883 (MQTT +SSl), 80(REST), 8080(WebSockets), 8880 (WebSocket +SSL)
- swifitch.cz
- Broker :mqtt.swifitch.cz
- Port : 1883 (MQTT)
Interview Questions
Reference
- hivemq
- wiki
- http://www.hivemq.com/ (Tutorials)
- https://github.com/mqtt/mqtt.github.io/wiki
- https://github.com/mqtt/mqttorg-graphics
- github
- http://mqtt.org/
- http://mosquitto.org/download/
- https://www.youtube.com/watch?v=fwb5YAPzPGk
Embedded Protocol – I2C
I²C (Inter-Integrated Circuit) is a bi-directional two wires and serial data transmission communication protocol developed by Philips (Now NXP Semiconductor) in 1982. I2C is a Half-duplex communication protocol – (I2c can’t send and receive same time in the bus-data line). Multi-master can communicate with multi-salve. (Note: Communication is restricted between two masters; however, a single master can communicate with either a single slave or multiple slaves.) I2C is a Level Triggering. A device that sends data onto the bus is defined as a transmitter, and a device receiving data is defined as a receiver.
The bus must be controlled by a master device, responsible for generating the Start and Stop conditions. In contrast, certain devices such as LCDs, EEPROMs, and RTCs function as slaves. It’s important to note that both master and slave devices can operate as either transmitters or receivers. However, the master device plays a pivotal role in determining which mode is activated.