|
I do not want to abuse my posting privileges here - but
I need another terminology answer
I use hcitool to "scan for nearby Bluetooth devices " .
In my logic - to physically scan remote devices a connection has to be made.
Now Bluetooth devices as such are also "paired " and or "connected ".
To apply my logic - right or wrong - before hcitool can "scan" should it "pair " AND then "connect " FIRST?
Yes , I need to look at the hcitool source code and hopefully it is commented enough to support my logic.
I actually was hoping to find somebody who uses hcitool option "cc" - connect , but I better heed my own suggestion and read the source code first...
cheers
:
|
|
|
|
|
That's easy enough to test. Turn on a bluetooth device. Do not pair or connect, and run a scan. I think you'll find that the scan reports the device presence.
My expectations are:
scan - find any nearby device with bluetooth receiver turned on - may or may not report devices that are paired to other servers and not soliciting for connection
pair - establish a connection to a scanned device that is soliciting for a connection
connected - a pairing has been established and the server can communicate with the device.
Keep Calm and Carry On
|
|
|
|
|
My primary reason for ditching "brand X " Bluetooth API was its lacking of resetting the discovered Bluetooth devices.
I am now using "hcitool scan flush " which does reset the data and then does
real scan.
The "hcitool" command responds with a message "Scanning" and takes up to 30 seconds to finish.
There is yet another issue here - sometime it gets stuck in "scanning" and only reasonable way to recover is to reboot the system...
( The API I am using monitors the scanning time and can be adjusted , I have not look into that , not yet. )
That is silly and unacceptable.
How safe or dangerous would it be to stop and restart the
Linux Bluetooth service itself ?
|
|
|
|
|
Why should that be dangerous? Windows updated here and there was a power failure.
(Do not turn of your machine?)
It just kept working.
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.
|
|
|
|
|
No, the system is still ruining OK so I just switch to "terminal " and run "sudo reboot" - a "short" version of plain reboot.
|
|
|
|
|
Member 14968771 wrote: How safe or dangerous would it be to stop and restart the
Linux Bluetooth service itself ?
It should not affect the running of the Linux system at all. It might leave any connected bluetooth devices "orphaned", I.E. with a connection that the kernel doesn't know about, but I really do not know. You almost certainly can't damage the linux system beyond needing a reboot to get back to where you were, so if I were you I'd try it and see what effect it has. In particular I'd look to see if currently connected devices keep working, and if the stuck process recovers quickly after the restart. I suspect that restarting the service won't affect the stuck hcitool process. It probably has all it needs to do its work, so restarting the bluetooth service won't affect it. You should probably take a look at what hcitool is doing when its stuck - it may be a bug in the process, which you could report to the developer, or it may be due to some bluetooth device not properly implementing the discovery protocols, which leads to problems, or, well, anything!
Keep Calm and Carry On
|
|
|
|
|
All sounds reasonably safe. I am sure you are correct - I should look into how hcitool scan is implemented.
This is something I will never understand - Bluetooth is "implemented " in Linux kernel.
It uses "blueZ" "stack"... "blueZ" source code is "available" in several versions and ALL of them are lacking code comments or function descriptions ... basically a code nobody maintains...
My Linux version runs a "bluetooth manager " and my QT implementation of "blueZ" library interact with this flaky manager - perhaps by using the Linux " blueZ stack "...
That is why I asked "Bluetooth service " ....
BTW
can you tell what the hell is "stack"?
I had some fun in haystack(s) in my youth...
|
|
|
|
|
A "stack" is the set of programs and/or system services needed to supply a given end-user (in this case) service.
As I understand it, for bluez there's
User programs : e.g. hcitool
System software : e.g. whatever system processes are needed to monitor/provide bluetooth services
System libraries : e.g. libbluetooth this provides interfaces for both system and user programs
Kernel module : e.g. bluetooth module, which provides the kernel side implementation details
As you can see, this forms a "stack", with each layer needing services from the layer below it to provide the services it needs to the layer above.
Keep Calm and Carry On
|
|
|
|
|
I am making sure this forum can accept / discuss and resolve "Bluetooth" as DEVICE.
With that let me make a statement:
For many reasons , irrelevant to the following post,
I do not fancy to utilizing "blueZ" library.
And please let us NOT discuss that.
i do prefer to use one of many open or hidden derivatives of "blueZ" library.
End of story.
I am pretty much done using "hcitool" .
Unfortunately "hcitool" has no easy or visible means to "pair" Bluetooth devices.
It looks as "bluetoothctl" can be used to pair.
HOWEVER -
hcitool and bluetoothctl DO NOT use same terminology describing Bluetooth processes.
device became controller
and who knows what is "agent" ?
q5@q5-desktop $ bluetoothctl
Agent registered
[CHG] Controller 00:15:83:15:A2:CB Pairable: yes
[CHG] Controller 00:50:B6:80:4D:5D Pairable: yes
So
the purpose of this post is :
I am open to reasonable suggestion using another - command based and NOT openly derived from "blueZ" tool.
Preferably "related" to C++ - no Python....
Cheers
|
|
|
|
|
Another OS management question.
My impression of RAID 5 is to prevent hardware AKA HDD failure.
The RAID is dynamically updated , hence any unwanted (file ) changes are faithfully replicated.
With that assumption - Would manual backup , not automatic as RAID does, be more productive>?
Then there are tools which can be optioned to do just backup - sort of semi-automatically.
|
|
|
|
|
Member 14968771 wrote: With that assumption - Would manual backup , not automatic as RAID does, be more productive>? It takes time to restore a backup, and all of IT at the coffeemachine, waiting for you. That's expensive.
Member 14968771 wrote: Then there are tools which can be optioned to do just backup - sort of semi-automatically. RAID isn't a form of backup. It's redunancy. And drive may fail, and no user notices. No need to talk backups.
Mine is based on Linux and cheap pendrives. I never backup.
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.
|
|
|
|
|
RAID does not replace the need for a backup.
RAID5 is protects against a SINGLE drive failure. If a second drive fails while a previous drive is still failed or is in the process of rebuilding after replacement, you will lose data.
|
|
|
|
|
Think of RAID as providing long term reliability. A RAID cluster can normally survive at least one drive going bad. A backup, on the other hand, is what you need in the event of anything from "finger trouble" erasing data, or a bug writing bad data, to a critical systems failure, such as a flood or file, from which you need to rebuild your operating environment.
Keep Calm and Carry On
|
|
|
|
|
If the only way to loose your files is a hard disk failure, then you may consider RAID5 to be a "backup" solution (the "backup" being stored in the redundancy bits of the non-crashed disks.
For all other issues - fire, flooding, machine/disk stolen/lost, inadvertent file deletion or content modification, ransom virus, discovering that a virus has infected a lot of your files, ... - you need a decent backup. For a great number of the risks, you also need offline, offside backup. You need frequent backup, at least daily, which implies that you need incremental backup.
And everyone should know The Tao of Backup[^] - Old, but as valid as ever.
|
|
|
|
|
Another OS management question - how to (safely) backup partition.
If I use Linux "gparted" I have to "unmount" the partition first.
How critical it is to "mount" it back to SAME mount point AFTER it is fully copied?
|
|
|
|
|
Hello,
If you want to clone or backup a partition using Gparted then follow the given steps.
Notes:-
a) Target Partition you need to copy/paste is not mounted.
b) For cloning partition, you need to boot PC using GParted Live CD.
1. Download GParted ISO file & burn it to a CD.
2. Boot your PC using that CD.
3. Then it will automatically boot using the GParted Live (Default settings).
4. Now select Don't touch keymap and click OK.
5. Now GParted interface will open and then right-click on the partition you want to backup and select Copy.
6. After that, select the second disk and right-click on it & select Paste option.
Note:- If you are using the unallocated space then GParted will ask you set how much space to use.
Hope it helps. 
|
|
|
|
|
I have modified my original post .
Hope it is OK.
My "grub" identifies a partition ( dev/sde7 ) as bootable.
It attempts to boot, but ends up in "maintenance mode ".
I like to recover SOME of the contents of the partition
but preferably REMOVE the OS.
I have had a very limited success using Linux maintenance / recovery
options and would prefer to remove the OS from the partition.
I am looking at "fdisk".
Is that a right tool to do the above?
|
|
|
|
|
You could try this Hardware and Devices forum. I've moved your post here.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Thank you for helping. It is much appreciated.
|
|
|
|
|
What makes a microprocessor different from a microchip? Is is the ability of a microprocessor to load information into transistors, use it/process it and then reset it`s state so that new information may be loaded and used again. Microchips are just an entity meant to direct information based on a hardcoded algorithm, rather than execute mathematical operations. Is this exact?
|
|
|
|
|
You're comparing apples to oranges.
A "microchip" (nobody uses this term anymore) is any small wafer with a defined electronic functionality, like a microprocessor.
A microprocessor is just a chip with the defined functionality of information transformation and action.
|
|
|
|
|
I may be reading this wrong.. You saying a chip is a microprocessor, and then that a microprocessor is a chip.
May I argue, that in this case and wording, an apple is an orange, because an orange is an apple?
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.
|
|
|
|
|
No, not circular. Layers.
You can't have the processor without it being made out of a chip.
There's tons of other chips out there that are not processors, like arrays of AND gates, and whatnot.
|
|
|
|
|
So a bag of chips makes a processor?
And a chip never a processor, but multiple are.
I'm gonna run and duck before asking if a chip can be a multiprocessor
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.
|
|
|
|
|