New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E/DfuBaseService: Connection state change error: 133 newState: 0 #250
Comments
Error 133 is very common on Android. It's a generic BLE error. From the above log I conclude that your device does not behave correctly. It replies with something that is being rejected by the phone. Did you try another phone to check it? |
I got the DFU to work. I talked to my firmware team making the hardware, and they changed the MAC address of DfuTarg to be the same as the device itself. Before it was +1. |
Be careful, as services may be cached now. Make sure you have Service Changed characteristic enabled, otherwise you'll have problems on iOS (and perhaps Android future versions). I'm closing the issue now. Feel free to open a new one if you have another issue. |
Hi I would like to recommend re-opening this issue. I could have created a new issue, but its the same issue without a resolve for me. @philips77 if you would rather, I can log this as a new issue. I have the exact same issue as this - and I can conclude that it is not because of the phone. I think this is related, identical or the exact same experience that developers go through to other issues others have raised: and so it's worth addressing this with an updated sample code or documentation that prevents this behaviour so people don't need to go through multiple closed issues. Here's what I did:
override fun onCreate(savedInstanceState: Bundle?) {
// abbreviated
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
DfuServiceInitiator.createDfuNotificationChannel(this)
}
DfuServiceListenerHelper.registerProgressListener(this, dfuProgressListener)
In my case the device goes into bootloader mode, but then the connection seems to get an error. I'm really lost as to how the same code as the repository, would create a difference? There must be somewhere that is configuring a different behaviour. We're using the latest Android version, firmware and SDK. Here's the relevant gradle dependency
As mentioned in #255
This did not work for me, it's consistently happening. here's the log from nRF toolbox clone - a successful update:
and here's the log from the new implementation - not a successful update.
The implementation is identical to the cloned repository, with the one exception that I hard-coded the
When I run the above code, the device goes into bootloader mode (nice LED that tells me that) and, well it hangs with the above message. If I run the nRF Toolbox clone, I get 100% success rate. I run the above code, it's a 100% failure rate so far (I've only started on this today!) I'm using Samsung Galaxy A10, Android 10. I've tried 6 times with the refresh services strategy - and the 133 error seems to come through. I'll switch to nRF Toolbox and it works without a hitch! What am I doing wrong? |
Hi, Just a follow up. I created a ticket, and I immediately found a resolve so I'm posting it here. My issue, which wasn't to do with Legacy DFU or anything like that, was because I was working on an activity of a larger project - and my activity I was working on wasn't asking for Location Permission before the DFU process started. The DFU Library must be using a privacy sensitive method to interact with the device after it turns the Nordic device into bootloader mode. See more details here |
True. I should have mention this in the ReadMe. Unless bonding is used, and buttonless service with bond support, Location permission is required for scanning Bluetooth LE devices. |
Sorry for submitting a new issue, but I encountered another issue and reopened my issue from earlier, and I'm not sure if you saw it. Also, should DfuTarg advertise with the same MAC address as the device's address or should it be the device's address +1?
Any help would be appreciated.
I have created a working zip file to upgrade my device, and I followed these steps below:
I get this error below:
DFU Bootloader version:
SDK version: 11.0
Bonding used: no
Library version: 1.10.3
Device information:
Device: Samsung Galaxy S9
OS: Android 10
Logs:
The text was updated successfully, but these errors were encountered: