I am assuming it is a Serial Port Profile (SPP) connection that you are trying to establish between the two machines. The Linux Bluetooth stack uses BlueZ which has an API for setting up classic Profiles such as SPP. This is documented at:
This has the option to set ...
I have tested the Python code you posted in your question on my system and it also didn't work.
Looking at it more closely, and running some experiments, I noticed that you were not making the server discoverable so I added the following lines to make it discoverable if it was not already:
adapter = dbus.Interface(bus.get_object('org.bluez',
This answer only relates to the UUID question in the comments. See section 5.1 in
https://github.com/petzval/btferret documentation for a discussion of serial UUIDs. The specification of a service as a serial RFCOMM channel is in the aid=0004 SDP entry rather than the UUID, so any number can be used as the UUID. However, by convention serial services have ...
This should work:
simulate this circuit – Schematic created using CircuitLab
The value of R1 is X Ohms. The value of X depends on the input voltage you use, and may be calculated as follows:
R1 = ( Vin - 3.3 ) / 10 mA
if Vin = 6V: R1 = ( 6 - 3.3 ) / .01A = 270 Ohms;
or if you want to use 5mA for the Zener current:
R1 = ( 6 - 3.3 ) / .005 ...
Try checking /sys/class/udc/<udc>/state:
Indicates current state of the USB Device Controller. Valid
states are: 'not-attached', 'attached', 'powered',
'reconnecting', 'unauthenticated', 'default', 'addressed',
'configured', and 'suspended'; however not all USB Device
Controllers support reporting all states.
Apparently, this only changes to ...