Kemp’s Blog

A technical blog about technical things

Talking ‘Stix

To your left (in compliant browsers), you are looking at the direction of connection establishment (does that phrase make sense?) in my test network for the Gumstix and their Bluetooth adapters. After many failed attempts to have the Master connect to the Listener and have the Slaves connect to it (host down/device busy/etc), I gave in and let the Master initiate all the connections, which worked first time and was completely repeatable for once. This also gives me more centralised control over things, as only the Master needs any config files telling it the addresses of the Slaves, rather than each Slave needing to know the address of the Master. Below is the output (slightly edited for clarity) I was very happy to see.

PC (00:0A:94:13:CE:8D)

$ ./listener
Waiting for connections on port 1
Master connected: 00:80:37:27:03:8C
Slave announced: 00:80:37:27:03:86

Master (00:80:37:27:03:8C)

# ./master
Connected to listener at 00:0A:94:13:CE:8D
Connected to slave 0 at 00:80:37:27:03:86
Relaying slave address

Slave (00:80:37:27:03:86)

# ./slave
Waiting for connections
Accepted connection from 00:80:37:27:03:8C