Hello everyone. Welcome back to the video number 8.3 where
we're going to test the cope client and
the cope device server. So here is the
cope Jason client that I have created which is
inherited from the json.js where
this Jason rjs have both client in
the server, but I just created that client because we already have
a device server.
so
In the previous video. I told you that a device
service capable to respond for the three type of
request aqy temperature and the humidity and
in this terminal the server has been already running
in the background on the power 5683. So
now it's time to test with the client. So here I just okay.
Let's see about the code.
Here we have
Required the core library and the P1 and
here we are creating the request of that
request. The URL is temperature. It's less
temperature that we want to fetch from the device server and
we accept the application slash Json format
for the data. And this is
the response code that we will receive from the server and
here is the Json response that
we're going to display here.
So let's call that note the
node.
For json.js you see here
that we have requested. The temperature here is
the response code 2.05 and here's the
data injection format temperature column 31 and
server is displaying that device or
you can say that client has requested slash temperature.
Okay. Now again, we
will have the temperature and the random method return
as a different value 17 and we are also
watching all the requests that voiceover has
been receiving
from The Cove client. Okay now it's time to
try humidity.
And you will see the value 49 humidity and
again.
87 now
these are the
two requests for the humidity and the tool request for the temperature
and it's time for aqi.
You see here.
Every time values has been changing and these are the requests. So
guys, this is the example where we have
just created a device server. And this is the core client. You
can consider it. This is a device and this is the web
based application which is getting the data from the
device over directly. Okay?
but this is for the testing purpose but in the real cases,
we need a Corps server where all the
because we are unable to assign a live web
address to each device because already we have ipv4 shortage
and it's difficult to
assign a several IP address. So the server is required and
board devices and clients will
interact with each other via the
curb server. So here are the complete list
of all the stuff in Java and
python C++. For example if you want to
Deploy, a cop server or cop client on the Arduino devices
are on a Raspberry Pi then there are
different libraries which support pythancy plus plus even
dotnet is also available.
For example, if you are using Windows dotnet core on the
Raspberry Pi then the C sharp is a good to go for the
setup and here you will also get the complete details
regarding different servers. Actually. I already have a
plan to use a copper cop extension
for the Chrome browser. But still
they didn't updated that extension because
now Google Chrome has been sporting.
Version 3 and still they have a version 2 but
I hope the guys will update the extension and
you guys can check that and if they updated the
plugin then you guys can use that and it's a very beautiful
ui-based copper
cop plugin to interact and
visualize the data in a different format. So guys,
this is the last video of the corpse section in the
next section. We're going to
Compare different communication Technologies as
well as communication protocols. So this
is the final section from that because next section
is just conclusion section. So guys see you in the next section. Have
a good day. Bye.