Skip to content
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

DS2502_DELLCHG example sends all data as FFs only #140

Closed
arekm opened this issue Jul 14, 2024 · 2 comments
Closed

DS2502_DELLCHG example sends all data as FFs only #140

arekm opened this issue Jul 14, 2024 · 2 comments

Comments

@arekm
Copy link

arekm commented Jul 14, 2024

readme - it says to use 3.0.0 release but there is only 2.2.3 (which I'm using) available at that link. Arduino IDE 1.8.19

Describe the bug
Trying to run DS2502_DELLCHG example on Arduino Nano clone board. I'm checking if it works by using
https://github.com/KivApple/dell-charger-emulator/blob/master/dell-charger-data-editor.py script
and connection described at the end of https://github.com/KivApple/dell-charger-emulator page (but with additional 4.7k pullup resitstor; note: also tested without it)

With that script I'm able to read original dell charger eeprom just fine (doing that to confirm that wiring and script is ok).

Unfortunately with DS2502_DELLCHG I'm reading only FFs as data. So 1-wire seems to be working, just no correct data is sent.

To Reproduce

 [35] /dev/ttyUSB1 - FT232R USB UART - FT232R USB UART
Select option [0-35]: 35
Reading EEPROM...
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff 
Done

Expected behavior

I would expect

charger130W = "DELL00AC130195067CN0CDF577243865Q27F2233\x9D\x72";

data to be read instead of 255s.

Logic analyzer shows:
reset condition, presence condition, skip rom command 204, data 240, data 0, data 0, and then only bunch of data 255

Screenshots
dell-1-wire

Dev-Environment:

  • arduino nano clone with atmega328p
  • arduino ide 1.8.19 on ubuntu linux
  • for dell-charger-data-editor.py I'm using FT232R based USB serial adapter
@arekm
Copy link
Author

arekm commented Jul 14, 2024

And increasing ONEWIRE_TIME_MSG_HIGH_TIMEOUT to 35ms helper (which I thought is only meaningful if onewirehub is the receiving side).

@arekm arekm closed this as completed Jul 14, 2024
@arekm
Copy link
Author

arekm commented Jul 15, 2024

Won't be that easy after all.

So ONEWIRE_TIME_MSG_HIGH_TIMEOUT is now set to 35ms. python script is able to read some data from emulated eprom:

Select option [0-9]: 
8
[...]
 [35] /dev/ttyUSB1 - FT232R USB UART - FT232R USB UART
Select option [0-35]: 35
Reading EEPROM...
8d 44 45 4c 4c 30 30 41 43 31 33 30 31 39 35 30
36 37 43 4e 30 43 44 46 35 37 37 32 34 33 38 36
35 51 32 37 46 32 32 33 33 9d 72 ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff f6 
Done
 [0] Manufacturer  : DELL
 [1] Adapter type  : 00AC
 [2] Watts         : 130
 [3] Volts         : 19.5
 [4] Amps          : 6.7
 [5] Serial number : CN0CDF577243865Q27F2233
 [6] Save changes and exit
 [7] Exit without saving changes
 [8] Read EEPROM data via 1wire
 [9] Write EEPROM data via 1wire
Select option [0-9]: 

On logic analyzer that reading is not even decoded (thing happening too slowly to be recognized as 1-wire?).
python-script-reading-correctly.zip

So connecting emulated charger to a dell laptop. It doesn't recognize the emulated eprom. Logic analyzer shows garbage on bus.
connected-to-dell-laptop.zip

Any clues on what else I could try?

@arekm arekm reopened this Jul 15, 2024
@arekm arekm closed this as completed Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant