|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
Hi, I Have a Seagate 1 TB USB mechanical hard drive.
It has either a corrupted partitions or they are Linux partitions. I don't know how to tell.
On my Windows machine, in Disk Management, I try to delete one of the partitions, after taking the drive offline, and it gives the error: "The media is write-protected."
Anyone know what kind of tool I can use to un-write-protect the drive?
SOLUTION:
Use the "diskpart" command line tool in Windows to remove the write protection. Simple.
The difficult we do right away...
...the impossible takes slightly longer.
modified 12-Mar-23 17:24pm.
|
|
|
|
|
Up front
I did ask this forum administrators if I can post a link to another forum, reason being that this forum is not geared for discussion / coding of Bluetooth technology..
They replied that they do prefer to keep my posts here, so if you have problem with that…
Problem description
Here is the latest “problems” with coding Bluetooth –
I can “scan for (Bluetooth devices “ and detect ALL of them in range. No issue here.
Then when I “ scan for (Bluetooth) service” I detect only one – when I run “simple scan” and then I can detect another , different one, and only one , when I scan using “full scan”.
I do expect to retrieve “service” of all of the reachable devices – all four of them.
Request for help
I suspect the issue is – as always – with “bluez” library and could use suggestion on how to “scan for service “ using some other way.
|
|
|
|
|
Just a suggestion...
I looked for your previous posts about bluetooth and it didn't seem like you got any answers.
So perhaps there is a different site (not forum on this site) where more answers might show up?
Keep in mind that I am just trying to be helpful and far as I am concerned you can keep posting here. Maybe someone will wander by eventually that knows the answers.
|
|
|
|
|
I appreciate your post very much. The problem is - there is no dedicated forum for Bluetooth coding.
People often post - how do i connect my Iphone to my boom box......When I run into real issues , most replies are limited to RTFM...
|
|
|
|
|
|
I am trying to stay away from "low energy" technology for now. I need to walk before I can run. However, I'll take a peek on the article code to see if I can spot some similarity with "normal" Bluetooth.
Thanks for the link , appreciate that.
Cheers
|
|
|
|
|
I don't know what the differences are, but the article looked like it might have some useful ideas, and since you are using Qt anyway. What I did notice was that the website has a number of forums, so that might be a better place for you to get help on a subject that few people (at least here on Codeproject) seem to be working in.
|
|
|
|
|
I am sadden to report that the problem disappeared overnight and after OS update / upgrade.
Today it even identifies a device which is not powered up...
|
|
|
|
|
Member 14968771 wrote: I am trying to stay away from "low energy" technology for now. My tip: If you have a choice, not dictated by external requirements (and that's what it sounds like), get into Bluetooth Low Energy as soon as possible. That is where things are happening nowadays. A whole lot of talk about 'Bluetooth' is in fact a short form of 'Bluetooth Low Energy'. Some of the new BLE application areas, such as the fairly new LC3 codec for BLE headphones, is really good, but will probably never be adapted to non-LE Bluetooth (according to a friend who has been actively working with the adaptation to BLE).
Expect any Bluetooth device running on batteries that you cannot reasonably charge every day to use BLE. Non-LE is primarily for stationary and semi-stationary equipment, plus your smartphone. The smartphone talks BLE to most other stuff.
|
|
|
|
|
I am using several code examples
to find local Bluetooth adapters
to "bind " to local Bluetooth adapter
to build "client server"
to start rfcomm server
to scan for and find remote Bluetooth devices
to "bind to serial port" ....
to build "socket"...
to listen or send a message to connected device / adapter
I cannot find a single example how to actually
exchange messages in real connection
at this point a simplex exchange would work
send a message from "local adapter" to "remote device "...
...listen for response from remote device
rinse and repeat...
I am not sure want to get into "client / server / host " discussion.
A simple C/C++ code example would be great.
And if I asked this before or I am in wrong pew (again) - keep your comments to yourself - no need to rub it in.
Cheers
|
|
|
|
|
|
been there , done that
08:31:50: Starting /home/nov25-1/Qt/Nov26/Examples/Qt-5.15.2/bluetooth/build-btchat-Desktop_Qt_5_15_2_GCC_64bit-Debug/btchat...
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.
but it is conceptually sound and usable
if I can get rid of this missing
CAP_NET_ADMI permission
it is hard to concentrate on passing / setting for serial ACSII code when the example is so buggy....
Thanks
|
|
|
|
|
I got the
Missing CAP_NET_ADMIN permission
hacked...
Now if the QT btchat app "finds the remote devices" I'll be a happy camper.
|
|
|
|
|
Member 14968771 wrote: I am not sure want to get into "client / server / host " discussion.
Member 14968771 wrote: keep your comments to yourself - no need to rub it in
Granted. You now have 2 wishes left.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I have two "code examples" about Bluetooth.
One sort of works "scanning for REMOTE DEVICES" , the other wants to "connect" to "REMOTE SERVICE" but fails to do so .
Neither one mentions "pairing"...nowhere in code.
I cannot find a decent description on HOW the code should be sequenced
local adapater - remote "device " - pair - connect ?
Can somebody just answer the following questions?
1. Can I "scan for REMOTE DEVICE " without pairing with local adapter?
(Reference to "RTFM" would actually be appreciated - in this case ONLY )
2. It is my understanding the Bluetooth DEVICE can have SPECIFIC "class of service" , hence
"scanning for (remote ) DEVICE " and "getting the (remote ) DEVICE "class of service " are not the same.
Am I wrong? Yes or no would be sufficient answer.
Please - no reference "go ask somewhere else" or "google it " or "RTFM" ....
Happy festivus....
|
|
|
|
|
Greetings Kind Regards May I please inquire will an appreciable/significant/useful/meaningful overall speed performance difference result comparing two PCs each w/ same version intel i7 same memory size i.e. 16GB same SSD for purpose of software development i.e. compile/link/build durations one w/ DDR3 memory other w/ DDR4 memory Thank You Kindly
|
|
|
|
|
There is only one way to find out.
|
|
|
|
|
Programming tool temporarily running on RAMDISK would benefit from higher bandwidth for file i/o during multi-threaded compiling and have much better random-access latency than SSD. But instead of upgrading RAM, you could buy a better CPU cooler and give it a bit overclock for cores & caches and have better performance in everything, not just compiling.
Because, CPU cache is used well in compiling codes because codes are converted to graphs of commands. Traversing graphs cause a lot of re-used data from memory that is mainly the CPU cache.
|
|
|
|
|
I have one instance set up and working on another computer I did all the same steps (at least I think) to set it up on another computer, it works with CPU detection, but since it's an i3 I am trying to get the GPU detection working I am using an EVGA 1070 and I get this error on the log screen.
Object Detection (YOLO): (General Exception) : CUDA error: an illegal memory access was encountered
I am not sure how to troubleshoot the issue, I cloned the hard-drive from the working machine downloaded the 1070 driver and still received the same error.
I appreciate any help you have to give.
|
|
|
|
|
Hi all,
Soon we will move to a different building with 2 +/- 100 square meters floors.
I want to have a mesh wifi network covering all the house / 2 floors.
That is the topology I am planning:
Second floor ==> Optical fiber ---> ISP ROUTER (working as ONT, configured in bridge mode/single point) ---> Unmanaged SWITCH [2 computers C1 and C2, a printer P1, a MESH ROUTER (alien amplifi, orbi...), a CAT 6 cable to another unmanaged switch at the first floor].
First Floor ==> unmanaged switch [2 computers C3 and C4, a printer P2, a MESH ACCESS POINT].
Questions:
Can we do this?
I mean can we connect the ISP router set in bridge mode to a switch and then connect a few devices AND the MESH ROUTER to that switch?
If one of the devices is a long cable to another switch on the first floor and there, we plug the MESH ACCESS POINT and several other devices...
Would C1 (computer on the second floor) be able to see C4 (computer on the first floor)?
Would the Mesh access point be connected to the MESH router using the physical cable?
Hope all this makes any sense.
Thank you all for your time and help.
|
|
|
|
|
Up front ( follow established rules and READ the post )
I am not sure this question belongs here
and I am getting nowhere in other forums - so please no
"try such and such..."
If you do not know the answer , DO NOT reply, please.
I am using Linux terminal to enter this command
xterm -e bluetoothctl
the result is a "window " where I can double click (anywhere) on selected text (word) and such text - entire word - will highlight.
I like to further process the highlighted text and I am unable to find out HOW .
Since the resulting "window" reacts to the mouse click I am guessing there is a
process resulting in highlighting the entire word.
Please help me to solve this, any help leading to solution will be appreciated.
modified 22-Nov-22 3:42am.
|
|
|
|
|
You'll probably hate me for answering to your post without giving you the answer you want.
But it doesn't exist.
When your application sends out some text on a serial line, going to a teletype or CRT or whatever, it sends that text away. The text on your screen is not the string in your application. It is a copy of a string in your application - a copy that has been sent away.
Imagine yourself sending a letter (in the paper sense) to a friend. This friend picks up his yellow marker to highlight a couple words that you wrote; he might refer to those words when replying to you. You are asking for a way to change the letter you sent him a day or two ago, in the words that your friend highlighted. You can't. The words are no longer under your control.
The xterm highlighting you see is completely independent of your application. xterm is like a remote friend of the application: The text(copy) belongs to xterm, and it is xterm doing the highlighting, completely out of the control of the application. Whatever your xterm wants to do with the highlighted word(s), it can do. Essentially, it can copy the word(s) into a copy/paste buffer and paste it in as part of the input so that you don't have to type it on the keyboard. The application knows nothing about this copy/paste business and sees the paste as if it was typed.
If you want your application to be aware of highlighting done by the user, xterm is not the right tool You will have to write your own X11 client. It may look quite similar to that xterm client at the UI, but it will have a very different interface to your application, not trying to emulate an RS232 connected dumb terminal, the way xterm does.
|
|
|
|
|
Thanks you for such nice contribution to the solution.
I appreciate that.
Your analogy is plausible, however , it does not explain how
clicking on the text highlights it – if it is "gone" / does not exist per your explanation.
It is physically there and mouse click "finds it" and highlights the entire word.
I did not wanted to complicate things in my post, but
I can enter this into terminal
bluetotthctl
and since my terminal code actually runs as a new , separate process , under running C++ application I can
"capture " the stdout. The "problem " is it includes control characters and I really do not want to deal with removing them – BUT I have a code which does it. That is not the issue.
My actually xterm command line includes many options, one of them being "tee" to temporary text file.
I can analyze this temp file, but would prefer to use the existing graphical output to "drag and drop" the highlighted word selection.
|
|
|
|