TinyScreen Smartwatch

dbenwoods · 25 · 41467

dbenwoods

  • Newbie
  • *
    • Posts: 1
    • View Profile
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>


Ben Rose

  • Administrator
  • Hero Member
  • *****
    • Posts: 392
    • View Profile
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


ainfield

  • Newbie
  • *
    • Posts: 1
    • View Profile
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?


jpencausse

  • Full Member
  • ***
    • Posts: 14
    • View Profile
@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 !


Ben Rose

  • Administrator
  • Hero Member
  • *****
    • Posts: 392
    • View Profile
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.


jpencausse

  • Full Member
  • ***
    • Posts: 14
    • View Profile
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)



WakeArray

  • Jr. Member
  • **
    • Posts: 8
    • View Profile
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. ;)


WakeArray

  • Jr. Member
  • **
    • Posts: 8
    • View Profile
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


Ben Rose

  • Administrator
  • Hero Member
  • *****
    • Posts: 392
    • View Profile
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.


amd599

  • Jr. Member
  • **
    • Posts: 5
    • View Profile
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.


Ben Rose

  • Administrator
  • Hero Member
  • *****
    • Posts: 392
    • View Profile
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.


amd599

  • Jr. Member
  • **
    • Posts: 5
    • View Profile
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


WakeArray

  • Jr. Member
  • **
    • Posts: 8
    • View Profile
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 »


WakeArray

  • Jr. Member
  • **
    • Posts: 8
    • View Profile
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. :)


amd599

  • Jr. Member
  • **
    • Posts: 5
    • View Profile
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.


 

SMF spam blocked by CleanTalk