hello and regards
Can you pls tell me how to edit Wire.h and utility twi.h wire??
I need to increase the buffer to 34 (0x22) bytes.
any help are welcome!1
Thx and regards
Just use an editor.
Your topic has been moved to a more suitable location on the forum.
I eused editor "notes", and i still get error at wire 3 I used smart battery code!
Any information how I can fix this error?
What is "wire 3" and what, exactly, is the error you get?
When I run arduino code in serial monitor and try unseal battery I get wire 3 error,but in code author write this,"
//!!! The WIRE library must be edited to increase the buffer to 34 (0x22) bytes !!!
//!!! The standard Arduino Wire library needs to be changed in two places - Wire.h and utility/twi.h !!!
So maybe that why I get that error I need make edit in that wire.h and utility/twi.h
But how??
thx and regards
In Preferences, turn on:
Show verbose output during: [X]compilation [ ]upload
In Tools -> Board: select any board except the one you are using. This will force the IDE to re-build all of the libraries.
In Tools -> Board: select the correct board.
When you select Sketch -> Verify/Compile the messages in the box below your sketch will show every file included from every library. Look for Wire.h and utility/twi.h and you will see the entire file path to each of them.
OK I found wire.h and twi.h and I edited buffer size from 32 to 34 bytes,and I still get error when I whant "Unseal" battery.
I used this code "[smartbattery code]
The IDE doesn't check to see if any library files have been changed. It will re-use the previously compiled libraries until you change the target processor. Remember this trick?
Do that so that when you switch back to your target board the IDE will force a re-compile of all library files, including the ones with the changes.
OK
I use Arduino nano
so I select arduino Leonardo the I Click Verify/Compile
And I select my Board Arduino nano and again I verify/compile
But I get again Wire error-3 when i run to Unseal battery
Error 3 from Wire.endTransmission() meaans:
"received NACK on transmit of data."
I think that means that whatever device you are talking to doesn't understand the value you are sending.
The sketch you are using seems to have a debug feature that you can enable by changing the line:
//#define debug
to
#define debug
Try that and copy to a new reply here all messages that appear in Serial Monitor. The messages should begin with:
Arduino Smart Battery
Several utilities for working with TI bq20z... IC
Press Enter...
Ok i change code to #define debug
but I still get error
Arduino Smart Battery
Several utilities for working with TI bq20z... IC
Press Enter...
Checking communication with the device at address 0x0B...
The device was found !!!
Select operation:
- Read pack info.
- Pack Reset.
- Unsealing a pack.
- Move pack to Full Access mode.
- Clearing a Permanent Failure.
- Clearing CycleCount.
- Setting current date.
- Writing DesignCapacity, QMAX, Update status, Ra_table.
- Begin the Impedance Track algorithm.
Unsealing...
Select operation:
- Read pack info.
- Pack Reset.
- Unsealing a pack.
- Move pack to Full Access mode.
- Clearing a Permanent Failure.
- Clearing CycleCount.
- Setting current date.
- Writing DesignCapacity, QMAX, Update status, Ra_table.
- Begin the Impedance Track algorithm.
Wire error - 3
I can read pack info,but all other options I cant use
Pack Info...
10,0E,67,67
DesignCapacity: 3600 mAh
00,00,AA,AA
FullChargeCapacity: 0 mAh
3E,00,E7,E7
CycleCount: 62
9C,54,96,96
Date: 2022.4.28
1E,2D,4E,4E
DesignVoltage: 11550 mV
07,41,54,4C,20,4E,56,54,37,37
ManufName: ATL NVT
06,44,4A,49,30,32,33,42,42
DeviceName: DJI023
DB,10,1F,1F
SerialNumber: 10DB Hex
00,00,F2,F2
ChargingCurrent: 0 mA
00,00,E4,E4
ChargingVoltage: 0 mV
04,33,38,35,36,92,92
DeviceChemistry: 3856
9A,0B,2F,2F
Temperature: 24.00 C
99,2B,E6,E6
Voltage: 11161 mV
00,00,51,51
Current: 0 mA
64,00,92,92
RelativeSOC: 100 %
00,00,09,09
AbsoluteSOC: 0 %
00,00,1F,1F
RemainingCapacity: 0 mAh
00,00,8C,8C
VCELL4: 0 mV
EC,10,55,55
VCELL3: 4332 mV
EB,10,04,04
VCELL2: 4331 mV
C2,09,4E,4E
VCELL1: 2498 mV
31,00,DA,DA
SpecificationInfo: 0031 Hex
C0,4A,C2,C2
Battery Status: 4AC0 Hex
TCA|TDA|RCA|INIT|DSG|
00,63,E3,E3
Operation Status: 6300 Hex
FAS|SS|
Sealed
A5,FF,67,67
Device Type: FFA5 Hex
A5,FF,67,67
Firmware Version: FFA5 Hex
00,63,E3,E3
Hardware Version: 6300 Hex
That is normal. Turning on debug features will hopefully give some information about why you get an error. It is unlikely to fix the error.
I see no debug output between "Unsealing..." and "Wire error - 3" so the existing debug feature is not going to help. To get further you will have to modify the sketch to show more of what is happening.
What happens when you try to use each of the other options?
Nothing when I press to unseal It not useal battery just write unsealing..... but in real not unseal,i put here following steps what I get
Arduino Smart Battery
Several utilities for working with TI bq20z... IC
Press Enter...
Checking communication with the device at address 0x0B...
The device was found !!!
Select operation:
- Read pack info.
- Pack Reset.
- Unsealing a pack.
- Move pack to Full Access mode.
- Clearing a Permanent Failure.
- Clearing CycleCount.
- Setting current date.
- Writing DesignCapacity, QMAX, Update status, Ra_table.
- Begin the Impedance Track algorithm.
Pack Info...
DesignCapacity: 3600 mAh
FullChargeCapacity: 0 mAh
CycleCount: 62
Date: 2022.4.28
DesignVoltage: 11550 mV
ManufName: ATL NVT
DeviceName: DJI023
SerialNumber: 10DB Hex
ChargingCurrent: 0 mA
ChargingVoltage: 0 mV
DeviceChemistry: 3856
Temperature: 25.80 C
Voltage: 11119 mV
Current: 0 mA
RelativeSOC: 100 %
AbsoluteSOC: 0 %
RemainingCapacity: 0 mAh
VCELL4: 0 mV
VCELL3: 4331 mV
VCELL2: 4331 mV
VCELL1: 2458 mV
SpecificationInfo: 0031 Hex
Battery Status: 4AC0 Hex
TCA|TDA|RCA|INIT|DSG|
Operation Status: 6100 Hex
FAS|SS|
Sealed
Device Type: FFA5 Hex
Firmware Version: FFA5 Hex
Hardware Version: 6100 Hex
Select operation:
- Read pack info.
- Pack Reset.
- Unsealing a pack.
- Move pack to Full Access mode.
- Clearing a Permanent Failure.
- Clearing CycleCount.
- Setting current date.
- Writing DesignCapacity, QMAX, Update status, Ra_table.
- Begin the Impedance Track algorithm.
Reseting...
Select operation:
- Read pack info.
- Pack Reset.
- Unsealing a pack.
- Move pack to Full Access mode.
- Clearing a Permanent Failure.
- Clearing CycleCount.
- Setting current date.
- Writing DesignCapacity, QMAX, Update status, Ra_table.
- Begin the Impedance Track algorithm.
Unsealing...
Select operation:
- Read pack info.
- Pack Reset.
- Unsealing a pack.
- Move pack to Full Access mode.
- Clearing a Permanent Failure.
- Clearing CycleCount.
- Setting current date.
- Writing DesignCapacity, QMAX, Update status, Ra_table.
- Begin the Impedance Track algorithm.
Clearing a Permanent Failure...
Select operation:
- Read pack info.
- Pack Reset.
- Unsealing a pack.
- Move pack to Full Access mode.
- Clearing a Permanent Failure.
- Clearing CycleCount.
- Setting current date.
- Writing DesignCapacity, QMAX, Update status, Ra_table.
- Begin the Impedance Track algorithm.
Wire error - 3
also with clearing permanent failure nothing happend,just I can use number 1 "read pack info"
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.