Gear 2 Access to Bluetooth Stack in Tizen SDK UNBLOCKED!

Search This thread

ScDoc8

Member
Jun 10, 2014
13
12
UPDATED 8/20/14
Some minor changes were made to the process to get the Bluetooth API available. I confrmed this after re-flashing my device.


I have sucessfully unblocked access to the bluetooth stack on the Tizen Wearable SDK. This feature was removed from the wearable SDK and I have discovered how to re-enable this. This will allow you to write apps that can communicate with any available bluetooth device using the Tizen Wearable SDK.

1. Download this file from tizens website - download.tizen.org/releases/2.2.1/latest/repos/tizen-main/armv7l/packages/armv7l/wrt-plugins-tizen-0.4.80-1.1.armv7l.rpm

2. From a command prompt cd into your folder where sdb.exe is kept. (ie. tizen/tools/ )

3. Enter command ./sdb root on to put gear 2 into root mode.

4. Next push downloaded file above onto your gear. (ie. ./sdb push ~/Downloads/wrt-plugins-tizen-0.4.80-1.1.armv7l.rpm /tmp/ )
(There is a space between the tizen file and the /tmp/ which places the file into the tmp folder on the gear 2)

5. Shell into your gear 2. (ie. ./sdb shell )

6. At the command prompt, make the file system writable. (ie. mount -o remount,rw / )

