You do what I suggested yesterday and implement the bluetooth protocol in your code. The document I gave you the link for gives example code. But if that is not enough you need to study the bluetooth protocol, and Google will find plenty of references for you.
You seem to be struggking with some basic concepts. A device_id is simply an identifier that is returned by the bluetooth driver in the kernel. The kernel code uses this id to acces a specific connection (socket etc.) between devices. So every time you call a library function, you pass it the device_id so the driver code knows which connection you are referring to. I use the analogy of a telphone number, if you pass your telephone number to your mobile service provider, it always knows where to send messages.
If you want to bypass the device_id and use a plain socket (which is conceptually the same thing as described above) then that is fine. But as we keep saying, that means you have to write the code to actually use the bluetooth protocol over the connection that the socket makes with a remote device. Also, Bluetooth does not replace RS232, it is a network protocol that uses the ISO/OSI model.
But ultimately all your questions are asking for more information than there is space for in a forum such as this. The only way to get a good understanding of what you are trying to do (which remains something of a mystery) is to do a lot of research. The internet has hundreds of papers that detail networking in general and the various specific protocols, so that is where you need to go.
The link I gave you three days ago gives some good details (although abridged) on this whole subject. I strongly advise you to study it carefully, as it answers at least most of your questions.
. Also, Bluetooth does not replace RS232, it is a network protocol that uses the ISO/OSI model.
Any protocol that makes a distinction between higher and lower levels can be said to 'use the ISO/OSI model'. Or so it seems. I never saw any protocol with at least some higher/lower distinction (even morse can be said to have a 'higher' layer that is the di and dahs, and a 'lower' layer that is the generating of the carrier wave of the appropriate frequency.
I came into Bluetooth from an OSI angle, and started searching for service definitions according to OSI principles, protocol definitions according to OSI principles, and most important, a separation of these, according to OSI principles.
I started searching for layer independence, so that the same service interface (at each level) could be implemented by alternate lower layer protocols (and lower service interfaces). Nothing like that exists.
I started searching for protocol events and service interface events suitable for building a state machine in agreement with the standard OSI state machines. You'll never find that. The Bluetooth designers have even blurred the event concept: An event is certainly not atomic, but may include several packet exchanges.
Protocol-wise, Bluetooth is one big crow's nest. To quote Ted Nelson: Everything is deeply intertwingled. BT is a world of its own. Sure can be split into levels, just like any other protocol, but using the term 'layers' for these levels doesn't make it OSI. BT service and protocol definitions have no relationship at all to 'true' OSI service/protocol layers.
On my home Linux box I want to shrink my root 1.8 TB partition (ext4). Even unmounted gparted says "1.8 TB minimum size". And the GUI, accordingly, refuses to shrink it.
Googling til the end of elephanting times led me to resize2f2 how dangerous is that, in your experience?
And just trying to wrap my head around it is there "one filesystem size and one partition size?"
I actually want to reinstall the OS, and have poor experiences of upgrading. I have 0.6 TB of data, that I want to copy to a non-boot partition. and do not fancy the idea of buying storage to be used for an hour or two only. So yes I admit I am cheap and lazy, and I will never ever install Linux with such monolithic partitioning.
Thanks : )
"If we don't change direction, we'll end up where we're going"
When you try to resize the filesystem, are you entering numbers in the edit boxes, or using the slider? gparted won't resize the filesystem if the "Free Space Following" box is 0. Using the slider, the Free space following will automatically be filled in as you move the right-hand endpoint.
A quick google search doesn't suggest that there are any issues with resize2fs, and in any case, if you watch the gparted screen, it uses resize2fs to do its work behind the scenes, anyway.
But, as always, when modifying a filesystem, a backup of important data is wise. At the very least, go out and get yourself a USB drive of a suitable size to store your data, and back it up before proceeding. Then you're covered if the worst happens. Or if you just want to start again.
Edit: I'd add that if your drive is more than 3-5 years old you should consider replacing it anyway.
Thanks, I have tried every knob in GUI, including the ones you mention. Typing any high (GB) value into Free Space Following? It just snaps back to some low (MB) value. Seems that "minimum size" really is a minimum.
I will borrow a TBdisk somewhere and try the somewhat promising resize2fs.
"If we don't change direction, we'll end up where we're going"
In case you were wondering the issue was... It seems highly probable that it was LVM [Linux Volume Manager or similar]. This management layer effectively blocks gParted. There are separate tools for LVM.
I guess you could take the view that if it isn't important just overwrite everything.
But if is is important you should have a back up anyways so another drive, just for that reason, makes sense. And then less risky if there is a problem (and you end up needing a complete re-install anyways.)
I have 0.6 TB of data,
And I just checked Amazon and first 1 TB usb drive is only $40 but 4th one down is only $20.
Preface, I am not an expert on ext4 at all. But in general, shrinking a file system is a bit riskier than expanding one, but in practice not much more risky than defragmenting. Still, as mentioned, if your data is important, it should be backed up. If it's not, then the next time you install Linux consider having a separate partition for your user files that will remain if even if you wipe the OS one for a reinstall.
No, but to recover that partition if it gets destroyed would need a backup/restore application that is self bootable. Hence the Google search I posted; you will need to check the various products to see if this feature is available.
I do not need to backup my data, but I like to have a backup of my OS.
First question you have to ask yourself is why?
If you're keen to be able to get your system going again after a crash, it can be done. But literally every last thing you do not in userland will need a new backup if you so much as sneeze. If it's a new system, the backup is useless (for the most part). If it's the same system, this is exactly what disk mirroring with RAID was created for. No reason to reinvent the wheel.
That being said, tar was made for this sorta thing. Just don't go backing up /dev and /proc. You can backup /tmp, but it's pointless.
But, you'd be much better of just creating a post-install shell script to recover from a crash with maybe a /etc tarball.
Installed a second NAS-class disk in my home server, replacing a motley assortment of consumer grade drives, one of which died recently. RAID resync is almost complete
Another useful tip:
I set up a cron job to do a "dpkg -l" and a "snap list" to a user-space file, which is then included in my daily user backups.
So if I need to rebuild or replace a machine, I don't have to remember all the packages I've downloaded over time.
A quick file comparison tells me what I missed. (Meld is my weapon of choice, btw.)
As well as user space all over, I also back up /etc and /var from the server.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
Last Visit: 31-Dec-99 19:00 Last Update: 7-Dec-23 13:52