I am calculating the data plan i will need to send data from an Arduino MKR NB 1500 to the cloud.
I am wondering if my calculation is correct, any feedback is appreciated.
Let's say we want to send 2 integer values every second. An integer value on this board uses a 32 bit value. So a total of 64 (32*2) bits are needed, which comes down to 8 bytes (64/8).
There are 2.592.000 seconds in a month. So a total of 8 * 2.592.000 = 20.736.000 = 20.7 MB
I suspect there are extra bytes needed in every packet send, does anyone have an estimate for this?
I have no idea what you mean by packet format. Could you explain this?
I would like to send data from this arduino board to the arduino IoT cloud using a sim card which works on the LTE-M network. So i don't understand in what you mean by 'what software does it belong to?' Do you mean the encryption that is used?
I'm flummoxed because you brought up the subject of packet, not me. How are you planning to send the values from one place to another? I mean, how will you send the data, not on what device or over what communications medium?...
I am very pleased to launch the public beta release of the Arduino IoT Cloud with automatic dashboard generation, Webhooks support, and full TLS secure transport.
I have also seen MQTT somewhere, but i am not familiar with these terms to be honest
Each record contains a 5-byte header, a MAC (up to 20 bytes for SSLv3, TLS 1.0, TLS 1.1, and up to 32 bytes for TLS 1.2), and padding if a block cipher is used.
So if i understand this correctly a minimum of 5 + 20 = 25 bytes are added to the packet size, which is quite significant. And 5 + 32 = 37 bytes if TLS1.2 is used
I acutally think the MQTT is used now, and this protocol uses the following, which is way better compared to the amount of bytes
The MQTT packet or message format consists of a 2 byte fixed header (always present) + Variable-header (not always present)+ payload (not always present).
I'm not saying you're wrong but you need to check if the MQTT packets are sent 'as is' over a mobile connection or if they are inserted into whatever packet format the mobile connection uses. If the former then no problem, if the latter the you have additional overhead bytes from MQTT. The MQTT packets have to survive in tact to the MQTT broker, not get stripped off by some part of the connection you are using, so I suspect, but do not know for sure, that the latter scenario is the one you need to consider.
Do values actually have to be sent every second or just recorded? What about collecting data and sending it at a lower frequency (every minute/hour) to reduce the overhead?
Do values actually have to be sent every second or just recorded? What about collecting data and sending it at a lower frequency (every minute/hour) to reduce the overhead?
Ya i was thinking exactly the same and that is most likely what i will end up doing, thanks for the tip! Arduino will arrive shortly so i can actually start testing
You can use an int16_t or an uint16_t: that's going to be platform-agnostic. Or, if you want to send 32-bit values, you can marshal 2 values into a 32-bit integer and send that in one go. Depending upon your actual range of values, you may even be able to fit 3 values into a single 32-bit integer and have room to spare for a parity bit, etc.