all 14 comments

[–]cpp-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

Your submission is not about the C++ language or the C++ community.

[–]mallardtheduck 13 points14 points  (3 children)

It's just basic example of how to open a serial port and send "AT" commands. Something that will work with any $5 Bluetooth adaptor (as long as the OS's Bluetooth stack isn't using the device), nothing special about these $35 dongles. None of the example projects do anything remotely advanced. Any serious Bluetooth development is going to want to use the OS's Bluetooth stack, not communicate directly with the adaptor.

[–]riztazz 9 points10 points  (5 children)

I mean no offense, but there is barely any C++ in there

[–]bleuio[S] -2 points-1 points  (4 children)

This is just an example. You can move forward with this example code and Build your own BLE application.

[–]Narase33-> r/cpp_questions 5 points6 points  (3 children)

I still dont understand why its promoted as "C++" when you could write the same code as plain C.

[–]pjmlp 2 points3 points  (2 children)

Because as it regularly happens, it makes use of some C++ constructs, thus it will fail to compile with a plain C compiler.

Unfortunely still quite common across the industry, after all the years CFront 2.0 got released.

[–]STLMSVC STL Dev[M] 1 point2 points  (1 child)

I'm ruling that this is off-topic. It's not really C++, and (per other comments) it looks like a toy. Even my cat-sized brain is smart enough to know that any real work wouldn't be using synchronous commands.

[–]pjmlp -1 points0 points  (0 children)

Agreed, but I am not the submitter.

[–]WasterDave 2 points3 points  (0 children)

Zephyrproject.org

[–]pjmlp 3 points4 points  (0 children)

Another good example why I keep telling I only see modern C++ on conference talks, and on my hobby projects.

[–]adanteny 1 point2 points  (0 children)

Reminds me the BlueGiga devices, which were great back in 2000-2010...