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

Remote debug/test bench #96

Closed
glitchcore opened this issue Sep 4, 2020 · 1 comment
Closed

Remote debug/test bench #96

glitchcore opened this issue Sep 4, 2020 · 1 comment
Assignees

Comments

@glitchcore
Copy link
Contributor

Hello, guys!

I can create by myself testing tool for remote hardware debugging with following features (so here is my suggestions):

  • 24*7 connected target Flipper device and accessible via Internet. Raspberry PI or some Linux single-board PC can be used as basic high-level control board.
  • Tool can push/click each user buttons by hardware by "control board" (low level). Usage of optocouples/reed-switch relays is fine for that.
  • Connect other Flipper peripherals to target:
    • 433 door bell/barrier controller, to read it status and it's remote control (to sniff it signal by flipper).
    • Some iButtons and it's reader can be also connected to target.
    • RFID reader under the target, to paste readed keys from it to out UART.
    • RFID cards with different IDs. Can changed by servo or carousel from CD-changer (I have this part).
    • IR-transmitter/receiver.
    • ...all the peripherals, that we'll can realize...
  • "Hardware" USB peripherals (SWD programmer tool, etc?) reconnection and control of PWR, RST, BOOTx internal service lines, etc also need. This can be made by some software hacks or by relays.
  • Image from target display will be translated by webcam to web page (see next). That's simplest way for start.
  • WEB page, accessed to all developers (or maybe for everyone to view is better?) with these things:
    • Target status area, Flipper control buttons, "connected" to real target. Power and service line switches.
    • Ability to upload custom firmware binary to target. Take firmware build from CI/CD. Button to flash.
    • Test tool UART with Flipper peripherals status and target device UART log also should be here.
    • List can be expanded with other good ideas.
  • OpenOCD connection from target (can be accessed from developers around the world by VPN or just port forwarding with IP access lists). So this feature allows deep remote debug.
  • Test tool must be as autonomous, as possible. So from WEB page we can reboot everything, if it need, without local operator help. I have some experience in that.
  • Planned life time for the tool is around 6 months. It's enough?

I guess, that main control part of tool (e.g. "control board") must be independent and accessed only via UART with simple single-line protocol, and connected to target with real hardware (wires, w/o JTAG/etc. But this do not excluded JTAG as addition). That's main idea.
The tool should be build as semi-portable construction, in order to move it to host in other place. I can start to build it and host it by myself for start.

Some another abilities can be also realized:

  • For test automation we can use RobotDemo (from @glitchcore suggestion) or simple expect tool/python scripts/etc.
    • Flash firmware (from CI/CD or custom)
    • Apply test cases and submit its results.
  • Maybe run tests with CI/CD (I'll need help with that)
  • (Development results from this stage can be easily used to build Mass-production testing tool in future)

I suggest to make functional prototype, and after it maybe we'll want to built a few upgraded tools like this.

Questions:

  • Sharing control. Tool WEB page can be accessible to view for all, but ideologically should have single-access to control (modify).
    • My idea is to make some schedule page, where developers can submit request to single use for specified time. But I'm not sure, that it's good solution.

Originally posted by @lomalkin in #26 (comment)

@zhovner
Copy link
Member

zhovner commented Sep 23, 2020

First test bench:

  • Rapsberry pi
  • Remote firmware flashing ST-Link via USB
  • remote UART
  • remote buttons press
  • remote reset (left+right button)
  • Webcamera video stream
  • Web API (JSON) ???

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

3 participants