Smart Bluetooth Forum Discussions
text.format{('custom.tabs.no.results')}
I'm having the same issue. My old windows 8.1 laptop could see "Hello" device no problems and I even managed to write a c# program to take pressure readings. Now windows 10 will not see the device. BLE is working as the laptop can pair with my windows 10 phone and that phone can see "hello"
Note: This thread hasn't helped https://community.broadcom.com/thread/6000?q=windows%2010
Show LessHello everybody I am using wiced_sense
I create a code :
define uin16 counter;
when accelerometer changes the counter will be counter++;
I want to show the last counter value in my phone.
How can I make this happen.
I simply tried to chnage the version number with my counter value so that I can see the counter instead of the version number in wiced sense app
But it didnt work
Is there a simple way that I can see my counter value from my phone ?
Show LessHello,
The random addresses generated by bt_set_static_random_bd_addr are not random enough. When doing my production tests (7boards at a time), I always have duplicates (within just 7 boards).
Any suggestion?
If not, is it legit to *distribute* devices programmed with the address generated by the SDK : "20736A1****"? Or in this case do I need to register a Comapny ID to the BT council? (I want to avoid this)
Kind regards,
Arthur
Show LessHi, I am trying to a WICED SENSE device as soon as as it gets disconnected. To be precise, if a bluetooth device gets disconnected the WICED sense app should search for the device and connect without any user interaction.
Now I am able to connect to the device through the device picker, after selecting the WICED senese device i store the MAC address of that device. Next, the wiced sense device gets connected and paired. Later, if the device gets disconnected while the app is running an service should start search for the device with matching MAC address and connect to it if available.
The following is code I have implemented to get the connectivity through a service
public class BluetoothConnect extends Service {
private BluetoothAdapter mBluetoothAdapter;
public static final String BT_DEVICE = "btdevice";
public static final String SPP_UUID = "00001101-0000-1000-8000-00805F9B34FB";
public static final int STATE_NONE = 0; // we're doing nothing
public static final int STATE_LISTEN = 1; // now listening for incoming
// connections
public static final int STATE_CONNECTING = 2; // now initiating an outgoing
// connection
public static final int STATE_CONNECTED = 3; // now connected to a remote
// device
private ConnectThread mConnectThread;
private static ConnectedThread mConnectedThread;
// public mInHangler mHandler = new mInHangler(this);
private static Handler mHandler = null;
public static int mState = STATE_NONE;
public static String deviceName;
public static BluetoothClass.Device device = null;
@Override
public void onCreate() {
Log.d("BluetoothConnect", "Service started");
super.onCreate();
}
@Override
public IBinder onBind(Intent intent) {
// mHandler = ((MyAplication) getApplication()).getHandler();
return mBinder;
}
public class LocalBinder extends Binder {
BluetoothConnect getService() {
return BluetoothConnect.this;
}
}
private final IBinder mBinder = new LocalBinder();
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Log.d("BluetoothConnect", "Onstart Command");
String BT_DEVICE = "btdevice";
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (mBluetoothAdapter != null) {
device = (BluetoothClass.Device) intent.getSerializableExtra(BT_DEVICE);
//deviceName = device.getDeviceName();
final SharedPreferences mSharedPreference2= PreferenceManager.getDefaultSharedPreferences(getBaseContext());
String value2=(mSharedPreference2.getString("MAC_ID", ""));
String macAddress = value2;
if (macAddress != null && macAddress.length() > 0) {
connectToDevice(macAddress);
} else {
stopSelf();
return 0;
}
}
String stopservice = intent.getStringExtra("stopservice");
if (stopservice != null && stopservice.length() > 0) {
stop();
}
return START_STICKY;
}
private synchronized void connectToDevice(String macAddress) {
BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(macAddress);
if (mState == STATE_CONNECTING) {
if (mConnectThread != null) {
mConnectThread.cancel();
mConnectThread = null;
}
}
// Cancel any thread currently running a connection
if (mConnectedThread != null) {
mConnectedThread.cancel();
mConnectedThread = null;
}
mConnectThread = new ConnectThread(device);
mConnectThread.start();
setState(STATE_CONNECTING);
}
private void setState(int state) {
BluetoothConnect.mState = state;
}
public synchronized void stop() {
setState(STATE_NONE);
if (mConnectThread != null) {
mConnectThread.cancel();
mConnectThread = null;
}
if (mConnectedThread != null) {
mConnectedThread.cancel();
mConnectedThread = null;
}
if (mBluetoothAdapter != null) {
mBluetoothAdapter.cancelDiscovery();
}
stopSelf();
}
@Override
public boolean stopService(Intent name) {
setState(STATE_NONE);
if (mConnectThread != null) {
mConnectThread.cancel();
mConnectThread = null;
}
if (mConnectedThread != null) {
mConnectedThread.cancel();
mConnectedThread = null;
}
mBluetoothAdapter.cancelDiscovery();
return super.stopService(name);
}
private void connectionFailed() {
BluetoothConnect.this.stop();
}
private void connectionLost() {
BluetoothConnect.this.stop();
}
private static Object obj = new Object();
public static void write(byte[] out) {
// Create temporary object
ConnectedThread r;
// Synchronize a copy of the ConnectedThread
synchronized (obj) {
if (mState != STATE_CONNECTED)
return;
r = mConnectedThread;
}
// Perform the write unsynchronized
r.write(out);
}
private synchronized void connected(BluetoothSocket mmSocket, BluetoothDevice mmDevice) {
// Cancel the thread that completed the connection
if (mConnectThread != null) {
mConnectThread.cancel();
mConnectThread = null;
}
// Cancel any thread currently running a connection
if (mConnectedThread != null) {
mConnectedThread.cancel();
mConnectedThread = null;
}
mConnectedThread = new ConnectedThread(mmSocket);
mConnectedThread.start();
setState(STATE_CONNECTED);
}
private class ConnectThread extends Thread {
private final BluetoothSocket mmSocket;
private final BluetoothDevice mmDevice;
public ConnectThread(BluetoothDevice device) {
this.mmDevice = device;
BluetoothSocket tmp = null;
try {
tmp = device.createRfcommSocketToServiceRecord(UUID.fromString(SPP_UUID));
} catch (IOException e) {
e.printStackTrace();
}
mmSocket = tmp;
}
@Override
public void run() {
setName("ConnectThread");
mBluetoothAdapter.cancelDiscovery();
try {
mmSocket.connect();
} catch (IOException e) {
try {
mmSocket.close();
} catch (IOException e1) {
e1.printStackTrace();
}
connectionFailed();
return;
}
synchronized (BluetoothConnect.this) {
mConnectThread = null;
}
connected(mmSocket, mmDevice);
}
public void cancel() {
try {
mmSocket.close();
} catch (IOException e) {
Log.e("BluetoothConnect", "close() of connect socket failed", e);
}
}
}
private class ConnectedThread extends Thread {
private final BluetoothSocket mmSocket;
private final InputStream mmInStream;
private final OutputStream mmOutStream;
public ConnectedThread(BluetoothSocket socket) {
mmSocket = socket;
InputStream tmpIn = null;
OutputStream tmpOut = null;
try {
tmpIn = socket.getInputStream();
tmpOut = socket.getOutputStream();
} catch (IOException e) {
Log.e("Printer Service", "temp sockets not created", e);
}
mmInStream = tmpIn;
mmOutStream = tmpOut;
}
private byte[] btBuff;
public void write(byte[] buffer) {
try {
mmOutStream.write(buffer);
// Share the sent message back to the UI Activity
mHandler.obtainMessage(MainActivity.MESSAGE_WRITE, buffer.length, -1, buffer).sendToTarget();
} catch (IOException e) {
Log.e("BluetoothConnect", "Exception during write", e);
}
}
public void cancel() {
try {
mmSocket.close();
} catch (IOException e) {
Log.e("BluetoothConnect", "close() of connect socket failed", e);
}
}
}
public void trace(String msg) {
Log.d("AbstractActivity", msg);
toast(msg);
}
public void toast(String msg) {
Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
}
@Override
public void onDestroy() {
stop();
Log.d("Printer Service", "Destroyed");
super.onDestroy();
}
private void sendMsg(int flag) {
Message msg = new Message();
msg.what = flag;
handler.sendMessage(msg);
}
private Handler handler = new Handler() {
@Override
public void handleMessage(Message msg) {//
if (!Thread.currentThread().isInterrupted()) {
switch (msg.what) {
case 3:
break;
case 4:
break;
case 5:
break;
case -1:
break;
}
}
super.handleMessage(msg);
}
};
}
The above code is the service code for auto connection. I want to know whether I am going in the right direction or not. Any kind of help is appreciated.
Show LessHello everybody
I am using wiced_sense for my capstone project to make a posture guard device.
I shared my wiced_sense.c code. Please checked it and see how I modified the firmware code for my project. I add comments to my extra codes.
The app is working fine now.
The user button( which is second button on wiced_sense) is calibration button.
So when you pressed that button . Calibrationdata saves the acceloremetre's X,Y and Z values. After that its checking the calibration data and the instantaneous data
when there is a diffrence between these values which means that when you changed your posture. The buzzer is playing for user to turn back the true posture.
The project is working fine now . But it works only when you connected to wiced sense with your phone.Without connecting to phone its not working.
I have been trying to solve the problem by my self . Get a help 1 week before from the manegers but still cant fix it.
Could anyone checked the code I shared and show me the way that how can I fix this problem.
Thank you very much .
Regards...
Show LessWe recently noticed that notifications are not working with apps running on Mac OSX 10.10 Yosemite and the most current version of OSX 10.11 El Capitan. It has worked on previous versions without issues, and It does work for OSX 10.9 Mavericks without issues. In addition to our own app, we are using the LightBlue App for basic testing of notifications. We also tried with Apple's bluetooth verification app, but these all fail with these newer OSX versions.
Broadcom provided us a newer Wiced sensor tag with the newer broadcom module and it works just fine. So we are wondering if the issue is with the BCM20732S module? Please advise.
Thanks in advance,
Aaron
Show Lesshello...
i have two log files which are collected from the trace debug (please check below screen shot)
- with 13:24:41 (timed) is paring peripheral to COMPUTER.
- with 14:26:02 (timed) is paring peripheral to SMART PHONE.
this is the code i am using:
please correct me if i am wrong- after "Load Dev Info:" line - it is Bluetooth MAC address is displayed in both log files.
my question is
- where this MAC address (Load Dev Info) are collected? - i am sure its before the connection_up function since i am tracing it by giving "----------->0".
- from the COMPUTER log, the address "ea7c3b239468" and i am printing the same by considering bda[0] which is 'ea' . and in connection_up: it is giving same values but reverse order.
- from the SMART PHONE log, the address "0effaf792e4d" and i am printing the same by considering bda[0] which is different now that is '00' and as same as that of connection_up: 020100200400. why is this happening here?
- where the MAC address of CLIENT (computer / Smart Phone) are stored?
please explain us how this is happening, why its changing its values when connected to smart phone (in bda[]) and is always shows the same address when connected to other phone too and even how it is connecting (connection occurrence)?
thanks in advance
Regards
Sid
Show LessRegister: Certification Testing when Designing with RF Modules
We are happy to announce a new webinar that we have developed with our module partner LSR
The webinar, Designing for Success: Practical Advice on Certification Testing when Designing with RF Modules will be held on Tuesday, May 3rd, 2016 at 11 AM CT/ 9 AM PT
In this webinar, EMC Testing specialists will provide straight-forward explanations of the critical steps, expected costs, and pitfalls to watch out for when navigating the world of FCC, IC, and CE certification testing for products incorporating an RF module. Real-world scenarios will be used to step through the process and what to watch for along the way. In addition, we will take a moment to provide an industry trend update on the upcoming ETSI EN 301 893 v1.8.1 and ETSI EN 300 328 v1.9.1 changes impacting CE approvals.
Planned webinar topics include:
- Providing an overview of FCC, IC, and CE Certification
- How to leverage full and limited certifications and approvals
- Industry Update on ETSI EN 301 893 v1.8.1 and ETSI EN 300 328 v1.9.1 upcoming changes
- Live Q&A with the presenter
In addition, specific regulatory topics related to both the BCM4343W and BCM20737 will be discussed such as process flow, challenges encountered and sample cost models one may encounter during certification.
Tuesday, May 3rd, 2016 at 11 AM CT/ 9 AM PT
Register: Certification Testing when Designing with RF Modules
Show Less