Plug-and-Play USB Networking

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(File/directory structure)
(Use case)
Line 5: Line 5:
 
= Use case=  
 
= Use case=  
  
I have 1 laptop and 2 freerunners. Whenever I plug my freerunner, I want that my recognize  
+
I have 1 laptop and 2 freerunners. Whenever I plug my freerunner, I want my laptop recognize  
 
which freerunner was plugged in and act accordingly. Also automagically set up the networking for me.
 
which freerunner was plugged in and act accordingly. Also automagically set up the networking for me.
  

Revision as of 13:31, 15 October 2009

Contents

Introduction

I provide here an example setup which are more complicated than your setup probably will be.

Use case

I have 1 laptop and 2 freerunners. Whenever I plug my freerunner, I want my laptop recognize which freerunner was plugged in and act accordingly. Also automagically set up the networking for me.

Prerequisites

You need a linux/unix computer with working NetworkManager setup. I have successfully use this method more than a month now, with Ubuntu 9.04 (jaunty), I will test it also on Ubuntu 8.10 (intrepid), and report back here.

The NetworkManager on jaunty is:

ii  network-manager                            0.7.1~rc4-0ubuntu1 
ii  network-manager-gnome                      0.7.1~rc4.1-0ubuntu1

File/directory structure

/etc/NetworkManager/system-connections/freerunner_bob (owner: root, rights: 600)
/etc/NetworkManager/system-connections/freerunner_bobek (owner: root, rights: 600)
/etc/NetworkManager/dispatcher.d/10myiptables (owner: root, rights: 755)

File contents

/etc/NetworkManager/system-connections/freerunner_bob:

[connection]
id=Bob's moko
uuid=27afa607-ee36-43f0-b8c3-9d245cdc4bb4
type=802-3-ethernet
autoconnect=true
timestamp=0
[ipv4]
method=manual
never-default=true
address1=192.168.0.200;24
[802-3-ethernet]
mac-address=00:1f:11:01:5d:13  

/etc/NetworkManager/system-connections/freerunner_bobek:

[connection]
id=Bobek's moko
uuid=27afa607-ee36-43f0-b8c3-9d245cdc4bb3
type=802-3-ethernet
autoconnect=true
timestamp=0
[ipv4]
method=manual
never-default=true
address1=192.168.0.200;24
[802-3-ethernet]
mac-address=00:1f:11:01:6e:12
Personal tools

Introduction

I provide here an example setup which are more complicated than your setup probably will be.

Use case

I have 1 laptop and 2 freerunners. Whenever I plug my freerunner, I want my laptop recognize which freerunner was plugged in and act accordingly. Also automagically set up the networking for me.

Prerequisites

You need a linux/unix computer with working NetworkManager setup. I have successfully use this method more than a month now, with Ubuntu 9.04 (jaunty), I will test it also on Ubuntu 8.10 (intrepid), and report back here.

The NetworkManager on jaunty is:

ii  network-manager                            0.7.1~rc4-0ubuntu1 
ii  network-manager-gnome                      0.7.1~rc4.1-0ubuntu1

File/directory structure

/etc/NetworkManager/system-connections/freerunner_bob (owner: root, rights: 600)
/etc/NetworkManager/system-connections/freerunner_bobek (owner: root, rights: 600)
/etc/NetworkManager/dispatcher.d/10myiptables (owner: root, rights: 755)

File contents

/etc/NetworkManager/system-connections/freerunner_bob:

[connection]
id=Bob's moko
uuid=27afa607-ee36-43f0-b8c3-9d245cdc4bb4
type=802-3-ethernet
autoconnect=true
timestamp=0
[ipv4]
method=manual
never-default=true
address1=192.168.0.200;24
[802-3-ethernet]
mac-address=00:1f:11:01:5d:13  

/etc/NetworkManager/system-connections/freerunner_bobek:

[connection]
id=Bobek's moko
uuid=27afa607-ee36-43f0-b8c3-9d245cdc4bb3
type=802-3-ethernet
autoconnect=true
timestamp=0
[ipv4]
method=manual
never-default=true
address1=192.168.0.200;24
[802-3-ethernet]
mac-address=00:1f:11:01:6e:12