Click here to Skip to main content
14,427,367 members

Hosting and Servers

 
PinnedWelcome to the Hosting and Server Forum PinPopular
Chris Maunder20-Jan-11 12:16
cofounderChris Maunder20-Jan-11 12:16 
QuestionHelp me to understand "hosts" file and socket communication via bluetooth Pin
Vaclav_29-Dec-19 8:54
MemberVaclav_29-Dec-19 8:54 
I have read several tutorials how to manipulate (Linux) "hosts" file.

I need to "connect" Raspberry Pi to PC , using bluetooth.
I really do not care which is server or client end of the connection.

I like to test each piece of hardware by doing local loopback first.
I would like to run such local loopback on each end of the connection separately , using separate code application. I do have the basic - socket / bind / read / write working.


I understand that local "loopback" IP is in range 127.0.0.0 to 127.255.255.255.

1. Can I "bind" created socket to name "localhost" to run such local loopback - using 32 bit address?
2. How can I do same using 128 bit address, ip6 protocol ? AKA how to put ip6 "name" into my C++ code ? ::1 has "multiple" names
3. Is doing "remote loopback" feasible?
Ideally - instruct LOCAL hardware to connect via socket to REMOTE hardware running in "remote loopback"? Or in another words - is there REMOTE loopback IP ? Or do I have to have remote software to emulate such loopback?

4. The communication / socket from (local) RPi woudl "connect / bind " to which IP on remote (PC) hardware?
5. Similar - the communication / socket from (local) PC woudl bind to which IP on now remote - RPi hardware?

Item 5 and 6 would be in "simplex" communication - each one way only - at least for now.

I have not found a decent description of ip6 "names" .
For example -what does ip6-allnodes accomplish ?

Here is a copy of RPi hosts file

127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.1.1       ARM
10.0.1.76       RPI


And here is hosts file on PC

127.0.0.1       localhost
127.0.1.1       z-desktop

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


Minor comments / questions
The RPi has only ONE bluetooth hardware , but in hosts it has TWO IP addresses / names
The PC has THREE bluetooth hardware, but blutooth manager will identify only TWO.

Appreciate any constructive comments.
AnswerRe: Help me to understand "hosts" file and socket communication via bluetooth Pin
Richard MacCutchan30-Dec-19 1:18
communityengineerRichard MacCutchan30-Dec-19 1:18 
GeneralRe: Help me to understand "hosts" file and socket communication via bluetooth Pin
Vaclav_30-Dec-19 8:09
MemberVaclav_30-Dec-19 8:09 
GeneralRe: Help me to understand "hosts" file and socket communication via bluetooth Pin
Vaclav_1-Jan-20 6:07
MemberVaclav_1-Jan-20 6:07 
GeneralRe: Help me to understand "hosts" file and socket communication via bluetooth Pin
Richard MacCutchan1-Jan-20 6:22
communityengineerRichard MacCutchan1-Jan-20 6:22 
GeneralRe: Help me to understand "hosts" file and socket communication via bluetooth Pin
Vaclav_1-Jan-20 7:29
MemberVaclav_1-Jan-20 7:29 
GeneralRe: Help me to understand "hosts" file and socket communication via bluetooth Pin
Vaclav_2-Jan-20 5:04
MemberVaclav_2-Jan-20 5:04 
GeneralRe: Help me to understand "hosts" file and socket communication via bluetooth Pin
Richard MacCutchan2-Jan-20 5:45
communityengineerRichard MacCutchan2-Jan-20 5:45 
GeneralRe: Help me to understand "hosts" file and socket communication via bluetooth Pin
Vaclav_2-Jan-20 7:22
MemberVaclav_2-Jan-20 7:22 
GeneralRe: Help me to understand "hosts" file and socket communication via bluetooth Pin
Richard MacCutchan2-Jan-20 7:35
communityengineerRichard MacCutchan2-Jan-20 7:35 
GeneralRe: Help me to understand "hosts" file and socket communication via bluetooth Pin
Vaclav_2-Jan-20 7:52
MemberVaclav_2-Jan-20 7:52 
QuestionMessage Closed Pin
27-Dec-19 23:55
MemberMember 1452946027-Dec-19 23:55 
QuestionMessage Closed Pin
18-Dec-19 23:43
Memberemyliauk618-Dec-19 23:43 
QuestionRemove a folder from TFS after it is checked into TFS Server Pin
simpledeveloper18-Dec-19 8:52
Membersimpledeveloper18-Dec-19 8:52 
AnswerRe: Remove a folder from TFS after it is checked into TFS Server Pin
Richard MacCutchan18-Dec-19 22:54
communityengineerRichard MacCutchan18-Dec-19 22:54 
QuestionMessage Closed Pin
6-Dec-19 23:39
Memberappleau86-Dec-19 23:39 
Questionhost host a php application in windows system Pin
BhavaniSri6-Nov-19 3:07
MemberBhavaniSri6-Nov-19 3:07 
AnswerRe: host host a php application in windows system Pin
jkirkerx7-Nov-19 10:34
professionaljkirkerx7-Nov-19 10:34 
QuestionSuggest Me Cloud Hosting For Our Website Pin
raja asad amin11-Oct-19 4:19
professionalraja asad amin11-Oct-19 4:19 
AnswerRe: Suggest Me Cloud Hosting For Our Website Pin
jkirkerx7-Nov-19 11:05
professionaljkirkerx7-Nov-19 11:05 
GeneralMessage Closed Pin
6-Jan-20 1:14
MembereWebGuru_web hosting6-Jan-20 1:14 
AnswerRe: Suggest Me Cloud Hosting For Our Website Pin
Khalequzzaman8-Nov-19 21:43
MemberKhalequzzaman8-Nov-19 21:43 
QuestionWhats your code management setup? Pin
lineil8-Sep-19 4:50
Memberlineil8-Sep-19 4:50 
AnswerRe: Whats your code management setup? Pin
MilesWeb9-Sep-19 2:52
professionalMilesWeb9-Sep-19 2:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.