|
I am looking for help to implement / test rfcomm - on Ubuntu Description: Ubuntu 22.04.4 LTS
When I type
rfcomm -a
I get this response
nov25-1@nov251-desktop:~$ rfcomm --a
nov25-1@nov251-desktop:~$
When I type
rfcomm -h
I get this
nov25-1@nov251-desktop:~$ rfcomm --h
RFCOMM configuration utility ver 5.64
Usage:
rfcomm [options] <command> <dev>
Options:
-i, --device [hciX|bdaddr] Local HCI device or BD Address
-h, --help Display help
-r, --raw Switch TTY into raw mode
-A, --auth Enable authentication
-E, --encrypt Enable encryption
-S, --secure Secure connection
-C, --central Become the central of a piconet
-L, --linger [seconds] Set linger timeout
-a Show all devices (default)
Commands:
bind <dev> <bdaddr> [channel] Bind device
release <dev> Release device
show <dev> Show device
connect <dev> <bdaddr> [channel] Connect device
listen <dev> [channel [cmd]] Listen
watch <dev> [channel [cmd]] Watch
nov25-1@nov251-desktop:~$
I am using this link
Ubuntu Manpage: rfcomm - RFCOMM configuration utility[^]
Any help would be greatly appreciated
Thanks
|
|
|
|
|
Salvatore Terress wrote: rfcomm --a
That has two dashes.
|
|
|
|
|
Make no differece - two -- or one - and
what does
"default" do ?
should then
rfcomm == rfcomm -a
|
|
|
|
|
Which devices have you configured?
If you haven't configured any, what would you expect when asking for a list of configured devices?
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
I am not blaming on anybody, but on MYSELF
there is no English command in rfcomm man
to "configure"
however there is "bind" which to me means something likes " to associate (with) "
so one has to guess to at least select "device" and optionally more...
actually to go back to Unix - "no response / no reply is SUCCESS"
so when
"rfcomm" - used as default, no options specified, and returns NOTHING is really telling NOTHING
Lesson learn - case closed
|
|
|
|
|
Are you sure that you know enough about Bluetooth to handle it?
I mean, treating "bind" as some new, unknown concept suggests that you do not know the first thing about Bluetooth. You will not be able to configure a device that you you don't have the slightest clue about.
First thing in configuring a Bluetooth device is to learn what Bluetooth is, and its architecture.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
Well according to rfcomm you do not have any devices configured.
|
|
|
|
|
Yeah they over-abbreviated the command. Should have spelled it rt fm comm.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
<a href="https://man7.org/linux/man-pages/man3/system.3.html">system(3) - Linux manual page</a>[<a href="https://man7.org/linux/man-pages/man3/system.3.html" target="_blank" title="New Window">^</a>]
This is somewhat a dupe, so if it bothers you...( I am not allowed to give instructions ...)
I am asking for generic / general help in capturing Linux command output.
I am going to use this as an example:
system("hcitool dev | cut -sf3 ");
I know what is does - that is NOT of my concern..
I can see the result in (Qt) console...
I do not know HOW - what "hidden" code (std??) put
the actual result of the call onto console
and
how can I redirect such call for my purpose ?
I did RTFM for "system" and found NO references , or missed them,
on how to capture THE actual output of the command.
that said - what would be SUCCESSFUL phrase to ask Mrs Google to
give me a general Linux resource ( text book ?) to cover
"standard output / input / error "
and
how to figure out if the command uses
"standard output / input / error "
and how to access it in C/C++
..all this just for learning purpose
CHEERS
THANks
|
|
|
|
|
|
I have reached another dead end in my Bluetooth programming...
without getting into details - task works fine when performed in Linux terminal
, but fails to connect when run in C++ code.
After RTFM I found
"the error source" in "bluez " library, burred in few layers of undocumented code ...
So I am going back to "level" where I can control the
usage of "bluez" library...
That means to go back to
https://people.csail.mit.edu/albert/bluez-intro/c404.html[^]
My question
to the forum -
is there a C++ version of the above?
( I asked Mrs Google...)
Yes, the foundation would still be "bluez" library...but if I can
manage to convert the above to C++ it my be "some " progress.
Thanks very much for any constructive help.
|
|
|
|
|
|
Yes, exactly what I was looking for. Thanks.
Actually it has "d-bus" code I need to try to "up code" ,
try a differ approach to Bluetooth coding.
|
|
|
|
|
I have done the individual analysis on my data , now I m trying to run 3dDeconvolve code but it does not work at all. I dont know what is wrong.
|
|
|
|
|
Sevinc Bayar wrote: I dont know what is wrong. It is unlikely that anyone here could guess.
|
|
|
|
|
Nobody is going to be able to help you because you haven't shown the code you've written that has the problem nor even described a problem! Just showing up to a forum and saying "it doesn't work" is a complete waste of your time.
|
|
|
|
|
Also not sure why it is a Linux (this forum problem.)
If anyone else is curious about what it is even about. From National Institutes of Health (pdf).
"Program 3dDeconvolve was developed to provide deconvolution analysis of FMRI time series data."
Found with following google search
what is 3dDeconvolve
|
|
|
|
|
Offhand, I'd guess ther's an error in the code or the keyboard
CQ de W5ALT
Walt Fair, Jr.PhD P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
I am using hcitool to identify local , attached to my PC via USB
Bluetooth adapters.
The actual command is "hcitool dev".
Most of the time I receive hci0 plus address.
Recently I started getting hci1.
If I attach two adapters
I receive
hci0
hcix
where hcix keeps increasing ( the x ) with each, same , hcitool dev command.
I am looking for way to keep the hci0 as hci0.
Thanks very much for your help, it is appreciated very much
|
|
|
|
|
You might want to research your assumptions.
You are assuming that hcitool controls that. Versus just reporting on what is there.
If there is a way to return other attributes you might be able to identify it that way.
I have not worked with this protocol but I have worked with many others so I suggest that you do not assume that your testing by itself will return all possibilities. A general solution might either be coded only to support limited scenarios (those tested) or must provide a way to monitor/report when it is not found, what is found, and potentially a way to configure/add more info to a running app.
|
|
|
|
|
Simple , but Mrs Google gives " where space is "....and not "whereis"....
|
|
|
|
|
|
You can put double quotes around word/phrase in google to force it.
Salvatore Terress wrote: "whereis" recursively
I doubt that makes any sense. Whereis already recurses via something (execution path?).
Googling shows options for whereis that allows one to limit the search but not expand it.
|
|
|
|
|
The linux command whereis has no recursive invocation. From the man page:
Quote: whereis locates the binary, source and manual files for the specified command names. The supplied names are first
stripped of leading pathname components. Prefixes of s. resulting from use of source code control are also dealt with.
whereis then attempts to locate the desired program in the standard Linux places, and in the places specified by $PATH
and $MANPATH.
Maybe you're thinking more of find , which searches given directories for a file matching a pattern? e.g. find $HOME -name 'mumble*.cpp' . Or maybe locate which will find files anywhere on the system that you have access to (i.e. the results for user1 may be different from user2, and both may be different from root)
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown
|
|
|
|
|
This is NOT problem / does not requires code / details and answer.
Basic statement
"bluez" (library) is part of the Linux kernel.
Academic question:
what is the basic / fundamental access of Bluetooth to Linux kernel ?
Is bypassing "bluez / hci " the way ?
"bluez" library uses "hci" "commands" , other GUI applications / commands are "free to utilize bluez" ....
For example - Qt uses "bluez" but have no means to actually reset Bluetooth devices - it will access devices no longer near system....
so do other application(s) .
|
|
|
|