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

CRP Example with Arduino101/Processing3 in python mode #24

Open
mjs513 opened this issue May 7, 2016 · 2 comments
Open

CRP Example with Arduino101/Processing3 in python mode #24

mjs513 opened this issue May 7, 2016 · 2 comments

Comments

@mjs513
Copy link

mjs513 commented May 7, 2016

Hi Jeff

First thanks a million for the python library. I am trying to get the bglib_test_crp_collector.py example to work with Processing3 in python mode using the Arduino101 board and having only partial success.

It gets through reading the advertising packet and discovering the service but never connects to the Arduino101. I tested example in python and of course it works like a charm. I also tested the scanner example under processing/python mode and it works fine.

Don't know of anyone trying this with the BLED112 dongle so any help would be appreciated. I am attaching the files for reference.
BLEPython.zip

Here is how far it gets. It never gets the the 05 packet to trigger the event.

Baudrate: 115200
=>[ 00 01 03 00 00 ]
<=[ 00 03 03 00 00 86 01 ]
=>[ 00 02 06 01 00 00 ]
<=[ 00 02 06 01 00 00 ]
=>[ 00 00 06 04 ]
<=[ 00 02 06 04 00 00 ]
=>[ 00 05 06 07 C8 00 C8 00 01 ]
<=[ 00 02 06 07 00 00 ]
Scanning for BLE peripherals...
=>[ 00 01 06 02 01 ]
<=[ 00 02 06 02 00 00 ]

Thanks
Mike

@mjbrown
Copy link

mjbrown commented May 24, 2016

It looks like you aren't getting any advertisements in your scan. If you were, you'd get some long messages from the dongle like these:
COM7: 2016-05-23 21:02:11,414 - bgapi - INFO - EVT-GAP Scan Response - RSSI:-40 - Packet Type:0 - Sender:00:07:80:78:a5:b8 - Address Type:0 - Bond:0 - Data:020106
COM7: 2016-05-23 21:02:11,596 - bgapi - DEBUG - <=[ 80 21 06 00 C9 00 40 20 F4 70 EC F4 01 FF 16 02 01 06 02 0A 04 0F 09 42 6C 75 65 4D 6F 20 4C 69 66 65 50 4F 34 ]
COM7: 2016-05-23 21:02:11,596 - bgapi - INFO - EVT-GAP Scan Response - RSSI:-55 - Packet Type:0 - Sender:f4:ec:70:f4:20:40 - Address Type:1 - Bond:255 - Data:020106020A040F09426C75654D6F204C696665504F34
COM7: 2016-05-23 21:02:11,790 - bgapi - DEBUG - <=[ 80 21 06 00 CE 00 40 20 F4 70 EC F4 01 FF 16 02 01 06 02 0A 04 0F 09 42 6C 75 65 4D 6F 20 4C 69 66 65 50 4F 34 ]

Note: This log is from a different BGAPI python library, available on pypi (pip install bgapi).

@mjs513
Copy link
Author

mjs513 commented Jun 1, 2016

Hi Mike

Sorry for not getting back to you sooner but I have had a family medical emergency that has taken precedence. I came across the library that you mentioned but it did not have a good example for using CRP and the examples required me using two BLED112s when I just wanted to use the Arduino101 board and the PC. Anyway, Jeff's library seems to work fine when run under Python - no issues. But the problem is occurring when I move it over to Processing 3.0 in Python mode that it seems to be failing and I do not have a clue how to trace where the problem lies. I don't re ally want to try converting another library to run under Processing at this point.

Mike

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