Changes

Created page with "After you have installed the OpenSSL software and created the certificates and keys, the last step is to configure your FM device and your Flespi server, here you will find th..."
After you have installed the OpenSSL software and created the certificates and keys, the last step is to configure your FM device and your Flespi server, here you will find the full guide on how to do it.
[[Category:TLS/DTLS implementation for Flespi using OpenSSL]]

{| align="right"
|__TOC__
|}

==Preparing and configuring your Flespi server for TLS implementation==
<br />
1. Create a new flespi channel with enabled TSL (SSL) encryption. <br />
2. Open your flespi account.<br />
3. Go to Channels.<br />
4. Click the '''"+"''' sign to add the channel.<br />
5. After adding the new channel, put the server’s name, for protocol select Teltonika, check the TLS box, and select encrypt with custom TLS certificate. Copy and paste the server.crt and server.key and lastly click '''save'''.<br />
'''Note:''' The host will be your domain name/IP address, Port number, and protocol which is Teltonika, this channel supports TCP/UDP protocol and lastly TLS/SSL encryption via TCP.
<br />
[[File:Creating TLS server 2.gif|alt=|frame|none]]
==Server.crt, Server. key and Root.pem==
<br />
1. Finding your certificate and keys using windows explorer is easy to do, first is go to PC directory '''C:\Users\username.'''

'''Notes:''' '''username''' – this is the user account name of your pc.
[[Image:Command11.png|alt=|none|thumb|233x233px]]

2. Open server.crt and server.key file using notepad or Notepad ++ to copy and paste the details to your server.
[[Image:Command12.png|alt=|none|thumb]]

3.The '''ca.crt''' file needs to be renamed as '''root.pem''' after that upload it to the device.
<br />
[[Image:Rootpem.png|alt=|none|thumb|411x411px]]

==Uploading root.pem file to the device==
<br />
1. Open the configurator. <br />
2. Select your device. <br />
3. Go to the '''security'''. <br />
4. Select '''upload''' from the certificates tab. <br />
5. Locate '''root.pem''' from your pc and upload it to your device. <br />
<br />
[[Image:Uploading certificate to device.gif]]
== Configuring TLS/DTLS server to Teltonika Device==
<br />
1. Open the configurator. <br />
2. Go to '''GPRS'''. <br />
3. Enter your server details, Domain, Port, Protocol type, and TLS Encryption type. <br />
4. In our case we enable the TLS/SSL encryption in our server, so we should select '''TLS/DTLS''' and click save to device. <br />
<br />
[[Image:Saving_TLS_server.gif]]
==Adding Teltonika Device to your Flespi account==
<br />
1. Add the device IMEI to the flespi server. <br />
2. Go to the '''devices'''. <br />
3. Click the '''"+"''' sign to add the device. <br />
4. Fill in the following details device name, device type ID, IMEI, and click '''save'''.<br />
5. If the configuration is correct, you can verify if your device sending data to your server via the Teltonika configurator, go to the status tab and check the sockets, records, GSM Status, and GRPS traffic.<br />
<br />
[[Image:Adding_device_to_flespiee.gif]]
'''Note:''' You can also check the flespi platform to verify if the device is sending data to your sever, sending GPRS command to the device is the easiest way to test the connection between server to device and viceversa.

[[Image:Sending GPRS command via flespi.gif]]