riebl / vanetza

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

Unable to decode received messages #221

Closed danielfacchetti closed 4 months ago

danielfacchetti commented 4 months ago

Hi, I'm using Vanetza with Autotalks hardware (EVK4 dev board). I set up 2 boards, one as RSU sending beacon messages and DENM messages and one as a OBU generating CAM messages and receiving DENM messages. I use the socktap example with autotalks link layer. To validate messages I use a WaveBEE touch tablet. The problem I'm experiencing is that all messages received on the OBU (beacon and DENM) and also RSU (CAM message) are not correct: in the indicate function of the RouterContext the source MAC, dest MAC and EthertType are wrong, but on the tablet the packets are correctly decoded. I have also printed the bytes trasmitted and received by the two devices (before and after invoke the autotalks API function to trasmit and receive) and they are the same...

What could be the problem?

Thanks, Daniel

riebl commented 4 months ago

Hi @danielfacchetti,

I have no Autotalks EVK available for testing but I have just checked it with the Cube EVK. With that link layer I see the source MAC addresses as set on the respective transmitting device. This observation confirms that the transmitted data is correct, as you have already found with your WaveBEE tablet. Since I see also correctly received MAC addresses in RouterContext with the Cube link layer, I assume that the issue is in socktap's Autotalks link layer implementation. My guess is that the strip_autotalks_rx_header is not working correctly. Can you please check if the v2x_receive_params_t includes the right data and it is correctly copied to the eth EthernetHeader in this function?

The Autotalks link layer has been contributed by @khevessy, so maybe he has some hints too.

danielfacchetti commented 4 months ago

Hi @riebl You are right! I forgot to implement the strip_autotalks_rx_header in my solution so the EthernetHeader passed to the indicate function in the RouterContext are wrong. I conferm that the implementation in the socktap example is correct. Thanks!