Increase speed on RN-41 bluetooth SPP? - performance

I'm using RN-41-APLX bluetooth evaluation board (based on RN-41-APL, very similar to RN-41 but also supports Apple devices) as a member of MFi.
I was able to establish connection and transfer some data to and from dev board with out-of-the-box configuration.
The problem is, in data sheet for RN-41 it is set, that SPP profile supports 240kbps speed, but when I transfer 10kB from iPod touch with Roving test iOS application installed, it takes 5 seconds to transfer.
Since UART speed is 230kbps, I think the bottle neck is the bluetooth link speed, but I can not find any way to change it. Can anybody help with that?
Thanks in advance!

I've run into this problem myself about this chip (well, the RN42 technically) and posted my findings here:
RN42 Bluetooth disconnects on iOS within seconds of streaming data
Short summary:
When the RN42 is used to communicate with an iOS device, it cannot
communicate faster than 2.5-3kB/s... If it's used to communicate with
an Android or computer or anything else, it can transfer at 35kB/s
(over SPP).
Hope it helps!
-SJ

Related

Extremely slow socket data throughput on Android 11?

I've seen some posts elsewhere about very slow file access after "upgrading" a device to Android 11. I'm not having that, but I AM having unbelievably slow performance in a small app that uses sockets. It's a client app that uses a socket to send a request to a server (mine) that monitors my solar installation, to get data back about how it has been performing etc. So the socket interaction is in a separate thread from the UI, and uses runOnUIThread to call a function that updates the UI with the received data. The request data is only a few bytes, maybe 20 or so maximum: the data coming back varies from a few hundred bytes to maybe 50000 bytes or thereabouts.
If I run this app on my phone (Android 8.1) it is fine - it takes 1.5 to 2 seconds to send the request, get the data back, and update the UI. Perfectly fine. It's the same on an older tablet running Android 7.1.2 too. But I have just recently acquired a flash (read expensive) new Samsung tablet running Android 11, and its performance is woeful - the same app doing the same operation takes anything up to 30 seconds, or even more. And it is exactly the same app, exactly the same code. Both devices are running on the same network, so the only significant difference seems to be the Android version. It is repeatable ad nauseum, so it isn't momentary network load either. The app is built to target API level 26 - it has to be so it can run on all the devices it needs to. It is not a commercial app, just something for my own use, but I am totally bewildered by this behaviour.
The other thing I have noted with this new tablet is that it is unable to provide a video stream from a surveillance IP camera I have at home. I use the TinyCam Pro app from Google Play for this. It can connect, but it has never yet managed to give me a picture, regardless of how good my connection is. Again, my phone and the older tablet can do this more often than not, and the new tablet would have far more horsepower than either of them. There is some sort of serious bottleneck in there!
Has anyone else seen this type of thing on Android 11? If so, is there anything that can be done about it, that is usable on earlier versions too? Or do we just have to wait for Android 11.1?
EDIT: I've done some more investigation on this, and I think I have now pinned it down to a 4G network bandwidth issue. I said that the tablet and the phone were doing exactly the same thing, but I have since remembered that they do NOT use the same carrier for their mobile connections. So it's not EXACTLY the same thing. I would actually expect the network capacity for the tablet's carrier to be superior to that of the phone's carrier, but that appears not to be the case where I am at the moment. So I think I have to take back my evil thoughts about the tablet, and maybe even Android 11. Interesting how easy it is to be misled, and how hard it can be to genuinely compare apples with apples when there are so many variables and so many links in the chain. I'll be doing some more tests and comparisons when back in the city, where network capacity should be much more alike for the two carriers.
yes its true. While compare to Android 11 and Android 8 there is a lot of changes updated because of security issue.
May be, If your managing some file in mobile storage mnt/sdcard/ here in this path its speed of access or managing a file in this path its restricted and its becomes less. So, if your using this path please change it like below because it will cause youe app to process slow.
solution - Try to use this file access path is Android/data/data/packageName/
I mean if your using this logic to access file - Environment.getExternalStorageDirectory()
instead of above try this - Context.getExternalFilesDir(null)
refer this link https://developer.android.com/about/versions/11/privacy/storage
I hopes it will help you...

Get info about iOS Simulator traffic

