Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9872 Discussions

get BT SPP data from python then transfer to my C process use.

振王3
Beginner
1,041 Views

hi

i have used "SPP-loopback.py " get the BT datas, but now i want transfer to my C process.

how can i do?

thanks for your solution

0 Kudos
1 Solution
idata
Community Manager
174 Views

Hello 王振,

 

 

Thanks for reaching out!

 

 

I'm not sure transferring data from Python to C would be the best approach, I mean, this would bring a lot of issues at the time of sharing the data. So, my first suggestion is that you reconsider using this approach and instead use a more traditional approach, meaning using only Python or only C. For Python, you can modify the SPP-Loopback example to transform it into your project. For C, I would suggest you to read this book: https://people.csail.mit.edu/albert/bluez-intro/c404.html https://people.csail.mit.edu/albert/bluez-intro/c404.html to learn how to program Bluetooth using C and BlueZ's API.

 

 

If you still want to transfer data from Python to C, then I'd suggest you to read the following documents which might be of help:

 

 

https://stackoverflow.com/questions/4961267/pass-many-pieces-of-data-from-python-to-c-program https://stackoverflow.com/questions/4961267/pass-many-pieces-of-data-from-python-to-c-program

 

https://stackoverflow.com/questions/4743748/how-do-i-connect-a-python-and-a-c-program https://stackoverflow.com/questions/4743748/how-do-i-connect-a-python-and-a-c-program

 

https://stackoverflow.com/questions/4997831/a-way-to-pass-milions-of-items-in-python-to-c-program-ma... https://stackoverflow.com/questions/4997831/a-way-to-pass-milions-of-items-in-python-to-c-program-ma...

 

https://docs.python.org/3/extending/extending.html https://docs.python.org/3/extending/extending.html

 

 

I hope this information helps you,

 

Pedro M.

View solution in original post

1 Reply
idata
Community Manager
175 Views

Hello 王振,

 

 

Thanks for reaching out!

 

 

I'm not sure transferring data from Python to C would be the best approach, I mean, this would bring a lot of issues at the time of sharing the data. So, my first suggestion is that you reconsider using this approach and instead use a more traditional approach, meaning using only Python or only C. For Python, you can modify the SPP-Loopback example to transform it into your project. For C, I would suggest you to read this book: https://people.csail.mit.edu/albert/bluez-intro/c404.html https://people.csail.mit.edu/albert/bluez-intro/c404.html to learn how to program Bluetooth using C and BlueZ's API.

 

 

If you still want to transfer data from Python to C, then I'd suggest you to read the following documents which might be of help:

 

 

https://stackoverflow.com/questions/4961267/pass-many-pieces-of-data-from-python-to-c-program https://stackoverflow.com/questions/4961267/pass-many-pieces-of-data-from-python-to-c-program

 

https://stackoverflow.com/questions/4743748/how-do-i-connect-a-python-and-a-c-program https://stackoverflow.com/questions/4743748/how-do-i-connect-a-python-and-a-c-program

 

https://stackoverflow.com/questions/4997831/a-way-to-pass-milions-of-items-in-python-to-c-program-ma... https://stackoverflow.com/questions/4997831/a-way-to-pass-milions-of-items-in-python-to-c-program-ma...

 

https://docs.python.org/3/extending/extending.html https://docs.python.org/3/extending/extending.html

 

 

I hope this information helps you,

 

Pedro M.
Reply