Create a virtual serial device for Cooja motes under /dev/pts/[id]
1. Download
https://github.com/cmorty/cooja-serial2pty
2. Update code with new Cooja class names (if not updated) in Serial2Pty.java
- Change package org.contikios.cooja to se.sics.cooja
import se.sics.cooja.*;
import se.sics.cooja.interfaces.SerialPort;
- Change class Cooja to GUI
A modified code can be found here: https://github.com/sonhan/cooja-serial2pty
3. Build
copy to /contiki/cooja/apps/serial2pty
ant jar
cooja > Settings -> Cooja Extensions... > Select the serial2pty app
4. Test
- Restart Cooja if needed
- Right click on the mote > Mote tools for Test Node > Serial 2 Pty > it shows the serial device (e.g., /dev/pts/10
- Open a Terminal:
#cd contiki
#sudo make login TARGET=sky MOTES=/dev/pts/10 (for a simulated Sky mote)