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

Background ping fail when snooping #35

Closed
PeterBee97 opened this issue Dec 30, 2018 · 3 comments
Closed

Background ping fail when snooping #35

PeterBee97 opened this issue Dec 30, 2018 · 3 comments
Labels
Milestone

Comments

@PeterBee97
Copy link

The proxmark will not respond when in snoop mode. Therefore background ping doesn't work, and app automatically disconnects. But upon reconnect it somehow makes the proxmark reboot, so the snoop data is lost.

Steps to reproduce the behaviour:

  1. connect proxmark
  2. type "hf 14a snoop" enter
  3. wait 20 seconds till it shows connection failed

Expected behaviour

stop ping when snooping so we can get the snoop data normally

Actual behaviour

ping failed, proxmark reboots upon reconnect which leads to data loss

Screenshots / logs

Proxmark details (required!)

Prox/RFID mark3 RFID instrument
bootrom: master/v3.1.0-35-g0d5545c-suspect 2018-12-29 21:12:22
os: master/v3.1.0-35-g0d5545c-suspect 2018-12-29 21:12:23
fpga_lf.bit built for 2s30vq100 on 2015/03/06 at 07:38:04
fpga_hf.bit built for 2s30vq100 on 2018/09/12 at 15:18:46
SmartCard Slot: available

uC: AT91SAM7S512 Rev B
Embedded Processor: ARM7TDMI
Nonvolatile Program Memory Size: 512K bytes. Used: 199197 bytes (38). Free: 325091 bytes (62).
Second Nonvolatile Program Memory Size: None
Internal SRAM Size: 64K bytes
Architecture Identifier: AT91SAM7Sxx Series
Nonvolatile Program Memory Type: Embedded Flash Memory

Device details (required!)

AndProx version: 2.0.4-5-g4a4713a-dirty (100)
PM3 Client version: v3.1.0/HEAD
Build timestamp: 2018-12-30T01:38:28Z
Model: ONEPLUS A5000 (OnePlus5)
Product: OnePlus5
Manufacturer: OnePlus (OnePlus)
RAM: 7.5 GiB (2.6 GiB free)
Android OS: 9 (API 28)
Android Build: PKQ1.180716.001

Additional context

I have modified the ping time period locally (NativeSerialWrapper.java) as a temporary solution. Hope background ping can smartly pause when blocking tasks are running.

@PeterBee97 PeterBee97 changed the title Background ping fail when snoop Background ping fail when snooping Dec 30, 2018
@micolous micolous added the bug label Jan 23, 2019
@micolous
Copy link
Contributor

micolous commented Feb 5, 2019

The background "ping" was a way to work around not detecting a loss of device connection.

I think the way I'll need to work around this is detect some snoop command and then don't do the ping in that case.

It would be nice if the firmware still responded to CMD_PING even when snooping... because I'm pretty sure I've seen the PM3 reset itself while in a snoop and the watchdog kicked in.

@micolous
Copy link
Contributor

micolous commented May 6, 2019

I think the way to solve this for now is going to be:

  1. Disable background ping
  2. Disable blocking the UI on "waiting for proxmark"

This would make AndProx act more like the Proxmark CLI, at the expense of potentially busylooping or doing something weird on a UI level. But there's already many weird things it does.

@micolous micolous added this to the 2.1.1 milestone May 26, 2019
@micolous micolous reopened this May 26, 2019
@micolous
Copy link
Contributor

I've done a couple of things to improve this in git master:

  1. Background ping is removed (32c61c8)
  2. Wake-lock the screen in the CLI (optional, but on by default: b0ad106)

In Proxmark3 CLI, there's not any standard way to stop an in-progress command, other than pressing the PM3-button (^c terminates the program). You can get a similar effect by unplugging the PM3, this should terminate all the worker threads and allow it to start up again properly.

I tested this with hf 14a snoop and hf mf sim, and these both seem to work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants