direct IP, UDP packets data usage

Hi all,
I’ve just tested my developer sim card with an Arduino Uno + SIM800L module, using AT commands on SoftwareSerial, in particular:

  1. AT+CIPSTART=“UDP”,“my.server”,5005 => to start the UDP “connection” (I know, it’s connectionless)
  2. AT+CIPSEND=8 => to tell UDP I’m going to send 8 bytes
  3. I’m sending the 8 bytes one by one with a SoftwareSerial .write(byte).
  4. I’m not closing the UDP “connection” in any way.

I’ve sent around 10 UDP packets, 8 bytes each. My use case requires sending 8 bytes as often as possible, while staying within the free 1mb per month. On the positive side, I don’t require the application to be running 24/7, i.e. it will probably run 4-5 times a day, normally for around 15-20 minutes each time.

Now, I was hoping that with UDP I’d send 8 bytes plus the UDP (8 bytes overhead minimum) and IP (20 bytes overhead minimum) overhead, for a total of 8+28=36 bytes sent per packet. I was ready to see this number grow a little bit, let’s say 2x, so 72 bytes.

To my surprise, I’ve logged in the dashboard today, and instead of (around) 10 packets, I see 4 “sessions”, each being at least 255 bytes, one of them is 1413 bytes!

Can someone please explain what is happening here?

In particular:

  1. I’m using UDP on purpose to avoid any concept of “session”. I just send a packet, I don’t expect and don’t want any “session” to be kept alive. I’m fine with losing packets.
  2. Do I need to send an AT+CIPCLOSE every time I send the 8 bytes packet? Will this save me data? Will this increase the data I’m sending? Is it ok to just let it die by itself?
  3. If I don’t send an AT+CIPCLOSE, is this telling the modem to anyhow “keep the connection alive”, therefore increasing the overhead (kind of a duplicate of the above question).

Any help appreciated.

Thanks a lot!

I’d like to point out that I’m sending a udp packet to my.server (using the domain name, not the IP address). I just realized this consumes additional data, I still can’t make it add to 255 bytes.

Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.