A Forum run by Enthusiasts of MidNite Solar

Charge Controllers and Clippers => The "Classic" charge controller => Topic started by: mcsarge on November 26, 2019, 10:20:25 AM

Title: Classic Data Usage Question
Post by: mcsarge on November 26, 2019, 10:20:25 AM
Hi All,

I have a pretty cool cell modem/router (Cradlepoint) that handles the traffic to/from my Classic running on an island in Canada and I am wondering something, I see that the data downloaded to the Classic is actually higher than the data uploaded. Can anyone explain why that is so? It seems to me that the Classic should just be making a pretty modest data upload every now and again, I wonder why the download data is so high.

Attached is a picture of the data usage.

Matt
Title: Re: Classic Data Usage Question
Post by: FNG on November 26, 2019, 02:03:32 PM
My guess is you are using My Midnite? If so I suspect the data to be close to equal both ways as My MidNite has to acknowledge back and verify etc. The amount of actual data used for the values is almost unmeasurable in relation to all the handshake info back and forth
Title: Re: Classic Data Usage Question
Post by: boB on November 26, 2019, 02:45:07 PM

The Classic must be downloading free movies and music !

Actually, is is probably as FNG says...  Requests, handshakes, responses, etc.

Maybe also keeping the connection alive ?  If you run  a program like Wireshark, you can see all of the traffic.

boB

Title: Re: Classic Data Usage Question
Post by: mcsarge on November 26, 2019, 02:52:53 PM
Yes, using MyMidnite, but the downloaded data is more than the uploaded but quite a bit.

I get that there is a simple exchange going on, but I would have probably programmed the system to upload to MyMidnite with a CRC checksum and then have MM calculate the CRC itself and compare, and if they were not equal, ask for a re-transmission.

I can load wireshark on the RPi and see if I can take a look. But with Cell connection costs measured by the kilobyte in Canada, I really would like less total data.

Matt
Title: Re: Classic Data Usage Question
Post by: atop8918 on November 26, 2019, 03:56:57 PM
This is due to the security handshake between the Classic and the Server.
We use a reduced Diffie-Hellmann key exchange (similar to the SSL/TLS web browsers use).
Part of this is the server pushing an encrypted certificate down to the Classic so the Classic can verify that it is talking to the real MyMidNite.
MyMidNite was originally slated to do 2-way communication with the Classic and as such I needed to make sure that no one would be able to pretend to be our server in order to hijack a user's system. In these days of script kiddies et al., you can't be too careful with security.
<tech mumbo jumbo>
Each Classic has a unique public/private keypair.
The Server has its own public/private keypair.
The Classic uses MyMidNite's public key to encrypt a small packet containing a one-time session token and some unique data about the Classic itself.
MyMidNite decodes the certificate using its private key and if the certificate is valid it will respond with either a valid certificate of its own or a garbage certificate to throw off attackers.
This is where you get the size issue.
The Classic then responds with its own certificate along with the requested data using the one-time session token to encrypt the data.
</tech mumbo jumbo>
Title: Re: Classic Data Usage Question
Post by: mcsarge on November 26, 2019, 11:09:13 PM
Aha! I see now it is a much more full featured interchange and that answers my question!

Makes total sense. Many thanks for the response.
Title: Re: Classic Data Usage Question
Post by: atop8918 on November 27, 2019, 07:48:12 AM
I am sorry about the data usage issue. One of the reasons I used a modified Diffie-Helmann instead of full TLS was to reduce the bandwidth. There is a SHA-256 hash in there that takes up 32 bytes of space. A basic 2-byte CRC probably would have sufficed.
I'm working on version 3 of our site for our next generation of products. Bandwidth is one of the issues I'll be addressing.
Title: Re: Classic Data Usage Question
Post by: mcsarge on November 27, 2019, 11:41:03 AM
atop,

Never mind my grousing, I have a 2GB SIM and it still falls far under that, but if i ever switched to Hologram, it would become a pain because they charge by the kilobyte.

I wonder if you guys are thinking about maybe leveraging Power BI with this data? It would be an awesome combination of solar data crossed with time of year, weather and location.

Keep up the good work, and Happy Thanksgiving!

Matt