SWARM MODEM DATA

I hope one of the geniuses out there could help me to understand an issue with data queue and upload. While I was testing different sensors, modem stopped transmitting data to the SWARM satellites. Later I found out some data packets in the queue are corrupted due to wrong checksum. If you have a corrupt data packet in the queue will the modem stop transmitting any data packets following the corrupted data packet? Data transmission started only after I cleared the queue.

Hi @ekanayake,

Apologies, this is the first time we have heard about this issue. As far as I’m aware, if you attempt to queue a message for transmission - and it has an incorrect checksum - it should be rejected by the modem…

Just to make sure I understand you correctly, can you please confirm that the corrupt message was queued for transmission using $TD ? Do you know if it was acknowledged with $TD OK - or perhaps rejected with $TD ERR ?

Also, are you using your own code to queue the message - or are you using our Arduino Library? It does not matter either way, I would just like to understand how the wrong checksum was calculated.

Thank you,

Paul

Thanks, heaps, Paul, for replying and making it clearer.

I was experimenting with your code with my silly additions/changes. I just did more experiments and found out that you are absolutely correct that modem rejects bad data packets.

This is another observation I made which you could possibly explain why… please?

I have 7, (138 modems, 5 of your ones and 2 Evaluation kits from SWARM) installed within 6 Sq.m open area. Antenna of one of the units is installed about 1.5m higher than the rest of the units and all of them running the same code: measure soil moisture and upload data to the SWARM hive.

They uploaded data to the hive really well, but 6 of them stopped after a day. Only the unit with high antenna uploaded data to the hive. When I disconnected that unit with the higher antenna all others started uploading data to the hive. Does this mean that unit with the antenna which has better reception dominated others with poor reception? Thank you

Hi @ekanayake,

I have not heard about this ‘collision’ issue before either. You are “keeping us on our toes”! :wink:

Some ideas / thoughts:

Perhaps the modem with the higher antenna is able to ‘link’ to the satellite and transmit first. Perhaps the transmit causes the other modems to not transmit? Like other “Carrier-Sense Multiple Access with Collision Detection” (CSMA/CD) systems?

Or perhaps the other modems are all attempting to transmit at exactly the same time, causing a ‘collision’?

I guess you are only testing your system? Having seven systems within 6 sq.m does not seem sensible. If you only need to measure within such a small area, I would recommend using a different interface to read the moisture sensors, collate the results, and send the data using a single modem.

Or, if you are just testing, spread the systems further apart and see if that improves things?

If it is still not working for you, let me know and I will ask Swarm for advice.

Best wishes,

Paul

Thank you Paul for the response and advise.

Yes, 6 Sq.m is not realistic ( this patch is out of my office window so i could keep eye on the “Heart Beat” and program them using a long USB cable when required)

Now they are spread over 100 sqm area with clear open sky -101 > RRSI > -96.

I kept the one with higher antenna near my office (~1.5km away from the rest of the units).

I will wait for 24 hrs and see how it goes.

Thanks for the support. :slight_smile: much appreciated.

jagath

Hi Paul,

Somthing unexpected happened. All 5 modems except the two evaluation kits stopped working ( while I was tinkering with the code) . Do not know why but I got this messages on serial.

Why MD5 in SPI flash INVLID. Is this somthing to do with malfunction.

Much appreciate if you could possibly put me in the right direction.

jagath

Checking image MD5 in STM32 flash… valid

Identifying SPI flash… FOUND (Mfr 0x9d ISSI Type 0x6017)

Checking image MD5 in SPI flash… INVALID

Transferring control to application…

$M138 BOOT,POWERON,Swarm M138 (M138)*44

$M138 BOOT,POWERON,Copyright (c) 2019-22 Swarm Technologies, Inc*2d

$M138 BOOT,POWERON,LPWR=n,WWDG=n,IWDG=n,SFT=n,BOR=Y,PIN=Y,OBL=n*43

$M138 BOOT,VERSION,2022-05-16T21:45:08,v2.0.2*2f

Hi Jagath,

I have seen the same “Checking image MD5 in SPI flash… INVALID” message many times. I do not fully understand what it means, but I do not think it is anything to worry about.

I do recommend telling the modem to “power off” before disconnecting the power. That might help.

Through our library:

mySwarm.powerOff()

To do it manually, send:

$PO*1f

Best wishes,

Paul