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

Simpler standalone BT example code for the Raspberry Pico #474

Open
olimaticer opened this issue May 9, 2023 · 4 comments
Open

Simpler standalone BT example code for the Raspberry Pico #474

olimaticer opened this issue May 9, 2023 · 4 comments

Comments

@olimaticer
Copy link

Hi

I was able to compile separately “spp_counter.c” as BT classic in conjunction with the “standalone” directory under Windows.
In my eyes, whoever wrote the BT example code for the Raspberry Pico is a true artist of CmakeLists.txt files. Respect!

I think I am not the only one who need a simpler and shorter example to figure out what is going on.
It should be a standalone outside the lib examples one but not so complex like the one within the standalone folder.

A BT classic SPP example does the trick.

An enhanced blink.c which sends an on/off message to the asynchronous BT task in the second c file and get a message from the asynchronous BT task to switch on/off an another LED.

Some code comments about the message the transfer between the two parts also within CmakeLists.txt are welcome.

Who can help?
Matthias you?

Bests
Gregor

@peterharperuk
Copy link
Contributor

There are a couple of standalone examples (simple gatt stuff) in here https://github.com/raspberrypi/pico-examples/tree/master/pico_w/bt/standalone

@olimaticer
Copy link
Author

olimaticer commented May 9, 2023

Sorry Peter

but your link describe only the problem because an example like the spp_counter will be compiled on top of the standalone code.
The example source is only found in your ...\pico-sdk\lib\btstack\example dirctory.
In your suggested example directory you found only links within the CmakeLists.txt file.

The standalone directory addressed all possibilities for added examples. But we should not have to code within the sdk library.

We need a simple example so we don't have to decode all the CmakeLists.txt files in the solution path to build a headache-free solution.

Gregor

@mringwal
Copy link
Member

Hi Gregor. I've played with the a2dp + cosmic unicorn demo https://github.com/Gadgetoid/galactic-bluetooth-audio
It contains a copy of our a2dp_sink_demo and the necessary files to use the cosmic unicorn device.

The BTstack examples in the example/ folder are supposed to be called via btstack_main (and are fully portable) after a port-specific setup (e.g. for the Pico W).

@sonnny
Copy link

sonnny commented Jul 17, 2023

Hi Gregor,

 Not sure if I know what you want, but I have a couple of example, link below for a simpler main.c

ble template

with youtube demo

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

4 participants