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

Local development #20

Closed
matthewgardner opened this issue Apr 30, 2019 · 2 comments
Closed

Local development #20

matthewgardner opened this issue Apr 30, 2019 · 2 comments
Labels

Comments

@matthewgardner
Copy link
Contributor

How are you running locally to test it? (mac or pc?)
Googling/searching around Bluez isnt supported on Mac or PC - have you stored locally some streamed data that your replay, via a test class back into the main class?

Trying to work out how you built this project :)

@Scrin
Copy link
Owner

Scrin commented May 1, 2019

When I'm doing development on one of my Linux machines, I use hcitool and hcidump directly as it's by default. When I happen to do development on my Windows machine, I have initially enabled WSL on the machine, generated a SSH key and added that key to other Linux machines (and raspberry pi's). This should probably work with some command-line windows ssh client too, but I use WSL for other reasons too so it was the easiest choice.

Then finally I have this in my collector config:

command.dump=bash -c "ssh user@192.168.1.xxx hcidump --raw"

which effectively runs hcidump over ssh from another Linux computer/rpi through WSL. Before this I used to have a text file containing a dump gathered from another machine and then as the dump command I just read the file (command.dump=cmd /c "type hcidump.txt"), but it became a bit cumbersome as it all pops all the data instantly and it's the same data over and over again.

I have also put an empty command.scan= to disable the scan command, and instead run hcitool lescan --duplicates --passive manually on the device where hcidump actually runs on, as this allows me to simulate situations where there's a pause in the data flow by stopping the hcitool command and starting it again, although it could be done over ssh the same way as the dump.

I don't have any macs, but the same hcidump-over-ssh trick should work equally fine on macs

@matthewgardner
Copy link
Contributor Author

Awesome - thanks :)

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