TinyCircuits

TinyScreen Smartwatch

TinyScreen Smartwatch
« on: March 08, 2015, 09:10:37 AM »
The answer to this is probably obvious - but I've never worked with Bluetooth or BLE - do I need to write an app for my smartphone to communicate with the TinyDuino (using the smartwatch kit)? Or is there a smartwatch app out there already>

Re: TinyScreen Smartwatch
« Reply #1 on: March 09, 2015, 07:21:29 PM »
We have an example Android app that just went up. It's currently available for testing at https://github.com/TinyCircuits/TinyCircuits-TinyScreen-Android-App

It shows how to connect and pass simple notification data- texts and incoming calls at the moment.

Our example watch code is available at https://codebender.cc/sketch:91833

Re: TinyScreen Smartwatch
« Reply #2 on: March 14, 2015, 01:40:57 PM »
I've just got the smart-watch kit for a school class, and I am having trouble pairing it with my i-phone. Does anyone know what i can do to help pair them, or should i just wait until there's another update on the website?

Re: TinyScreen Smartwatch
« Reply #3 on: March 16, 2015, 11:53:21 AM »
@Ben can you provides a little bit more explanation ? (sorry i'm n00b)

Android:

I got the Android app running on Android Studio in Debug mode on my Nexus 5
The ScanActivity is running and see BLE devices but do not see the TinyDuino

- How the app should work (where to look/debug in the code) ?
- Where is performed the time update ?


Tinyduino:

The code is installde from codevender but not from Arduino IDE (it look for Time.h and TinyScreen.h)

The time is displayed, buttons works, but it is not sync with the phone
- I assume ble_rx_buffer is filled by BLEsetup() ?
- Where the TinyDuino id is sent to the phone ?

Thanks !

Re: TinyScreen Smartwatch
« Reply #4 on: March 16, 2015, 05:58:20 PM »
ainfield, we do not yet have an iPhone app, it's something we'll have but I don't know exactly when.

jpencausse, note that the name in the BLE advertisements which will show up in the app is URT, due to the Nordic virtual UART setup. The date/time update should happen automatically after a connection is made.

ble_rx_buffer is filled in aci_loop() when there is new data.

The name/ID is set through the Nordic setup code which needs to be generated with their software.

Hope this helps you get the demo working.

Re: TinyScreen Smartwatch
« Reply #5 on: March 16, 2015, 08:08:55 PM »
Ok thanks understand

I didn't see URT in the scan I'll dig (other BLE device crash the app)

Whats shoud I do to make it work in Arduino IDE ? (It look for TinyScreen.h and Time.h may be I missed something)


Re: TinyScreen Smartwatch
« Reply #6 on: March 16, 2015, 10:28:34 PM »
ainfield, we do not yet have an iPhone app, it's something we'll have but I don't know exactly when.
There's no TinyDuino app, but Nordic has one. https://itunes.apple.com/us/app/nrf-uart/id614594903?mt=8
That app will let you communicate directly over UART to the TinyDuino. If you look at the Android app you can find the commands you'd need to send so you can test and build your own iPhone app around it.

The name/ID is set through the Nordic setup code which needs to be generated with their software.
Do you have a link to the software we'd need to rename it? I'm not a personal fan of the URT name. ;)

Re: TinyScreen Smartwatch
« Reply #7 on: March 16, 2015, 11:03:52 PM »
If anyone would like the already compiled Android app to test without downloading the code and compiling it, the unmodified app is right here.

https://drive.google.com/file/d/0Bwvr66JlAk_7N21yQmNYbzJvZEk/view?usp=sharing

Re: TinyScreen Smartwatch
« Reply #8 on: March 17, 2015, 07:02:50 PM »
jpencausse, you need to download the Time library http://playground.arduino.cc/code/time and our TinyScreen library at https://github.com/TinyCircuits/TinyCircuits-TinyScreen_Lib and put them in your libraries folder.

WakeArray, thanks, and the software is at https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRFgo-Studio

You'll also need the Nordic's library at https://github.com/NordicSemiconductor/ble-sdk-arduino/releases

Open nRFgo Studio, click on nRF8001 Configuration, then open the xml file under the ble_uart_project_template in the library. You can change the advertising name under GAP settings. Then generate services.h and replace the old file in your sketch folder.

Overkill procedure for changing the name, but that's that. It looks like it's possible to change it during run time, but I can't find the function that sets the name. For now, I've just changed the CodeBender example to advertise as BLEWatch instead of URT, at least.

Re: TinyScreen Smartwatch
« Reply #9 on: March 18, 2015, 09:52:44 AM »
I'm not sure if I am missing something or not but I was able to load the TinyWatch code up just fine from the sample code on Codebender but I only see it showing the time which doesn't refresh until the screen shuts off and then when you turn it back on it shows the new time.

Is this the only feature?

ALso, I wasn't able to get it to show the time properly. It had January 1st and 00:00:00 - I saw something about sync'ing it with the android app to do it properly but the android app just keeps crashing on me. I tried the uART program on the iPhone and I was able to successfully connect but didn't know the hex codes or whatever was necessary to set the time properly.

