Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
Lab4-Sensors
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michele Fiori
Lab4-Sensors
Commits
9bfbe0c4
Commit
9bfbe0c4
authored
May 01, 2024
by
Michele Fiori
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
e26c8aa6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
48 deletions
+1
-48
README.md
README.md
+1
-48
No files found.
README.md
View file @
9bfbe0c4
# Setup REST and MQTT
# DPS Sensors
*
You can import the project directly from a
*Version Control System*
, by providing the following URL:
https://ewserver.di.unimi.it/gitlab/michelefiori/Lab4-Examples
<img
src =
'./assets/img_1.png'
>
*
Otherwise, take care to import the project as a Gradle Project
*
If required, trust the project and accept the Gradle auto-import
*
Wait until the Gradle indexing process ends (it may take a few seconds)
## REST
*
Run StartServer.java located in:
*REST\_MQTT_example/src/main/java/REST/*
*
Don't worry about the red
*INFO*
console prints
*
Use a REST Client application (i.e., Advanced REST Client) to test if the server works correctly
*
For example you can run the following request:
<img
src =
'./assets/img_2.jpeg'
>
## MQTT
*
Mac OS:
*
Install homebrew from (https://brew.sh/index_it)
*
From the terminal:
`brew install mosquitto`
`brew services start mosquitto`
… running …
`brew services stop mosquitto`
*
Windows:
*
Download and install the mosquitto broker from https://mosquitto.org/download/
*
Launch the mosquitto.exe file from C:
\P
rogram Files
\M
osquitto
*
Linux (http://www.steves-internet-guide.com/install-mosquitto-linux/):
*
From the terminal:
`sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa`
`sudo apt-get update`
`sudo apt-get install mosquitto`
`sudo apt-get install mosquitto-clients`
`sudo apt clean`
`sudo service mosquitto start`
... running …
`sudo service mosquitto stop`
You can try to run the class SubExample and then the class PubExample to test that everything is working.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment