Skip to content

Ethernet::passphrase()

André Dumas edited this page Dec 6, 2012 · 1 revision

GBEthernet

Description

Sets the passphrase of the network to associate with before calling Ethernet::begin()

Syntax

Ethernet.passphrase(passphrase);

Parameters

passphrase The passphrase string for this network

Returns

None

Example

#include <SPI.h>
// Need to include GorillaBuilderz WizFi Ethernet libraries
#include <Transport.h>
#include <WizFi210.h>
#include <GBEthernet.h>

byte mac[] = { 0xCD, 0xDD, 0xCC, 0xAA, 0xFF, 0xDC };

void setup() {
  // Set the network name
  Ethernet.ssid("BatPhone");
  // Initialise secure network passphrase
  Ethernet.passphrase("password");
  // Returns 1 if successfully associated to network and IP Address obtained. 
  // Use a previously read mac address from GBIMAC
  Ethernet.begin(mac)
}
Clone this wiki locally