7. Change to the tmp directory and install the rpm file. (ie. cd tmp ) (ie. rpm -i --force --nodeps --replacefiles wrt-plugins-tizen-0.4.80-1.1.armv7l.rpm

8. If successful you should have NO OUTPUT and only a new command prompt.

9. Type reboot on the command prompt on the gear 2 and it restarts.

10. Start the Wear IDE and try to use the Bluetooth API Calls and it should work.

Below is a sample Wear App



var adapter = tizen.bluetooth.getDefaultAdapter();
console.log(adapter.address);

Before this would result in a null listing on the console, but now you should have the bluetooth address in the console. I have verified discovery works and other Bluetooth functions.

Happy Building!!
:laugh:
 
Last edited:

gidi

Senior Member
May 29, 2006
551
105
I have sucessfully unblocked access to the bluetooth stack on the Tizen Wearable SDK. This feature was removed from the wearable SDK and I have discovered how to re-enable this. This will allow you to write apps that can communicate with any available bluetooth device using the Tizen Wearable SDK.

You must do this in Ubuntu 12.04 as the building tools GBS and Gerritt work only with Linux.

Step 1 - Download the Developer Tools for Tizen including Gerritt Build System (GBS) and Gerritt. Register for Gerritt access on Tizens webpage and configure your computer to build rpm packages.

Step 2 - Download the wrt-plugins-tizen.git package from gerritt under framework and build it successfully on your computer.

Step 3 - Make sure your gear 2 is rooted and using sdb, push the recently compiled wrt-plugins-tizen.rpm onto a folder on the gear 2.

Step 4 - Using sdb, login to the shell on the gear 2. (ex: ./sdb shell)

Step 5 - CD to the folder with the new rpm wrt-plugins-tizen.rpm file is located.

Step 6 - Change the filesystem on the gear to read/write from read only. Ex: Sh$ mount -o remount,rw /

Step 7 - Install the wrt-plugins-tizen.rpm over the already installed version. Ex: Sh$ rpm -ivh wrt-plugins-tizen.rpm -nodeps --force

Step 8 - Restart your Gear 2 and you should be able to call the methods and functions for Bluetooth in the Tizen
(Ex: var adapter = tizen.bluetooth.getDefaultAdapter();
console.log(adapter.address);

Before this would result in a null listing on the console, but now you should have the bluetooth address in the console. I have verified discovery works and other Bluetooth functions.

Happy Building!!
:laugh:

Hi there,

Does that mean that BT communication with an iPhone (apart from the BT hands free profile) may indeed be possible?
 

gidi

Senior Member
May 29, 2006
551
105
Dude, I wanna give you a hug! :)
Share some info whenever you have smth new!


Sent from my iPhone using Tapatalk
 

gidi

Senior Member
May 29, 2006
551
105
I am checking this thread every hour. Should I consult a shrink?


Sent from my iPhone using Tapatalk
 

Skin1980

Inactive Recognized Developer
Nov 25, 2009
2,490
6,233
Let me understand... You need this for....?

Sent from my SM-G900F using XDA Free mobile app
 

gidi

Senior Member
May 29, 2006
551
105
Let me understand... You need this for....?

Sent from my SM-G900F using XDA Free mobile app


Skin, my man, could this result in a ROM with direct control over BT profiles? In that case, direct connection between Gear and iPhone could be possible.

BT hands free profile is already supported by the iPhone. Enabling other profiles on the watch could maybe lead to enabling notifications.


Sent from my iPhone using Tapatalk
 

gav83collins

Senior Member
Skin, my man, could this result in a ROM with direct control over BT profiles? In that case, direct connection between Gear and iPhone could be possible.

BT hands free profile is already supported by the iPhone. Enabling other profiles on the watch could maybe lead to enabling notifications.


Sent from my iPhone using Tapatalk

I've got these installed I'm gonna try that bt profile unlocking and five that a whirl. I see there's no gear related apps in Cydia. Appstore or for the gear on galaxy app store

1zxbp0k.jpg

34fzllf.jpg
 
Last edited:

gidi

Senior Member
May 29, 2006
551
105
iOS 7 is supposed to automatically expose notifications to BT. No extra software on the iPhone side is required, as long as the correct profiles are supported by the watch.

One example I personally have used is the i'mwatch.


Sent from my iPhone using Tapatalk
 

gav83collins

Senior Member
Was you using Bluetooth stack as well switching over from ios to stack mode with your gear pre set up for another device . I can say that my iPhone 4 jailbroken on ios 7 works as hands free without having to reset . That's my gear 1 with tizen 3.0 . I know of the iPhone 4 doesn't have nfc to connect with the gear 1 via tag mode but without it it still connects with simple pairing

As for my gear 1 no matter what I try I can't even get it full or haLA function on my evo3d (I know jb is recommended minimum) on 2.3.4, 2.3.6, 4.0.2 4.0.4, 4.1 or 4.4.2 sense stock roms or cyanogen. Romeos, or miui

And my s4 running any cyanide kitkat either

I've tried various gear stubs. Samsung app stores and gear managers, goproviders etc.

My s3. Not a problem
. I even have trouble with some variations of aosp. Aokp. Pac. Slim. Cyanogen. Miui and even some tw roms on my s5
 

gidi

Senior Member
May 29, 2006
551
105
Was you using Bluetooth stack as well switching over from ios to stack mode with your gear pre set up for another device . I can say that my iPhone 4 jailbroken on ios 7 works as hands free without having to reset . That's my gear 1 with tizen 3.0 . I know of the iPhone 4 doesn't have nfc to connect with the gear 1 via tag mode but without it it still connects with simple pairing

As for my gear 1 no matter what I try I can't even get it full or haLA function on my evo3d (I know jb is recommended minimum) on 2.3.4, 2.3.6, 4.0.2 4.0.4, 4.1 or 4.4.2 sense stock roms or cyanogen. Romeos, or miui

And my s4 running any cyanide kitkat either

I've tried various gear stubs. Samsung app stores and gear managers, goproviders etc.

My s3. Not a problem
. I even have trouble with some variations of aosp. Aokp. Pac. Slim. Cyanogen. Miui and even some tw roms on my s5

Gav I am not sure I am following u here dude.

Let me tell u my experience.

I only have a borrowed HTC one and have as we'll tried some iPhones (never used BTstack cydia tweak) with the Gear 1.
I can connect the HTC through Gear Manager (can provide the links where I found it and the stub if u like me to) without a problem.
The HTC is stock 4.4.2 not rooted.

If the watch is reset to factory I definitely need the HTC otherwise it is useless.

However, after it connect the Gear and the HTC and have access to the watch settings (not anymore stuck in the how to pair video screen) I can also connect an iPhone 4 (no BT 4.0) as well as an iPhone 5 and my iPhone 5S. As long as I am have not installed the airbluesharing tweak which somehow messes the BT stack of the iPhone (I think).

However the iPhone thinks that the (Tizen stock or modded running) Gear is simply a hands free device, simple as that. Althoufgh they are connected, on the gear side it seems that there is no connection.

What actually works I have listed here:
http://xdaforums.com/showthread.php?t=2789095

My opinion (I am not a dev by any means) is that basic hands free functionality is achieved outside the Gear Manager whereas all other BT profiles are somehow tied to that God damned manager.

Then again the current thread is talking about unlocking the full BT stack of the Tizen running Gear, if I understood OK.

If that is the case, all possibilities are open because as I have already told u I have seen the i'mwatch communicate with the Gear with absolutely no app on the iPhone side.

Hope that helps!
 
Last edited:

gav83collins

Senior Member
Gav I am not sure I am following u here dude.

Let me tell u my experience.

I only have a borrowed HTC one and have as we'll tried some iPhones (never used BTstack cydia tweak) with the Gear 1.
I can connect the HTC through Gear Manager (can provide the links where I found it and the stub if u like me to) without a problem.
The HTC is stock 4.4.2 not rooted.

If the watch is reset to factory I definitely need the HTC otherwise it is useless.

However, after it connect the Gear and the HTC and have access to the watch settings (not anymore stuck in the how to pair video screen) I can also connect an iPhone 4 (no BT 4.0) as well as an iPhone 5 and my iPhone 5S. As long as I am have not installed the airbluesharing tweak which somehow messes the BT stack of the iPhone (I think).

However the iPhone thinks that the (Tizen stock or modded running) Gear is simply a hands free device, simple as that. Althoufgh they are connected, on the gear side it seems that there is no connection.

What actually works I have listed here:
http://xdaforums.com/showthread.php?t=2789095

My opinion (I am not a dev by any means) is that basic hands free functionality is achieved outside the Gear Manager whereas all other BT profiles are somehow tied to that God damned manager.

Then again the current thread is talking about unlocking the full BT stack of the Tizen running Gear, if I understood OK.

If that is the case, all possibilities are open because as I have already told u I have seen the i'mwatch communicate with the Gear with absolutely no app on the iPhone side.

Hope that helps!

Well tomorrow I'm removing my kali Linux and I'm gonna install Ubuntu and look into that be profile on the gear side.

I meant the Cydia tweak btstack has options to use it as stack. None or ios. And with air blue and stack. On stack I can connect hands free mode. Without the set up video. Showing.

With the other devices I was just stating how even with Samsung devices it's difficult to communicate.

I'm gonna do more research in to ios Bluetooth. And the gears profiling of it tomorrow. IL report back here with findings
 

gidi

Senior Member
May 29, 2006
551
105
Well tomorrow I'm removing my kali Linux and I'm gonna install Ubuntu and look into that be profile on the gear side.

I meant the Cydia tweak btstack has options to use it as stack. None or ios. And with air blue and stack. On stack I can connect hands free mode. Without the set up video. Showing.

With the other devices I was just stating how even with Samsung devices it's difficult to communicate.

I'm gonna do more research in to ios Bluetooth. And the gears profiling of it tomorrow. IL report back here with findings

I understand what u r saying.
Looking forward to hearing from you tomorrow.

Thanx a lot dude!
 

gav83collins

Senior Member
Hey gav, any news on this one?

:)


