Hello Guest, Welcome to Apnea Board !
As a guest, you are limited to certain areas of the board and there are some features you can't use.
To post a message, you must create a free account using a valid email address.

or Create an Account


New Posts   Today's Posts

Using FlashAir, what's the timestamp on the data files?
#1
Using FlashAir, what's the timestamp on the data files?
I am intrigued by the Flashair technology, and have an off-the-wall question for those of you who use one and have a ResMed cpap -- when the data files appear, are the creation times and modified times set by the system clock in the CPAP? Or do they get the time from the network?

(I'm curious because if the file metadata gets the time from the network, that would give you a precise measure of the clock drift on the machine. Because these files have DateTimes as file names, so if you compare the time in the name to the time in the metadata, you know exactly how far the clock is off. Of course if the metadata gets set by the machine, it won't help.)

(You know it's a complete engineering fail that these machines have cell phone modems, they "phone home" every day, but the engineers didn't set them up to correct the clock using the cell phone network!)
Post Reply Post Reply
#2
RE: Using FlashAir, what's the timestamp on the data files?
When using a FlashAir the timestamps used, refer to the device.
Post Reply Post Reply
#3
RE: Using FlashAir, what's the timestamp on the data files?
Ah, well. it was a thought...

The ResMed engineers who didn't think to put the code in to sync the clock using the cell phone network are idiots! Maybe they'll fix that in the AirSense11?
Post Reply Post Reply
#4
RE: Using FlashAir, what's the timestamp on the data files?
(04-19-2021, 03:06 PM)cathyf Wrote: Ah, well. it was a thought...

The ResMed engineers who didn't think to put the code in to sync the clock using the cell phone network are idiots! Maybe they'll fix that in the AirSense11?

Ya that why they put ble connectivity. Will be possible to purchase a Bluetooth sundial Laugh-a-lot
Post Reply Post Reply
#5
RE: Using FlashAir, what's the timestamp on the data files?
(04-19-2021, 03:06 PM)cathyf Wrote: Ah, well. it was a thought...

The ResMed engineers who didn't think to put the code in to sync the clock using the cell phone network are idiots! Maybe they'll fix that in the AirSense11?

The cellular networks don't serve time, nor do cell devices use the network to use a more traditional time protocol like NTP or PTP, though one can use an app for that. Cell phones capable of time syncing use GPS Network Time Synchronization.
Post Reply Post Reply
#6
RE: Using FlashAir, what's the timestamp on the data files?
(04-20-2021, 09:04 AM)Dog Slobber Wrote: The cellular networks don't serve time, nor do cell devices use the network to use a more traditional time protocol like NTP or PTP, though one can use an app for that. Cell phone's use GPS Network Time Synchronization.

Here are the commands i used: 
Command to read the GSM RTC clock : 
AT+CCLK?
Command to enable GSM RTC network time sync : 
AT+CLTS=1
Command to save the command settings to memory so that the time is synchronized on every boot up automatically. 
AT&W 

Procedure : 
Read current time (You can see that the time is not right): 
AT+CCLK?
+CCLK: “04/01/01,00:14:12+22”
OK
Enable auto network time sync : 
AT+CLTS=1
OK
Check if value is set : 
AT+CLTS?
+CLTS: 1
OK
Save the setting to permanent memory so that module enables sync on restart also  : 
AT&W
OK
Restart the module and check time  : 
AT+CCLK?
+CCLK: “18/06/21,12:00:21+22”
OK

or you can use http request too or sms request or what you want
Post Reply Post Reply
#7
RE: Using FlashAir, what's the timestamp on the data files?
biorn - It would be helpful to know what device, and app, was used for issuing those commands.
Crimson Nape
Apnea Board Moderator
www.ApneaBoard.com
___________________________________
Useful Links -or- When All Else Fails:
The Guide to Understanding OSCAR
OSCAR Chart Organization
Attaching Images and Files on Apnea Board
Apnea Helpful Tips

