-
Notifications
You must be signed in to change notification settings - Fork 239
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
Doesn't stay connected #11
Comments
|
Incomplete OTA does not kill the device. |
Sorry for the very large screenshot, don't know how to limit the size. As I expected, the step 3 isn't possible: the device disconnects while flashing and gives, of course, the GATT error. Any idea, why this hapapens? |
It's not possible to send any settings, I tried with a smily. In the log it says that "Settings xxx was send successful" but nothing happens. So, the latency cannot be changed either. And, it doesn't stay connected more than 10-11 seconds max. No matter what app or utility has paired the device. |
Phone restarted? |
I tried with several phones, but 1 minute ago, I succeeded with my laptop! So, it stayed connected and I reflashed the original FW! Good! |
Thank you, Viktor for that amazing FW and Aaron, of course, at the first place! |
I had exact the same problem. It wasn't possible to save config. For all with the same problem: Just pull out and reinsert the battery. After that it was possible to save config and update connection latency as shown on pictures above. Now everything works as expected without disconnectiong after few seconds. |
I reopened the issue because I found the problem, but a question has arisen. I have 3 sensors and sometimes each of them has the same connectivity problem - after exactly 10 seconds it disconnects while paired, no FW update is possible. I researched the issue with nRF Connect a lot, but the gatt connection timeout error 8 (133) is very common on Android smartphones. Suddenly, one of the thermometers stayed connected and I could reflash the act1441 FW. So, after that, the thermometer begun to be able to stay connected! What??? After hours of thinking and trying, I found that all the batteries were (a little) bad! I had changed a lot of batteries, some of them were bought directly from a store (Duracell) and many had been stored for a year or more. I went through 20+ batteries. One that I measured 3.102V dropped to 2.601V while connected and trying to flash. The best one that helped me to reflash all of the sensors, showed in the device 2.852V but dropped only to 2.822V while connected and for some milliseconds to 2.695V while flashing. This was the only battery that kept each of the devices paired without disconnecting. Now, there comes a wonder (and this is my question). After reflashing the sensors from the pvvx FW to the atc1441 FW, all 3 devices could stay connected with poorer batteries (but not with very poor ones). These were the batteries that for sure haven't let a device to stay connected. I read that pvvx' FW drained a lot less of power than that of atc1441, have I misunderstood something? Well, I'm happy that with good batteries all devices work good with both of FW! So, for those who are battling with a disconnecting issue after flashing a custom FW, try to replace the battery with a good one at first! Every battery that is below the 50% can work for displaying and advertising the data, but couldn't work in connected mode or flashing! And a new battery that shows 3 - 3.2 volts out of the circuit, could drop to a critical (or below!) value when put into the circuit (sold half-dead, and lots of them are). |
Hello @pvvx ! Thanks for you great improvement to @atc1441 work. Esp. love the improved flasher UI. Unfortunately I share the same issue like @almostlunatic, but in a different environment. Here are my key points
Might my issue arise from some over-conversative default settings regarding the energy management in your version? |
Hello @pvvx , thank you for this custom firmware! Great work ! I love every customization, esp. the clock. I had once the same disconnection issue as @almostlunatic described. |
The CGG1 "Qingping Temp & RH Monitor" has tantalum capacitors in the power circuit and works when disconnected for a few seconds without a battery. Conducted an experiment with LYWSD03MMC and a dead CR2032 battery, which immediately dropped the voltage at low load (<1mA) below 2 V. I switched on the electrolyte to the battery - it has been working amazingly for several days... |
anybody added the capacitor to LYWSD03MMC ? what specs is it ? |
TI released an application note concerning voltage drop of CR2032 w/ or w/o capacitors in 2017 and the object of study is also a BLE chip. This research used a 22uF or 32uF capacitor as a power supply capacitor in the case where the max impulse current is 6.1mA. Consider that the max impulse current of LYWSD03MMC is < 8mA in most cases according to @pvvx 's research, a 32 or 47uF capacitor should be enough for extending battery life and reducing voltage drop. Up to hundreds of uF is also OK and usually without any disadvantages (except prices). In my case, I decided to add a 100uF capacitor. MLCC does not have polarity and you should choose it in most cases. However, if you decided to use a tantalum capacitor, or any other type of capacitor that has a polarity, DO NOT REVERSE THEM! Next to the "C24" or "C25" sign is the positive pole. Footnotes
|
I have noticed that disconnecting problem occurs when there is a low battery. After replacing battery to the new one everything working as expected. |
The initial “connection interval” selects an external adapter. Consumption is highly dependent on the "connection interval". |
For anyone affected by this: I couldn't easily find a large SMD capacitor, so I thought to try a normal one that I have plenty lying around. A 32uF electrolytic cap, mounted as shown it the picture below, is just small enough to fit in the cavity of the enclosure. And mounting it was quite easy (just cut and bend the legs, and apply solder to both the pads and the legs before joining them together). Not sure whether it's the best solution, but it seems to work fine. The flash page used to disconnect almost immediately after connecting, now it stays connected consistently. |
Such electrolytic capacitors have a leakage volume comparable to the flow rate of the device. |
So I guess battery life should be affected a lot? I'll monitor it and maybe replace the cap with a ceramic. For the moment, after adding the capacitor the battery reading became much higher but fluctuates a lot. The same battery that was around 45% now fluctuates wildly between 52% and 63%. Not sure how to interpret this 😄 |
Fluctuates if different load. And it can be different from the included "active scanning" that increases the consumption of the device for the transmission of additional responses... |
Not sure I understand. I didn't change anything in the code/settings, just added the capacitor. PS. thanks a lot for your awesome work, it's amazing what one can do with these little devices. |
Is there any recommendation for the two capacitors that should be added to those pads? |
The first CGDK2 installed the following capacitor: |
Ah thank you for the link to this informative comment 👍 |
I guess After searching for tantalum capacitors with case code 1411 (note: this may be the case of CGDK2. Read my previous reply if you are using LYWSD03MMC), I found this: Oh, |
works for me |
Sorry, I got errors when I posted. Now they work again. Maybe website temporarily down. |
Hi,
I OTA-flashed the thermometer but used the act1441 web flasher. It works but cannot stay connected to the phone. Paired it with nRF Connect or act1441's web flasher or pvvx web flasher, it disconnects in 6-10 seconds. Cannot reflash it too 'cause if it disconnects while flashing (and for sure it does) it'll become bricked... Maybe some advices what to do?
The text was updated successfully, but these errors were encountered: