I am looking for any input on a problem we are having with the Galaxy S3 i9300 and our app.
We are using the Stock ICS and tested JB 4.11 from Samsung updater as well as the base code used on the Nexus 4. No matter which version we have the same issue.
Our app allows us to associate a key card with a Photo taken by a connected DSLR via an OTG cable and tags the image as well as transfer them over wireless. A Photographer uses the Android device to scan the key card, he then takes a picture of the person and the S3 transfers the image to an image processing server we created.
We have tested this on several Android devices including Verizon Samsung Galaxy Nexus with ICS, exus 7 as well as the ACER A110 and have no issues.
The issue on the S3 is that it works fine on the bulk transfer endpoint (transferring an image), but on the interrupt endpoint where we monitor for new data it doesn't like. On a Nexus we hit the interrupt 10 times a second no problem, this quickly kills the S3 though. Extending the timeout helps but does not fix. This only occurs on the S3 device and this is the most frustrating part as we did not see this issue in our initial testing and we are on site with 8 devices now and every time it drops the connection you must restart the S3.
When the USB shuts down and requires the device to be restarted before it will work again, this is logged over and over in five second intervals, even with the camera disconnected
D/UsbHostManager( 2190): onUEvent(device) :: action = remove, devtype = usb_interface, device = /proc/bus/usb/002/001, product =
1d6b/1/300, type = 9/0/0, interface = 9/0/0, devpath = /devices/platform/s5p-ohci/usb2/2-0:1.0
E/UsbHostManager( 2190): usbDeviceRemoved :: deviceName = /dev/bus/usb/002/001
D/UsbHostManager( 2190): onUEvent(device) :: action = remove, devtype = usb_interface, device = /proc/bus/usb/001/001, product =
1d6b/2/300, type = 9/0/0, interface = 9/0/0, devpath = /devices/platform/s5p-ehci/usb1/1-0:1.0
E/UsbHostManager( 2190): usbDeviceRemoved :: deviceName = /dev/bus/usb/001/001
D/UsbHostManager( 2190): onUEvent(device) :: action = add, devtype = usb_interface, device = /proc/bus/usb/001/001, product = 1d
6b/2/300, type = 9/0/0, interface = 9/0/0, devpath = /devices/platform/s5p-ehci/usb1/1-0:1.0
D/UsbHostManager( 2190): usbDeviceAdded : device :: /dev/bus/usb/001/001 [1d6bh:0002h] [09h,00h,00h] (Hub(Full speed Hub ))
W/UsbHostManager( 2190): /dev/bus/usb/001/001 is put on a blocklist [1d6bh:0002h:09h:00h:00h]
D/UsbHostManager( 2190): usbDeviceAdded : device :: /dev/bus/usb/002/001 [1d6bh:0001h] [09h,00h,00h] (Hub(Full speed Hub ))
W/UsbHostManager( 2190): /dev/bus/usb/002/001 is put on a blocklist [1d6bh:0001h:09h:00h:00h]
D/UsbHostManager( 2190): onUEvent(device) :: action = add, devtype = usb_interface, device = /proc/bus/usb/002/001, product = 1d
6b/1/300, type = 9/0/0, interface = 9/0/0, devpath = /devices/platform/s5p-ohci/usb2/2-0:1.0
We also have WIFI issues ONLY with the S3 where it cannot connect to the Cisco wireless installed throughout the location. Other Android devices connect without issue. The S3 is able to work with autonomous WAPs which is how we are testing now.
We also have a Mobile swiper attached to the S3 which works without issue. (ID-TECH Shuttle).
My developer is on site and Internet access is extremely limited. That is why I am posting this question. Please accept my apology in advance but we are looking for any ideas though the developer is convinced that it is an issue with the USB Hardware since everything else works with the same code and only the S3's have these two issues. He is quite experienced and spent more time then he had available on site with this issue. We will have to find another device if we cannot determine these two issues. FYI the Cisco is running an older WISM but other Android devices connect without issue.
Also the GT-i9300 S3 is an international version.
We tested 8 individual GT-i9300 S3 devices and they all have the same issue.
Related
I am trying to send some data from one Android phone(Nexus 5), which is working as Usb Host, to Android tablet(Samsung Tab 4).
I am using bulkTransfer() method to transfer data from Nexus 5, which is returning the length of data that has been transferred successfully.
My question is How can I verify on the other end (at Samsung Tab), that yes I am getting the data that I had transferred from Nexus 5 ?
Here is some code snippet of transferring data
usbDeviceConnection = manager.openDevice(device);
boolean flag = usbDeviceConnection.claimInterface(usbInterface, true);
String text = textValue.getText().toString();
byteArray = text.getBytes();
// data transfer
int a = usbDeviceConnection.bulkTransfer(endpointOut, byteArray, byteArray.length, 0);
if(a>0){
textInfo.setText("Data has been transferred successfully..."
+"\n"+"Length of data: "+a
);
Please help me to do this task...!
After digging the Usb Host API I have found something that the other end (Samsung Tab) can work in Accessory mode and we can access the Usb Host(Nexus 5) by using the "android.hardware.usb.accessory" library.
Since the android phone who can support the Usb Host feature for example like Nexus 5 can access the device connected to it using "android.hardware.usb.host" library.
The other one for example Samsung Tab(It must support AOAP Protocol ) who does not support the Usb Host feature will access the device connected to it using "android.hardware.usb.accessory" library.
To understand The Usb Host feature you can open the link
http://developer.android.com/guide/topics/connectivity/usb/host.html
To understand The Usb Accessory feature you can open the link
http://developer.android.com/guide/topics/connectivity/usb/accessory.html
I set up an openfire server on a server within our network and gave it a domain name. I want to connect to it via my phone in a phonegap app and therefore implemented a strophe.js client within my app.
It works fine on my Nexus 5 (Android 4.4.3), but as soon as I want to run it on my Samsung Galaxy S2 (Android 4.1.2) or the Samsung Galaxy Tab (GT-P7501 - Android 4.0.4) I don't get any response from the server. Here is the code snippet of my connect:
var BOSH_SERVICE = 'http://SERVERNAME:7070/http-bind/';
var connection = null;
$(document).ready(function () {
connection = new Strophe.Connection(BOSH_SERVICE);
connection.rawOutput = log;
connection.rawInput = log;
connection.connect('id#servername/resource', 'test', onConnect);
});
function log(msg) {
console.log(msg);
}
function rawInput(data) {
log('RECV: ' + data);
}
function rawOutput(data) {
log('SENT: ' + data);
}
the console log will be:
SENT: <body rid='367573377' xmlns='http://jabber.org/protocol/httpbind' to='servername' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
This will be repeated a few times but I don't get any incoming messages. The servers version number is openfire 3.9.3. As all this code works on my nexus 5 I assume that the code is correct. I Also doubt that my server is configured wrong, nevertheless I included a screenshot of the config settings of the openfire server in the end.
The openfire xmpp server is running on a windows server and I access it via wifi/dyndns.
Do you have any ideas why this does not work on the samsung galaxy? Every help will be appreciated. Thanks in advance !
I could "solve" this by myself. It is really not a big deal, but it took me a really long time (3 days) to realize this, so in case anyone will ever come accross the same phenomena this info might help:
In my case all the configurations of the server and the strophe client above are correct. Indeed the only reason the connect did not work properly on all devices seemed to be that these devices could not even ping the server, even though they are in the same network. In my case I gave the server a static domain name, which was the key issue. Somehow the Google Nexus 5 is able to resolve this name to an ip adress via the dns-server, but both the elder samsung galaxy s2 and the samsung galaxy tab aren't.
Solution: I replaced the static domain name with the corresponding ip-adress in my strophe.js connection.
I have successfully connected two devices with Wi-Fi Direct in Android as well as passing data between them.
My test application is roughly based on the source code from the Wi-Fi Direct Service Discovery example (https://android.googlesource.com/platform/development/+/master/samples/WiFiDirectServiceDiscovery)
When the application starts, I can see all my three devices in the list of possible device that can be connected (Samsung Galaxy S2, Samsung Galaxy S4 and Google Nexus 7 are used for tests).
If I connect from my S2 to my S4, they can communicate with no problems.
If I then try to connect my Nexus 7, it can connect to my S2 (the S4 is no longer available) it can communicate with the S2, but the data cannot be see from the S4, nor data that's send between the S2 and S4 can be seen from the Nexus 7.
I have tried to elaborate with changing the groupOwnerIntent during the connect:
WifiP2pConfig config = new WifiP2pConfig();
config.deviceAddress = service.device.deviceAddress;
config.wps.setup = WpsInfo.PBC;
config.groupOwnerIntent = 0; // 0 for first connect/groupOwner and 15 otherwise
Unfortunately, when changing the groupOwnerIntent, the communication does no longer work, not even between two devices.
Has anyone got this to work and can give any hints about how this can be solved?
I am trying to write a script, which will connect a device (radiomodem), that have a bluetooth with my Nexus 7 (Android 4.4)
The task is to send a command via bluetooth, and then get an answer from radiomodem.
After sending a command I don't get an answer from device (or I get it, but cannot read bluetooth buffer), and my script stops while reading. It doesn't send me any mistakes, just stops.
I've tried to send commands from Nexus to PC, and I've seen them in virtual COM on PC.
I've tried to send from PC to Nexus, and from radiomodem to Nexus long lines and read them. it was fine, too.
But writing-reading doesn't work. What I'm doing wrong?
Here is my code:
import sl4a
import time
droid = sl4a.Android()
uuid = '00001101-0000-1000-8000-00805F9B34FB'
adr = '6B:E2:00:DA:18:01'
droid.toggleBluetoothState(True) # connection is always successful
droid.bluetoothConnect(uuid,adr)
time.sleep(2)
i = 0
while i < 3:
res = droid.dialogGetInput().result
res = res + '\r'
droid.bluetoothWrite(res)
time.sleep(0.6) # here I've tried different timeouts
ans = droid.bluetoothRead(4096).result
if ans is None:
print('no answer')
else:
w = str(ans)
droid.dialogCreateAlert("+", w)
droid.dialogSetPositiveButtonText('OK')
i += 1
Half a year ago I did a small app with PY4A and I had trouble with connecting to my Bluetooth heart rate monitor from a galaxy S2. To solve the connection issue's I switched to pybluez. Using the Bluetooth device worked from there. See the working example that helped me here.
http://cuu508.wordpress.com/2011/02/21/hxm-t-display-heart-rate-from-zephyrs-hxm/
I hope this helps.
Regards.
Working on an application that involves discovery of smartphones over Bluetooth I found out that many Android-based devices report back an invalid device ID.
Some background:
There is a Bluetooth Profile/Service called Device ID (UUID 0x1200) that is supposed to identify the particular device down to vendor, model and version.
The vendor ID can be assigned by either the USB or the Bluetooth bodies.
This service can be inquired over the Service Discovery Protocol (SDP) after device discovery.
The same ID information can also be included in the Extended Inquiry Response (EIR), which is sent during the device discovery.
The latest test subject, the Sony Xperia Go, running 2.3.7 reports back the following SDP record:
ID=0x0000,type=0x01,value=0x00010000
ID=0x0001,type=0x06[type=0x03,value={**0x1200**};]
ID=0x0005,type=0x06[type=0x03,value={0x1002};]
ID=0x0009,type=0x06[type=0x06;]
ID=0x0200,type=0x01,value=0x0102 (Device ID Profile Specification 1.2)
ID=0x0201,type=0x01,value=**0x000a (Vendor ID)**
ID=0x0202,type=0x01,value=**0x0000 (Product ID)**
ID=0x0203,type=0x01,value=**0x0000 (Version)**
ID=0x0204,type=0x05,value=1 (Primary? = Yes)
ID=0x0205,type=0x01,value=**0x0002 (VendorIDSource = USB Implementer's Forum)**
As you can see above, the Go reports back an invalid USB Vendor ID (0x000a) and null product and version. I got the same results on an Acer Cloud Mobile too. This made me think that the invalid IDs could stem from default value unmodified by phone Android OEMs.
Sure enough, in the Android sources I recently checked out the bluez Bluetooth stack has the following parameter in main.conf:
# Use vendor, product and version information for DID profile support.
# The values are separated by ":" and VID, PID and version.
DeviceID = android:generic:1.5
If this parameter doesn't get modified by the OEM, it will get parsed by the start_sdp_server function:
vid = (uint16_t) strtol(ptr, NULL, 16);
ptr = strchr(ptr, ':');
if (ptr) {
pid = (uint16_t) strtol(ptr + 1, NULL, 16);
ptr = strchr(ptr + 1, ':');
if (ptr)
ver = (uint16_t) strtol(ptr + 1, NULL, 16);
register_device_id(vid, pid, ver);
}
And that is where the 0x000a vendor ID comes from. "a" from Android. How genius...
I am trying to get into contact with Sony and Android developers to see how can this be fixed for future versions. So, if you are one of them, let me know.
I am just here to confirm that the new 4.1.2 JB firmware for the Sony Xperia Go has this bug fixed. The phone properly reports back the Device ID Profile.