+ 2

What is the localhost address of Bluetooth protocol?

I am diving into a project that will require bluetooth socket connectivity . I don't have two separate computers currently so I am bound to test both server code and client code in my local system (same machine) before final implementation. So as we all know that the localhost address in IPv4 is 127.0.0.1 , what is the localhost address in case of bluetooth ? I am very much confused what address I should provide in the bluetooth client side to start the very first inspection of how things are going? Thanks...

1st Apr 2023, 10:24 AM
CoderBittu
CoderBittu - avatar
17 Answers
+ 2
Oh, I reread your question more carefully and I think I understand your problem. Without a second pc, how are you going to test your server/client codes through Bluetooth? Maybe pair it with your phone? But how to read the data?
1st Apr 2023, 11:34 AM
Bob_Li
Bob_Li - avatar
+ 2
[B.S.] BITTU This was the tutorial I was following when I was learning about Arduino and AppInventor. Maybe you could use it as a starting point. You could test your server code by using it instead of the Arduino IDE terminal. https://m.youtube.com/watch?v=TlQv4tZm0bY
2nd Apr 2023, 2:25 PM
Bob_Li
Bob_Li - avatar
+ 2
Bob_Li Great Idea! Could it be used with ESP32 or ESP12 ? cuz, I think that ESPs have better and more versatile Bluetooth Modules pre-installed in them.
2nd Apr 2023, 2:26 PM
CoderBittu
CoderBittu - avatar
+ 2
Bob_Li I know but, I have always wanted to go deeper upto hardwares of everything. So...
2nd Apr 2023, 2:40 PM
CoderBittu
CoderBittu - avatar
+ 1
Bob_Li so, the device bluetooth address itself is the local bluetooth address unlike the IPv4 ?
1st Apr 2023, 10:45 AM
CoderBittu
CoderBittu - avatar
+ 1
https://stackoverflow.com/questions/69473896/how-do-i-format-an-bluetooth-address-as-a-btaddr my experience w/hardware interfacing is very limited, but these are the links that seemed useful
1st Apr 2023, 10:51 AM
Bob_Li
Bob_Li - avatar
+ 1
From what I've read so far, I don't think this is possible because you will need different address for each.
1st Apr 2023, 12:16 PM
Bob_Li
Bob_Li - avatar
+ 1
OK
1st Apr 2023, 12:17 PM
CoderBittu
CoderBittu - avatar
+ 1
probably. But wiring it is a lot of work. Easier to just communicate with the phone. No hardware to worry about.
2nd Apr 2023, 2:27 PM
Bob_Li
Bob_Li - avatar
+ 1
[B.S.] BITTU Maybe you didn't even have to code your own server to communicate over Bluetooth. You could just use the Arduino terminal or others like it. https://learn.sparkfun.com/tutorials/terminal-basics/command-line-windows-mac-linux
2nd Apr 2023, 2:38 PM
Bob_Li
Bob_Li - avatar
+ 1
yeah, that is fun and challenging. 😎
2nd Apr 2023, 2:42 PM
Bob_Li
Bob_Li - avatar
+ 1
Bob_Li yeah 😎
2nd Apr 2023, 2:42 PM
CoderBittu
CoderBittu - avatar
0
Bob_Li although the link you provided is really useful, but my answer still remains unanswered that , should I put my computer's same bluetooth address in client to start a local socket operation?
1st Apr 2023, 10:55 AM
CoderBittu
CoderBittu - avatar
0
Bob_Li isn't connection between server and client on same machine using bluetooth protocol possible? I have done server client communication on same machine in wifi TCP protocol where I always used to put "127.0.0.1" in client to connect to local machine.
1st Apr 2023, 12:08 PM
CoderBittu
CoderBittu - avatar