It's a bummer it doesn't count the time in real time and the screen needs to go off and on again before showing the updated time.

Again, maybe I am missing something and there are a lot more features in the sample smart watch code so any help would be greatly appreciated.

Thanks.

Re: TinyScreen Smartwatch
« Reply #10 on: March 18, 2015, 12:32:28 PM »
The time doesn't tick over without a sync because of the "&& timeStatus()==timeSet" condition that is checked before updating the screen when it's on. Once it has been connected to the Android app or you remove that condition, it will update every second when the display is on until it shuts off after five seconds- you can change displayUpdateInterval and sleepTimeout if you don't like that.

If you can post more details about your Android phone and why the app is crashing, I can try to fix it. Once the app is connected, it will set the date/time and send basic text/phone call notifications to the watch. That's all the example does for now.

Re: TinyScreen Smartwatch
« Reply #11 on: March 18, 2015, 05:59:30 PM »
The time doesn't tick over without a sync because of the "&& timeStatus()==timeSet" condition that is checked before updating the screen when it's on. Once it has been connected to the Android app or you remove that condition, it will update every second when the display is on until it shuts off after five seconds- you can change displayUpdateInterval and sleepTimeout if you don't like that.

If you can post more details about your Android phone and why the app is crashing, I can try to fix it. Once the app is connected, it will set the date/time and send basic text/phone call notifications to the watch. That's all the example does for now.


Ah, OK. Gotcha. I'd like to get the Android app working. The phone is an Galaxy S II (SGH-T989).
Android version 4.1.2
Baseband Version: T989UVMC6
Kernel Version: 3.0.31-1003885
Build Number: Jz054k.t989uvmc6

Re: TinyScreen Smartwatch
« Reply #12 on: March 18, 2015, 11:02:16 PM »
Ah, OK. Gotcha. I'd like to get the Android app working. The phone is an Galaxy S II (SGH-T989).

Sadly even though the S2 shipped with a Broadcom chipset capable of bluetooth 4.0, it was never enabled in software. Part of this is because Android had no default support for Bluetooth 4.0 till nearly 2 years later and by that time the chipset was so outdated writing software to make it work was not a priority.

The S3 was the first Android phone with software support for 4.0 and it wasn't even widely used because Samsung had to make their own support for it, a support that was entirely different from Google's own implimention nearly a year later.

Edit: Turns out Broadcom wrote their own drivers for it and it can be used in Android 4.3(The version of Android that first supported bluetooth 4.0). Only downside is that you have to root and install a newer rom for it to work. From the sounds of it CM11 should support this.

TL;DR: To the best of my knowledge there's simply no easy way to make this work with the S2 without rooting.

Source: I worked for Best Buy selling phones for 4 years.
« Last Edit: March 18, 2015, 11:09:50 PM by WakeArray »

Re: TinyScreen Smartwatch
« Reply #13 on: March 18, 2015, 11:14:56 PM »
WakeArray, thanks, and the software is at https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRFgo-Studio

You'll also need the Nordic's library at https://github.com/NordicSemiconductor/ble-sdk-arduino/releases

Open nRFgo Studio, click on nRF8001 Configuration, then open the xml file under the ble_uart_project_template in the library. You can change the advertising name under GAP settings. Then generate services.h and replace the old file in your sketch folder.

Overkill procedure for changing the name, but that's that. It looks like it's possible to change it during run time, but I can't find the function that sets the name. For now, I've just changed the CodeBender example to advertise as BLEWatch instead of URT, at least.

Overkill or not, your help is appreciated. I'll have a look into it in the morning. :)

Re: TinyScreen Smartwatch
« Reply #14 on: March 19, 2015, 10:27:09 AM »
Ah, OK. Gotcha. I'd like to get the Android app working. The phone is an Galaxy S II (SGH-T989).

Sadly even though the S2 shipped with a Broadcom chipset capable of bluetooth 4.0, it was never enabled in software. Part of this is because Android had no default support for Bluetooth 4.0 till nearly 2 years later and by that time the chipset was so outdated writing software to make it work was not a priority.

The S3 was the first Android phone with software support for 4.0 and it wasn't even widely used because Samsung had to make their own support for it, a support that was entirely different from Google's own implimention nearly a year later.

Edit: Turns out Broadcom wrote their own drivers for it and it can be used in Android 4.3(The version of Android that first supported bluetooth 4.0). Only downside is that you have to root and install a newer rom for it to work. From the sounds of it CM11 should support this.

TL;DR: To the best of my knowledge there's simply no easy way to make this work with the S2 without rooting.

Source: I worked for Best Buy selling phones for 4 years.


OK. Thanks for this. I was able to get a brand new phone and the app launched. I saw BLEWatch but whenever I tried to connect it kept crashing. At the watch time is still incorrect but when I press a button on the side it now says "No Notifications" which it didn't say before.

I tried to send a text to the phone and see if it showed a notification but it still says no notifications even thought I got the text.