psimon
Posts: 8
Joined: Fri May 06, 2016 8:06 pm

real time from bluetooth

Fri May 06, 2016 8:50 pm

just seeing if anyone has done this, or knows it is/not feasible.

run a bluetooth time server app on a phone and have the rpi3 set its time from it.

psimon
Posts: 8
Joined: Fri May 06, 2016 8:06 pm

Re: real time from bluetooth

Mon May 09, 2016 11:12 pm

apparently low energy actually just has this service, at a low level.

https://developer.bluetooth.org/gatt/se ... t_time.xml

User avatar
Douglas6
Posts: 4860
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: real time from bluetooth

Tue May 10, 2016 12:45 am

Yup, that's a standard GATT profile. I am not aware, and doubtful of, any Linux package to automatically update system time with that information. You'll probably have to roll your own.

psimon
Posts: 8
Joined: Fri May 06, 2016 8:06 pm

Re: real time from bluetooth

Wed May 11, 2016 6:59 pm

i have found a project to expose GATT service/profile/functionality, one of their examples is a time server/client.

but confused as to why you need a server, i thought the server would just 'be there' on a BTLE device, because its designers realised a time server is best built-in, particularly for the targeted, IOT devices.

User avatar
Douglas6
Posts: 4860
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: real time from bluetooth

Wed May 11, 2016 7:06 pm

BLE is all about low energy: don't broadcast unless you need to.

psimon
Posts: 8
Joined: Fri May 06, 2016 8:06 pm

Re: real time from bluetooth

Wed May 11, 2016 7:57 pm

well, i expect this is only as a response to a request, IOT maybe commonly not having a RTC, (thats on all the time, just like a RPi), so no energy extra apart from the, one-off, required response.

Return to “Advanced users”