ATmega32U4 code:

#include <Mailbox.h>
int i = 0;
void setup() {
  Bridge.begin();    // Initialize Bridge and Mailbox
  Mailbox.begin();
  Serial.begin(9600);    // Initialize Serial
  while (!Serial); // Wait until a Serial Monitor is connected.
}
void loop() {
  Serial.println(i);
  Mailbox.writeMessage(String(i));
  i++;
  delay(2000); // wait 2 seconds
}

AR9331 code:

nano mailbox.py
import socket
import json
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('127.0.0.1', 5700))
result = json.loads(s.recv(1024))
print result
s.close()
python -u mailbox.py
{u'request': u'raw', u'data': u'19'}