How to use Shark-CLI library with 2 USB connected devices? - memory-leaks

I am unable to use the Shark-CLI library with 2 devices connected to the computer. Is there any parameter to select which device will be used by the library?

This is not currently supported by Shark-CLI, I filed an issue here: https://github.com/square/leakcanary/issues/1642 . It's open source, if you're interested you can add support for it.

Related

How do you get the actual name of a bluetooth low energy device?

I need to get the friendly device name from a ble sensor. I want to find the device and tell the user they are connected to "My Home Sensor" for example. I can find the device, but I don't know how to find that data.
In regular bluetooth, I believe I can use BLUETOOTH_DEVICE_INFO or winsock.
Is there a bluetooth low energy equivalent to bluetooth's BLUETOOTH_DEVICE_INFO?
If possible, could you please provide an example for how to get the information (i.e. device name)?
I'm using Windows 8.1, c++ and visual studio 2013. I've been referencing windows dev docs, but I haven't found anything useful yet.
Thanks!
Assuming that you are able to get connected with the GATT Server, when you parse the GAP profile of the device, you will find an attribute for Device Name under Generic Access Profile (GAP).
This is a list of all the standard GATT Services and their UUIDs. UUID for GAP is 0x1800.
You can look for the list of all the standard Characteristics and their UUIDs. For the Device Name Characteristic, it is 0x2A00.
This explains that the Device Name characteristic is a part of the GAP.

Teensy 2.0 / Atmega32u4 as Keyboard: Send and Receive

I'm currently working on a device which is able to work as a keyboard and communicate via Serial with a self-written software.
Now I have to install serial drivers (from Arduino) on different computers if I want to communicate with my application which I actually want to avoid.
Is there any other solution to solve this problem? Is it possible that my microcontroller works as a keyboard AND is able to send and receive data as HID device?
Thanks and greetings!
I actually do something similar with a 32u4, but it receives its serial over the built-in UART. I do this because it's linking between two separate systems. If it were only one system I could implement a 2nd interface. (Don't forget, a USB HID device must have an IN endpoint even if you are not using it.) Or you could just throw a $2 USB/TTL converter on and do it the same as I did.

mac/xcode setting up a specific UUID for Bluetooth

I've been playing with the Bluetooh sample from the Xcode RFCOMM_SPP which is what would do the job for me so I modified it but the discover devices does not pick a few simpler SPP devices(like a GPS)
I had a similar issue when doing the Android version and after digging I found out if I set up a proper UUID manually I'm on easy street and that got me rolling there really cool
Now back to the MAC I'm trying to see if the same process can be applied I see they have this IOBluetoothSDPUUID which picks a pre-cooked UUID, my guess is that if I do there what I did in Android I'd be able to see and interface with the GPS.
Is it possible to set a UUID manually like adding it to the h files? Or is it blocked for "Made for Apple" devices like in the iPhone?
Are you programming for the MAC or iOS devices (iphone / ipad )
Bluetooth SPP profile is not supported (publicly) on iOS devices.
see this http://support.apple.com/kb/HT3647?viewlocale=en_US
So if you want to do something custom on these devices using non public interfaces, the only way is joining the MFi program

BlueZ, do not require authentication

I'm working with BlueZ 3.x. I have a linux embedded device and I need to send and receive files using the bluetooth technology, with Obex. (Note: BlueZ 4.x doesn't even compile on our specific platform.)
I don't need PIN authentication, I even don't want it. It must remain as simple as possible for the end user.
I tried to set security none in hcid.conf but it doesn't seem to work.
So my question is:
Is it possible to send &/ receive files using Obex on bluetooth?
How to do it?
Does bluetooth devices (e.g. mobile phone) requires authentication?
You can use the OBEX protocoll for that, but you will also need the FTP or OPP profile (And GOEP, SPP & GAP since they depend on them)
The documentation can be found on BT SIG bluetooth.org, but you will have to be a member. I think some of the documentation is available to non members as well, go there and have a look.
Yes (if we are only talking about mobile phones)

mobile receipt printing with J2ME via Bluetooth

I need to make an app in J2ME that can be able to read a SMS and then print it on an epson tm-p60 printer(ESC/POS emulation) via bluetooth.
i looked at the epson supprt site but the only ADK/drivers they provide are for:
1.Sun Java2 SDK Standard Edition Version 1.4.2_10
2.Sun Java2 SDK Standard Edition Version 1.4.2_04
3.Sun Java SE Development Kit 6 Update 3
so i don't know how am i gonna be able to use ESC/POS commands inJ2ME.
I'm a bit clueless on how i will approach this project.. plus w/c would be better to use for this project? Netbeans or Eclipse?
Thanks!
SPP (Serial Port Profile) over Bluetooth means using an RFCOMM connection to send and receive data as if it were a physical serial connection. This is part of JSR 82, so you will be able to develop only on handsets that support this JSR.
You need to:
Figure out how to discover bluetooth devices, and scan for SPP services on a discovered device, then connect to one of those services, using one of the many JSR 82 tutorials out there.
Then send ESC/POS protocol data over that connection -- I assume you have the protocol specification available? Google turned up this application programming guide.
HTH.
JSR-82 Bluetooth API support L2CAP protocol, RFCOMM and OBEX profile. I don't know detail of Bluetooth basic printing profile (BPP) but, if you look into basic printing profile document you can find that BPP built on OBEX profile.
I can't find open source project for BPP on JSR-82. Please try to search it, but if you can't find one you might need to write your own.

Resources