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

Failed communication with master device - works with BUS PIRATE #139

Open
jejmule opened this issue Jun 19, 2024 · 2 comments
Open

Failed communication with master device - works with BUS PIRATE #139

jejmule opened this issue Jun 19, 2024 · 2 comments

Comments

@jejmule
Copy link

jejmule commented Jun 19, 2024

It's not really a bug... let's me explain

I have a real device : CNAP, medical device. The device use CUFF as consumable, the duration of use is stored in a DS2432 chip.
I am working to bypass the memory information to use over-time cuff for formation, tests, and student lesson. CUFF cost approx 1'000$ so we just want to use them for measurement during study.

I have recorded one wire communication with pulse view. I have written a code to emulate the DS2432 using OneWireHub on arduino UNO.
When I test my slave with BUS PIRATE, I can mimic the communication I have recorded using real cuff. But it doesn't work when using the "real" master.

I have recorded the communication with pulse view :

Below is "original" communication between CNAP instrument and a CUFF
CNAP_ORIGINAL

Below is the "real" master with my emulated device using OneWireHub lib
CNAP_EMULATED_SLAVE
My guess is that the slave have a high state between two reicv command and address sent from the master is not visible on the bus. Master tried this several and then display an error message

Below is the BUS PIRATE sending request to the emulated device using OneWireHub
BUS_PIRATE_EMULATED_SLAVE
Here there is a delay between the command and the target address when bus pirate is the master.

I have the feeling, that the issue is coming from timing. The master is sending the target address 80us after sending the command. When BUS PIRATE sent it 844us after the target adress.

Do you have any insight where I can look for to tweak the library behavior to match the master timing?

Thank you,
Jérôme

@jejmule
Copy link
Author

jejmule commented Jul 9, 2024

Nobody have a guess...

@fmushthafa
Copy link

Hi Jérôme, I am also working in the similar project (consumable on medical device) but I even haven't been able to read the data. I tried using my rasbpi to read the data directly by using file manager with 1-wire protocol enabled. However, all I got is FF FF FF in every byte and I think I should use another approach (using uC like arduino).

Anyway, instead of trying to emulate the slave (CUFF) can we just overwrite the counter on the DS2432 so it will read the CUFF as if it's new or unlimited?

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

2 participants