(sorry for the delay as we are just back from vacation)
You may need to first make sure that the Engine does not open the port, by disabling it there:
in JEVOIS:/config/params.cfg add this line:
serialdev=
The empty device name will tell JeVois to not open the hardware serial port. Then indeed you can create your own in your module, but you need to add it as a sub-component rather than just using a member var, so that your serial will be integrated to the component hierarchy and its parameters will be available to users, etc:
in your module's class, declare a shared_ptr member var:
std::shared_ptr<jevois::Serial> m_serial;
then in your module's constructor:
m_serial = addSubComponent<jevois::Serial>("myserial", jevois::UserInterface::Type::Hard);
m_serial->devname::set("/dev/ttyS0");
Then you should be ok with using m_serial->write() for raw data writes.
some more infor about components hierarchies in jevois is here:
http://jevois.org/doc/classjevois_1_1Component.html