riebl / vanetza

Open-source implementation of the ETSI C-ITS protocol stack
Other
197 stars 157 forks source link

Redirecting message to serial line #185

Open Krupass opened 1 year ago

Krupass commented 1 year ago

Hello, in nonofficial document I found out parametr for socktap --can-serial=/dev/ttyUSB0. I think it should capture incoming messages and send them to serial line, but when I try to use it, it throws ERROR: unrecognised option '--can-serial=/dev/ttyUSB0'.

Any idea how to make it work or some solution with same function?

riebl commented 1 year ago

Hi @Krupass,

Such a feature has never existed officially, and I am also unaware of it "unofficially". If you only want to forward a particular message type, such as CAMs, I suggest adding the forwarding logic to the application's indication method, e.g. CamApplication::indicate. If you want to capture and forward all incoming packets, you should have a look at BenchmarkApplication which is notified in BenchmarkApplication::tap_packet whenever a packet is received. You can use it as a template for creating a ForwardPacketsApplication.