When using a mobile Android Wi-Fi hot spot on macOS Catalina and MenuMeters utility to see total mobile traffic I noticed that every time I launch iOS Simulator (tested on iPhone Pro Max and iPhone SE 2nd generation both with iOS 13.5) it starts downloading huge amounts of data (approx. 450-800 MB) on every launch, so it gets rather expensive. I know that's Simulator because when I quit it traffic stops.
So I'd like to find out what and why Simulator may download maybe to try to block/work around this expensive operations.
I tried to use Charles and Proxyman to detect addresses Simulator could connect to - but with no avail, I cannot see this hundreds of megabytes there. Another option was Wireshark, but I do not know how I could use it to get what I want (as I imagine it should be some addresses from where Simulator could download data).
Could you please give me some advices how to get needed info with these applications or in some other way.
Edit
Thanks to accepted answer and Little Snitch I was able to catch and block "evil" connection
If it's not appearing at all in Charles or Proxyman then it's probably not being sent over HTTP. Wireshark will show the raw TCP & UDP connections, but it's very complicated if you're not familiar with it, and there'll be a lot of info there.
One good option for this is Little Snitch. It does exactly what you want, and can show you exactly who every app is connecting to and how much traffic is sent. It normally costs $30, but they let you try it out for free, and a quick check should be all you need.

data from msdk to osdk is lost very very often

I'm using osdk3.6 and msdk4.6(android).
I'm sending data from android to osdk,
but data is lost very very often and it is almost unusable.
I edited osdk3.6 mobile sample.
parseFromMobileCallback() is hardly called(but not zero).
Does anyone have any suggestions(changing sdk version or something)?
how much is the size of data you sent?Actually,the upstream (mobile device to onboard computer) bandwidth is approximately 1KB/s while the downstream (onboard computer to mobile device) bandwidth is approximately 8KB/s

BLE devices not detected by CSR8510 chip

I am experiencing lot of troubles detecting BLE devices with a CSR8510 chipset. I don't have much knowledge in bluetooth hardware/stack and osx systems. I made a lot of research to solve my problem but I can't find any information specifically related to my issue.
Here is all the informations about my setup :
The dongle is plugged in a Macbook Pro late 2011 (mavericks). I made all the necessary to make the dongle work :
HCI bootmode
com.apple.bluetooth.plist deletion and reboot
I used Bluetooth Explorer to change the Host Controller (default internal chipset -> CSR8510)
Now the dongle is fully recognized by the system, I can use my Magic Mouse (all functionalities work), but I am not able to detect my BLE chest belt (Runalizer blue).
When I launch a scan with the Device>Low Energy Devices panel in Bluetooth Explorer or the demo app indicated by the belt manufacturer I don't find anything.
Demo app : https://developer.apple.com/library/mac/samplecode/HeartRateMonitor/Introduction/Intro.html
To be fully exhaustive my Xperia SP works perfectly with the belt.
I tried to dig into kernel extensions and I've found in System/Library/IOBluetoothFamily.kext/PlugIns two interesting kext :
CSRBluetoothHostControllerUSBTransport.kextCSRHIDTransitionDriver
I do not know if it is relevant or if it could help me but since they start by "CSR" I thaught that it may be related.
I hope someone can help me. It is bothering me so much because I am not able to do the job I was willing to do (gather data from the belt and statistical processing).
Thanks for your attention.

Force USB High Speed EHCI 2.0 hub to enumerate as Full Speed UHCI/OHCI device

In Windows XP SP3 is there a registry key or some setting, maybe even at the device level in the registry, that an EHCI USB 2.0 High Speed hub can be enumerated as a UHCI or OHCI full speed device at the host level?
I am seeing an issue where a USB 1.1 full speed device is deadlocked due to infinitely NAKd split transactions with the transaction translator buffer on a high speed hub. This only happens under certain circumstances the full speed device is connected behind a 2.0 high speed hub only in XP SP3. I have opened an issue with Microsoft and they have confirmed this is a known issue and there is no Hotfix for the issue (nor will one be developed). It has been corrected in Vista+.
If the device is connected directly to the host controller, or has a full speed hub upstream of the high speed hub the problem goes away (because there are no split transactions). So, if there is a way to force the high speed hub to enumerate as a full speed device then it may help us out.
Furthermore, the hardware design is set in stone. Systems have been developed and there is no way to insert a full speed hub chip anywhere in the design, or hook up the devices directly to the root hub. And finally, it is not an option to upgrade the OS on the systems.
After some work and research with help of Microsoft the current conclusion is that there is not a way to do this.
The workaround that we will be using is to perform a PnP reset on the bus to stop the infinite NAKs, then reopen the port to begin communication again. This is not very clean, but it will solve the problem.

Resources