INFORMATION ON APNEA BOARD FORUMS OR ON APNEABOARD.COM SHOULD NOT BE CONSIDERED AS MEDICAL ADVICE. ALWAYS SEEK THE ADVICE OF A PHYSICIAN BEFORE SEEKING TREATMENT FOR MEDICAL CONDITIONS, INCLUDING SLEEP APNEA. INFORMATION POSTED ON THE APNEA BOARD WEB SITE AND FORUMS ARE PERSONAL OPINION ONLY AND NOT NECESSARILY A STATEMENT OF FACT.
Post Reply Post Reply
#8
RE: Using FlashAir, what's the timestamp on the data files?
Those are commands used for GSM devices, think of them as being similar to the old modem AT commands.

Time messages (NITZ) are optional and not supported universally by GSM providers, and allegedly are quirky with Time Zone. Which is why [most] cell phones use GPS.
Post Reply Post Reply
#9
RE: Using FlashAir, what's the timestamp on the data files?
(04-20-2021, 10:12 AM)Crimson Nape Wrote: biorn - It would be helpful to know what device, and app, was used for issuing those commands.

It's just an exemple of request time possibility with the embeded gsm modem. (request time on the network)
Post Reply Post Reply
#10
RE: Using FlashAir, what's the timestamp on the data files?
(04-20-2021, 09:04 AM)Dog Slobber Wrote:
(04-19-2021, 03:06 PM)cathyf Wrote: Ah, well. it was a thought...

The ResMed engineers who didn't think to put the code in to sync the clock using the cell phone network are idiots! Maybe they'll fix that in the AirSense11?

The cellular networks don't serve time, nor do cell devices use the network to use a more traditional time protocol like NTP or PTP, though one can use an app for that. Cell phones capable of time syncing use GPS Network Time Synchronization.

I was thinking more along the lines of the machine is talking to the ResMed network and could ask what time it is. From there it would be simple to write that information somewhere in the data stream. The clock doesn’t drift very far very fast, so that would fix most problems well enough. 

Having been a bemused bystander to the great network time religious wars, I can say that the takeaway is that it’s not that hard to do something reasonably intelligent, and then developers can figure out what to do from there. 

I’m wondering if you could use the FlashAir syncing to keep reasonable track. There are a whole bunch of files being created with times embedded in the names, and everything has creation times in the metadata. You ought to be able to run a script that would keep track of which flies first appeared when and then you should be able to zero in on the clock drift after watching files pop up all night. 

But, anyway, the computer nerds had invested an extraordinary amount of thought into managing times over far-flung networks, and had it pretty well figured out long before GPS was even dreamt of. The ResMed engineers obviously put some considerable thought into how to manage the problem that the date rolls to the next day in the middle of the night which you want to be all part of “one night’s sleep”. And what they came up with is not stupid. So they solved the hard problem but didn’t think about the easy problem!
Post Reply Post Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Question OK TO IMPORT SLEEP DATA FROM OLD SD CARD INTO OSCAR W/O MESSING UP CURRENT DATA? Plmnb 1 75 10 hours ago
Last Post: Ibrumley
  Data Files in an upgrade AlanR 2 85 03-10-2024, 06:45 PM
Last Post: AlanR
  Flashair - Dreamstation -> Airsense 11 Autoset todivefor 14 664 02-28-2024, 07:22 PM
Last Post: Crimson Nape
  Getting O2 Insight Pro files to OSCAR? SnoozeBest 7 242 02-26-2024, 10:23 PM
Last Post: SnoozeBest
  Viatom/WellUE data is different than OSCAR displayed data GordK 3 289 02-23-2024, 04:48 PM
Last Post: GordK
  Data structure / data definition of AirSense 11 CD, CMSd50+ or OSCAR?hing obvious, … Perickson 4 1,628 02-18-2024, 01:49 PM
Last Post: Perickson
  OSCAR Doesn't Recognize Data Files Heaviside 1 201 02-17-2024, 05:03 PM
Last Post: Heaviside


New Posts   Today's Posts


About Apnea Board

Apnea Board is an educational web site designed to empower Sleep Apnea patients.