# Communication

## XBee-compatible socket

M2 has an *XBee-compatible form factor socket* on the top of the processor board. In other words: two 2mm pitch x 10 pin headers spaced 22mm apart. You an read more about [XBee modules on Wikipedia](https://en.wikipedia.org/wiki/XBee)

![](/files/-Lhg6DP-eGIoLUpnRAeW)

There are LOTs of modules that fit this socket, with many different functions. WiFi, BLE, GSM, LTE, Ethernet, etc.

When connecting a *XBee-compatible form factor socket* to M2, makes sure that is is oriented so that pin 1 (+3.3V) is at the corner nearest the USB socket as shown here:

![](/files/-Lhg6DP12R4TTBGsP1xv)

For an image showing the pin names of the XBee socket on M2, click [here.](/product-documentation/m2-docs/detailed-reference/pin-mapping.md#xbee)

## USB

M2 has a USB connector that can act as either a HOST or DEVICE depending on your code.

M2 uses Native USB port only. To print something to the Serial monitor, you'd need to use this command:

```cpp
SerialUSB.print("Something");
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.macchina.cc/product-documentation/m2-docs/detailed-reference/communication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
