-
-
-
I am a bit nervous about a a pull request as I have made changes to my forked repository that I am sure will conflict and as you can probably ascertain from that, I am a little ignorant of pull requests in general:-). On my bangle.js, I use both the official app loader and my forked loader. Your advice on how best to proceed would be appreciated!
-
New App Development
It would be nice to have somewhere to discuss and find new apps. New apps do of course appear in the downloader, but they can get lost among the large number of existing apps. To get things started, here are some apps that I have been working on. They can be loaded from https://jeffmer.github.io/JeffsBangleAppsDev/.
The first app gpstrack displays a track recorded by gpsrec together with the duration and length of the track. The app uses equirectangular projection both to map the track to screen and for distance calculation. This is accurate for small distances and requires much less computation than a Mercator projection.
The second app is a small boat navigation app. It displays the current course and speed together with bearing and distance to a waypoint. The display includes an animated linear moving compass display. The red triangle is the current course and the blue circle the bearing to the waypoint. When both line up as in the picture you are on course to the waypoint. The app is compatible with the gps recording widget. The app takes a file
waypoints.json
with a set of waypoints. I am waiting for a tutorial on downloading files usinginterface.html
!I also have a set of clockfaces which are largely modified versions of the existing clocks. Here are two of them:
Firstly, a large font clock which can be read in sunlight:
Secondly, an analogue clock with moving second hand:
I have linked together these and other clock apps so that I can change the watch face using BTN1 and BTN3 to cycle through them. I have found this useful when outside when I cannot read the analogue display in bright sunlight.
I am currently looking at Apple's ANCS to see if IOS notifications can be displayed on Bangle.js. There are some Arduino examples so it should be possible.
iPhone notifications for Bangle.js
I have been working on an app to get Bangle.js to display notifications from an iPhone such as calls, emails etc on the Bangle using Apple's ANCS - Apple Notification Center Service. I have made some progress and hit an obstacle which I outline in the following in the hope that someone can suggest a way forward - other than buying an Android phone:-)
The first step is to get the iPhone to see the Bangle.js in Settings for bluetooth. To do this the advertising packet from Bangle.js needs to contain the UUID of the solicited ANCS service. This is published by Apple as:-
7905f431-b5ce-4e33-a455-4b1e122d00d0
.The following code achieves this and allows the iPhone to connect to the watch.
When connected the watch can display the iPhone's bluetooth address for the ANCS service. As can be seen from the screen photo this is a private resolvable address. Note that the watch does not start advertising until it is disconnected from the Web IDE - the first disconnect in the photo.
Now for the problem. Bluetooth specifies both that a device may be Master/Central or Peripheral/Slave as well as whether it is a Client or Server. The Espruino examples all have the Master as Client and the Slave as Server. The Master initiates the connection and the Client accesses the data provided by the Server. The problem is that the ANCS has the Master as Server and the Client as Slave. In other words, the iPhone initiates the connection and also provide the ANCS service. The watch is the Slave which responds to the connection and then accesses the ANCS service as a client. The Espruino API as far as I can ascertain does not have a way to let you create a BluetoothDevice and then a BluetoothRemoteGATTServer to access the remote server for this Slave/Peripheral - Client combination. I tried an NRF.connect() to the private address, however, this immediately drops the connection.
The Espruino Bluetooth API is a joy when compared with the complexity of the Nordic or Arduino APIs, so I do hope that I am wrong and there is a way of doing this or that it can be easily extended.