No mate sorry not yet it took most of my day to download the tizen gear source code. And the u Ubuntu sdk and the Ubuntu iso. and create new mirrors. . As well figuring out to flash and use custom ring tones. I got the software downloaded for ubuntu but to install it would have disabled my network adapter temporarily but I didn't want to do that cos of the painstaking low speed of the tien source code. By the time it finished with everything else I was doing I didn't have enough time to install it and play around. But tomorrow afternoon IL get on with it. I've got all the software needed.

Watch this space lol
 

javispedro

Senior Member
Dec 6, 2008
55
47
iOS 7 is supposed to automatically expose notifications to BT. No extra software on the iPhone side is required, as long as the correct profiles are supported by the watch.

Correct, that's called the Apple Notification Center service and is obviously not supported by the Gear.
The standard Bluetooth profile is called the Alert Notification Profile and is not supported by either the Gear or the iPhone.

I have sucessfully unblocked access to the bluetooth stack on the Tizen Wearable SDK. This feature was removed from the wearable SDK and I have discovered how to re-enable this. This will allow you to write apps that can communicate with any available bluetooth device using the Tizen Wearable SDK.
I am not sure if this is all that is required.

For example pairing a device with the Gear will make it popup the "factory reset needed" dialog. The source of that dialog seems to be com.samsung.bt-syspopup. Uninstalling it results in no "factory reset needed" prompt, but also no Bluetooth prompts at all..... Maybe one could install the stock org.tizen.bt-syspopup one.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    UPDATED 8/20/14
    Some minor changes were made to the process to get the Bluetooth API available. I confrmed this after re-flashing my device.


    I have sucessfully unblocked access to the bluetooth stack on the Tizen Wearable SDK. This feature was removed from the wearable SDK and I have discovered how to re-enable this. This will allow you to write apps that can communicate with any available bluetooth device using the Tizen Wearable SDK.

    1. Download this file from tizens website - download.tizen.org/releases/2.2.1/latest/repos/tizen-main/armv7l/packages/armv7l/wrt-plugins-tizen-0.4.80-1.1.armv7l.rpm

    2. From a command prompt cd into your folder where sdb.exe is kept. (ie. tizen/tools/ )

    3. Enter command ./sdb root on to put gear 2 into root mode.

    4. Next push downloaded file above onto your gear. (ie. ./sdb push ~/Downloads/wrt-plugins-tizen-0.4.80-1.1.armv7l.rpm /tmp/ )
    (There is a space between the tizen file and the /tmp/ which places the file into the tmp folder on the gear 2)

    5. Shell into your gear 2. (ie. ./sdb shell )

    6. At the command prompt, make the file system writable. (ie. mount -o remount,rw / )

    7. Change to the tmp directory and install the rpm file. (ie. cd tmp ) (ie. rpm -i --force --nodeps --replacefiles wrt-plugins-tizen-0.4.80-1.1.armv7l.rpm

    8. If successful you should have NO OUTPUT and only a new command prompt.

    9. Type reboot on the command prompt on the gear 2 and it restarts.

    10. Start the Wear IDE and try to use the Bluetooth API Calls and it should work.

    Below is a sample Wear App



    var adapter = tizen.bluetooth.getDefaultAdapter();
    console.log(adapter.address);

    Before this would result in a null listing on the console, but now you should have the bluetooth address in the console. I have verified discovery works and other Bluetooth functions.

    Happy Building!!
    :laugh:
    2
    i dont know this tizen lark is new to me im learning as i go along

    im gonna try again to my gear 1

    No there was some typos.

    1. put renamed file wrt-plugins-tizen.rpm in same folder as sdb.exe
    2. sdb root on
    3 sdb push wrt-plugins-tizen.rpm /home
    4 sdb shell
    5 mount -o remount,rw /
    6 cd /home
    7 rpm -ivh wrt-plugins-tizen.rpm --nodeps --force

    you should see it install that time. Ok gotta run off to work. Good luck.

    Chris
    2
    Yes the app would have to be developed with Tizen as a gear 2 widget app to communicate with the iPhone. I see that the Apple Notification Service communicates over Bluetooth LE, which the gear 2 doesn't support as of yet. That is included with Tizen 3.0, whereas the wearable version of tizen is version 2.3. Samsung would have to re-release or update their Gear ROM to support Tizen 3.0 and then if they chose to, could use Bluetooth LE. I would assume this would be desired as it could improve the battery life on the gear.

    I am looking into if the Apple Notification Center can use normal bluetooth which if so, then the gear 2 should be fine to work.

    Actually Tizen 2.3 already supports BLE, as clearly seen in
    www dot tizen dot org /blogs/tsg/2014/tizen-2.3-alpha-source-code-release
    (sorry for the spaces, stupid XDA forum rules won't let me post links yet).
    Maybe you mean BLE is only supported in Web apps from 3.0 onwards? I wish those guys had a roadmap.

    The problems are two-fold:
    1) I don't what version of Tizen runs on the Gear. It seems to be a frankenstein mix of 2.2 and 2.3 with lots and lots of propietary Samsung stuff on top of it. I really wish I could flash clean Tizen 2.3 on it, or anything else for the matter...

    In any case, whatever version of Tizen is on the Gear 2, it is certainly BLE capable. I've been experimenting with the BT framework and can confirm it. BLE is not used at all by the Gear Manager, though (uses plain old RFCOMM socket). No idea about native apps.

    2) How to actually even pair with an iPhone if it won't even let us pass the initial setup screen without a working Gear Manager?

    Btw Apple Notification Center most definitely does NOT support non-BLE connections. The entire CoreBluetooth only supports BLE.
    2
    UPDATE #2

    Ok I reset my gear 2 and repeated everything and confirned this works. There are a few modications now.

    1. Download this file from tizens website - download.tizen.org/releases/2.2.1/latest/repos/tizen-main/armv7l/packages/armv7l/wrt-plugins-tizen-0.4.80-1.1.armv7l.rpm

    2. From a command prompt cd into your folder where sdb.exe is kept. (ie. tizen/tools/ )

    3. Enter command ./sdb root on to put gear 2 into root mode.

    4. Next push downloaded file above onto your gear. (ie. ./sdb push ~/Downloads/wrt-plugins-tizen-0.4.80-1.1.armv7l.rpm /tmp/ )
    (There is a space between the tizen file and the /tmp/ which places the file into the tmp folder on the gear 2)

    5. Shell into your gear 2. (ie. ./sdb shell )

    6. At the command prompt, make the file system writable. (ie. mount -o remount,rw / )

    7. Change to the tmp directory and install the rpm file. (ie. cd tmp ) (ie. rpm -i --force --nodeps --replacefiles wrt-plugins-tizen-0.4.80-1.1.armv7l.rpm

    8. If successful you should have NO OUTPUT and only a new command prompt.

    9. Type reboot on the command prompt on the gear 2 and it restarts.

    10. Start the Wear IDE and try to use the Bluetooth API Calls and it should work.

    Any Problems let me know!

    Will
    1
    @gav83collins in my case when I had airbluesharing tweak installed, the Gear and my iPhone could not connect. See relative topic: http://xdaforums.com/galaxy-gear/help/galaxy-gear-1-tizen-os-trouble-t2846576


    Sent from my iPhone using Tapatalk