|
I do not get the symbol "->" .
I am trying to have serial port "ttyUSB0 " linked with rfcomm0.
Which command is correct ?
nov25-1@nov251-desktop:~$ sudo ln -s -v /dev/ttyUSB0 /dev/rfcomm0
[sudo] password for nov25-1:
'/dev/rfcomm0' -> '/dev/ttyUSB0'
nov25-1@nov251-desktop:~$ sudo ln -s -v /dev/rfcomm0 /dev/ttyUSB0
'/dev/ttyUSB0' -> '/dev/rfcomm0'
nov25-1@nov251-desktop:~$
|
|
|
|
|
It shows that the device name on the left is a link to the actual device named on the right. So when you send any data to /dev/rfcomm0 it will actually go to the device at /dev/ttyUSB0 .
|
|
|
|
|
Thanks,
would it make more sense , more generic, to say "data sent to device on the LEFT will get passed to device on the RIGHT" of the "->" (symbol ) ?
Now for the follow-up question - more (confusing_) Linux terminology.
physical, hard , symbolic ??
hence
" which way's up " ?
what would be the purpose of "symbolic" link ?
if there is no -s option , is the link "hard" ?
is "hard" == "physical" ?
-P, --physical
make hard links directly to symbolic links
-s, --symbolic
make symbolic links instead of hard links
Cheers
|
|
|
|
|
jana_hus wrote: would it make more sense , more generic, to say "data sent to device on the LEFT will get passed to device on the RIGHT" of the "->" (symbol ) ? Not really as the name on the left is just a node in the /dev directory tree, not an actual device. The link just associates one name with another. I have not looked at this for some time, but I think they are hard links. They are actually set up by the kernel when the system is initialised at boot time, based on the connected devices.
|
|
|
|
|
Way back, the UNIX filesystem only supported a physical link. So a directory entry might have been
struct dirent {
unsigned long d_ino;
char d_name[30];
}; So if your directory contained
8539501 foo
8539502 bar
8539503 baz
8539502 paw Then it should be clear that the files bar, inode=8539502 and paw inode=8539502 are the same file, i.e a Physical (or hard) link. If you list the directory you'll see something like
[k5054@azure foo]$ ls -li
total 0
8539502 -rw-r--r-- 2 k5054 k5064 0 Oct 13 06:31 bar
8539503 -rw-r--r-- 1 k5054 k5064 0 Oct 13 06:31 baz
8539501-rw-r--r-- 1 k5054 k5064 0 Oct 13 06:31 foo
8530502 -rw-r--r-- 2 k5054 k5064 0 Oct 13 06:31 paw The -i flag to ls add the inode, and so we can see bar and paw have the same inode (8359502). Also, column 3 shows the number of physical links to the inode, which for bar and paw are 2, but foo and baz are only one. Note that a hard link doesn't need to reside in the same directory, you can for example do something like
ln foo/bar/baz ping/pong/paw , which will create the physical link. There are 2 restrictions to hard links: 1) you can't create a hard link between directories, and 2) you can't create hard links across file systems. Symbolic (soft) links solve both these problems. In the case of a soft link, the link can be thought of as a reference. If we take the above directory and create a soft link between foo and bang via
ln -s foo bang</pre> we now get: <pre>k5054@azure foo]$ ls -li<br />
total 4<br />
8539536 lrwxrwxrwx 1 k5054 k5064 3 Oct 13 06:48 bang -> foo<br />
8539502 -rw-r--r-- 2 k5054 k5064 0 Oct 13 06:31 bar<br />
8539503 -rw-r--r-- 1 k5054 k5064 0 Oct 13 06:31 baz<br />
8539501 -rw-r--r-- 1 k5054 k5064 0 Oct 13 06:31 foo<br />
8539502 -rw-r--r-- 2 k5054 k5064 0 Oct 13 06:31 paw</pre> This shows that the file <code>bang is a symbolic link (file type "l") which points to "foo". Now "bang" acts as a pointer or an indirection. In order to get to the contents of <bang>, the OS has to open bang, read its contents and then open the file pointed to by the contents. Also, note that the size of bang is 3, ie "foo". Since we now have this indirection, we can link to files in other filesystems, and we can also create links to other directories. You're also not limited to only one indirection. A soft link can point to another soft link, to another soft link, etc.
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown
|
|
|
|
|
Thanks, it is getting more "convoluted"...
Allow me to start over.
The task is to "send (serial) data to /dev/ttyUSB0 and pass the same data to /dev/rfcomm0 ".
Calling "/dev/ttyUSB0 " a node or device SHOULD be "technicality" - the task is still the same.
However,
the "link" option - "symbolic" or "hard /[physical " SHOULD make a difference as far as the task goes.
My , probably incorrect, interpretation is:
"symbolic" still accomplishes the task, but introduces another "intermediate process" - "pointer" etc.
"hard / physical " accomplishes the task directly
I do appreciate this discussion, very much, thank you.
|
|
|
|
|
EDIT
Edited title.
<a href="https://github.com/orgs/bluez/discussions/categories/q-a">bluez Q A · Discussions · GitHub</a>[<a href="https://github.com/orgs/bluez/discussions/categories/q-a" target="_blank" title="New Window">^</a>]
This one is dead...
For all those OF's who recall the popular TV "quiz" show...
<b>I am looking for a way to identify - in Linux / <b>Ubuntu open source</b>
SPECIFICALLY
1) what database is used to keep track of result of
"scanning for remote Bluetooth device "
2) what database , if any, keeps track of recently used and valid ID # / authorization #</b>
I am NOT seeking the actual link / reference , I am asking for
current / actually copy of "bluez" library as adopted by Linux.
I am NOT asking for various implementation of " bluez" - such as "hci" etc.
I am NOT asking where to find "bluez" source code - there are plenty of copies of SAME, undocumented and UNSUPPORTED
of "bluez" library on many github files...
I know about flaky Python Bluetooth app -- no reference needed.
Just point me to REAL / USED / CURRENT (Aug 2024) "copy" of "bluez" - that is all I am asking.
as in Ubuntu packages for example..
( If I knew how to do that , I would not ask ---duh...) -
Thank you
|
|
|
|
|
jana_hus wrote: Just point me to REAL / USED / CURREN This is a job for Google, Bing, Duck Duck Go ...
|
|
|
|
|
You have forgotten the StartPage man........
As an answer to OPs question, this should help. First result especially.
|
|
|
|
|
Yes, but you need to tell the person who wants the answer.
|
|
|
|
|
jana_hus wrote: library as adopted by Linux.
To start with that means nothing.
It is like asking someone to provide instructions on how to replace the alternator for a 'truck'.
The name 'linux' is generic. There are many vendor builds (using 'vendor' very loosely.)
Of those each has a build. Where the build stipulates the code that is included in the binary that represents the version of linux that is actually installed.
Except of course the installer might install different parts also.
And on top of that then other installer might change stuff as well.
Somewhere there is a linux command that can tell you what version is installed on whatever you are looking at.
After you identify that then you can start looking for the code that corresponds to that.
It will probably be one of those github repos.
jana_hus wrote: there are plenty of copies of SAME, undocumented and UNSUPPORTED
of "bluez" library on many github files...
And presumably you think you are going to find one that is much 'better' than those. Good luck with that.
|
|
|
|
|
Thanks, appreciate the reply. I think I did not express what I am after - he usual " my fault".
( But I do appreciate you did no dwell on that...)
I will try to correct that.
The "bluez" library "advertisement " states it has been adopted by Linux.
It is part of Linux kernel.
That is the basic.
My question / search is HOW to access / find the actual source code of
"bluez" library / package in Ubuntu .
Something like
open file directory xyz
open file which contains the "bluez" package
I know where / how to get "bluez" source coder in github,
I am after its residence in Ubuntu.
|
|
|
|
|
|
I like to discuss this with somebody.
I am using "systemctl" to control / verify that bluetooth service is actually running.
Works so, so.
The "problem" is AFTER I reboot the Ubuntu "bluetooth setting" - located on very right
top of the desktop - ALWAYS shows "Bluetooth off".
I cannot restart bluetooth using this "setting" - it does not react at all to "Bluetooth on".
I am puzzled why I need to use "systemctl start bluetooth" get the service running.
My code DOES not stops the service - only verifies it is running.
Thanks
|
|
|
|
|
Check to see if bluetooth is enabled systemctl is-enabled bluetooth.service . If it is enabled, you'll need to dig into the logs to figure out why its not coming up. If it is disabled, then as root: systemctl enable --now bluetooth.service which will tell systemd that it should start the bluetooth service on boot. The --now flag is optional and will start the given service immediately. Without it, you will either have to start the service manually (systemctl start bluetooth.service ) or reboot the system. It's probably a good idea to reboot the system as soon as you may after enabling the service, just to check it is coming up OK, or debug why it isn't.
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown
|
|
|
|
|
Thank you, you have nailed it...I assume some of my "safety code" accidentally disabled the service.
Or maybe I should blame it on bad weather, or somebody else , as is customary.
What was a real challenge - navigate thru all " why are you doing that?... post detail error
...post your (formatted ) code...you have asked this before...I do not know the answwr, but L like...
I am really hesitant to ask questions on this forum, I always get flamed....
Anyway, thanks for you help, much appreciated.
|
|
|
|
|
Hello,
I'm encountering an issue when running the daos cont create command on my DAOS setup. The command fails with a "Transport layer mercury error." Below are the details of the error and my setup:
Command and Error Message:
[root@client2 ~]# daos cont create tank --label mycont
external ERR # [5323.920594] mercury->msg: [error] /builddir/build/BUILD/mercury-2.1.0rc4/src/na/na_ofi.c:3047
# na_ofi_msg_send(): fi_tsend() failed, rc: -2 (No such file or directory)
external ERR # [5323.921055] mercury->hg: [error] /builddir/build/BUILD/mercury-2.1.0rc4/src/mercury_core.c:2727
# hg_core_forward_na(): Could not post send for input buffer (NA_NOENTRY)
hg ERR src/cart/crt_hg.c:1104 crt_hg_req_send_cb(0x2a5c8c0) [opc=0x1020004 (DAOS) rpcid=0x18ea69b600000000 rank:tag=0 ] RPC failed; rc: DER_HG(-1020): 'Transport layer mercury error'
mgmt ERR src/mgmt/cli_mgmt.c:882 dc_mgmt_pool_find() tank: failed to get PS replicas from 1 servers, DER_HG(-1020): 'Transport layer mercury error'
pool ERR src/pool/cli.c:198 dc_pool_choose_svc_rank() 00000000:tank: dc_mgmt_pool_find() failed, DER_HG(-1020): 'Transport layer mercury error'
pool ERR src/pool/cli.c:503 dc_pool_connect_internal() 00000000:tank: cannot find pool service: DER_HG(-1020): 'Transport layer mercury error'
ERROR: daos: DER_HG(-1020): Transport layer mercury error
Environment Details:
DAOS Version: daos-2.0.3-5.el7.x86_64
DAOS Client Version: daos-client-2.0.3-5.el7.x86_64
Libfabric Version: libfabric-1.15.1-1.el7.x86_64
Mercury Version: mercury-2.1.0~rc4-9.el7.x86_64
CentOS Version: CentOS 7.9
Fabric Interface: enp0s3
Additional Information:
[root@server ~]# ip addr
1: lo: <loopback,up,lower_up> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <broadcast,multicast,up,lower_up> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:bd:95:c2 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global noprefixroute dynamic enp0s3
valid_lft 564sec preferred_lft 564sec
inet6 fe80::e25:a2fd:9904:a8ac/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: enp0s8: <broadcast,multicast,up,lower_up> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:bb:cb:4d brd ff:ff:ff:ff:ff:ff
inet 192.168.56.104/24 brd 192.168.56.255 scope global noprefixroute dynamic enp0s8
valid_lft 370sec preferred_lft 370sec
inet6 fe80::8d85:5b39:5f73:6e0b/64 scope link noprefixroute
valid_lft forever preferred_lft forever
I have also mentioned the DAOS server, client, and agent configuration files for reference.
DAOS Server
## default: daos_server
name: daos_server
#
#
## Access points
## Immutable after running "dmg storage format".
#
## To operate, DAOS will need a quorum of access point nodes to be available.
## Must have the same value for all agents and servers in a system.
## Hosts can be specified with or without port. The default port that is set
## up in port: will be used if a port is not specified here.
#
## default: hostname of this node
access_points: ['10.0.2.15']
#
#
## Default control plane port
#
## Port number to bind daos_server to. This will also be used when connecting
## to access points, unless a port is specified in access_points:
#
## default: 10001
port: 10001
#
#
## Transport credentials specifying certificates to secure communications
#
transport_config:
# # In order to disable transport security, uncomment and set allow_insecure
# # to true. Not recommended for production configurations.
allow_insecure: true
#
# # Location where daos_server will look for Client certificates
client_cert_dir: /etc/daos/certs/clients
# # Custom CA Root certificate for generated certs
ca_cert: /etc/daos/certs/daosCA.crt
# # Server certificate for use in TLS handshakes
cert: /etc/daos/certs/server.crt
# # Key portion of Server Certificate
key: /etc/daos/certs/server.key
provider: ofi+sockets
socket_dir: /var/run/daos_server
nr_hugepages: 4096
control_log_mask: DEBUG
control_log_file: /tmp/daos_server.log
helper_log_file: /tmp/daos_admin.log
engines:
-
targets: 8
nr_xs_helpers: 0
fabric_iface: enp0s3
fabric_iface_port: 31316
log_mask: INFO
log_file: /tmp/daos_engine_0.log
env_vars:
- CRT_TIMEOUT=30
scm_mount: /mnt/daos0
scm_class: ram
scm_size: 8
DAOS Control file
# default: daos_server
name: daos_server
# Default destination port to use when connecting to hosts in the hostlist.
# default: 10001
port: 10001
# Hostlist, a comma separated list of addresses (hostnames or IPv4 addresses).
# default: ['localhost']
hostlist: ['10.0.2.15']
## Transport Credentials Specifying certificates to secure communications
transport_config:
# # In order to disable transport security, uncomment and set allow_insecure
# # to true. Not recommended for production configurations.
allow_insecure: true
#
# # Custom CA Root certificate for generated certs
ca_cert: /etc/daos/certs/daosCA.crt
# # Admin certificate for use in TLS handshakes
cert: /etc/daos/certs/admin.crt
# # Key portion of Admin Certificate
key: /etc/daos/certs/admin.key
DAOS Agent file
# default: daos_server
name: daos_server
# Management server access points
# Must have the same value for all agents and servers in a system.
# default: hostname of this node
access_points: ['10.0.2.15']
# Force different port number to connect to access points.
# default: 10001
port: 10001
## Transport Credentials Specifying certificates to secure communications
#
transport_config:
# # In order to disable transport security, uncomment and set allow_insecure
# # to true. Not recommended for production configurations.
allow_insecure: true
#
# # Custom CA Root certificate for generated certs
ca_cert: /etc/daos/certs/daosCA.crt
# # Agent certificate for use in TLS handshakes
cert: /etc/daos/certs/agent.crt
# # Key portion of Agent Certificate
key: /etc/daos/certs/agent.key
# Use the given directory for creating unix domain sockets
#
# NOTE: Do not change this when running under systemd control. If it needs to
# be changed, then make sure that it matches the RuntimeDirectory setting
# in /usr/lib/systemd/system/daos_agent.service
#
# default: /var/run/daos_agent
#runtime_dir: /var/run/daos_agent
# Full path and name of the DAOS agent logfile.
# default: /tmp/daos_agent.log
log_file: /tmp/daos_agent.log
# Manually define the fabric interfaces and domains to be used by the agent,
# organized by NUMA node.
# If not defined, the agent will automatically detect all fabric interfaces and
# select appropriate ones based on the server preferences.
#
#fabric_ifaces:
#-
# numa_node: 0
# devices:
# -
# iface: ib0
# domain: mlx5_0
# -
# iface: ib1
# domain: mlx5_1
#-
# numa_node: 1
# devices:
# -
# iface: ib2
# domain: mlx5_2
# -
# iface: ib3
# domain: mlx5_3
Any assistance or insights into resolving this issue would be greatly appreciated. Thank you!
|
|
|
|
|
I don't know anything about DAOS so I can't comment on that. Have you had this working in the past and it stopped working, or are you trying to get it running now? Either way, CentOS 7 was initially released in 2014, and goes EOL at the end of the month. What you might be seeing is that C7 doesn't support the infrastructure needed for DAOS.
This would probably be better answered in a forum dedicated to DAOS.
In any case, given the short support lifetime of C7, I'd recommend you consider moving to something more recent, like CentOS 9 or one of the other RHEL 9 based distros. I hear good things about Rocky Linux. Or move to Ubuntu or Debian.
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown
|
|
|
|
|
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.
|
|
|
|
|