# Robot communication 101
## Robot to Base Station
#### Make sure the correct IP addresses ands ports are mapped on the robot and the base station when initiating connections.
#### Windows (base station)
```
ipconfig
```
#### Linux (robot)
```
ifconfig
```
### :rotating_light:Important:rotating_light: : make sure the base station is connected to the correct network when searching for the base station IP address.
## Robot to STM
#### When booting the robot, list the ports used by the RPi so you can correctly map the addresses to its component.
To list the RPi's ports:
```
python3 -m serial.tools.list_ports
```
### If no addresses are found, restart the RPi. If the STM isn't found, unplug and replug the usb cable corresponding to the STM's.
##### Addresses have the following format: '/dev/ttyACM\<Port>'
###### i.e :'ttyACM0'
#### Address to change
app/robot/src/infrastructure/script/maestro.py -> First _Polulu_ address
app/robot/src/infrastructure/components/prehenseur.py - > First _Polulu_ address
app/robot/src/domain/decoding/serial_decoder.py -> _STM_ address