SiliconLabs / wisun-br-linux

Silicon Labs Wi-SUN Linux border router reference implementation
https://www.silabs.com/wireless/wi-sun
Other
41 stars 16 forks source link

app_wsbrd: Write the request packet to pcapng file #10

Closed qianfan-Zhao closed 1 year ago

qianfan-Zhao commented 1 year ago

Now the wsbrd can save both rx and tx packet to pcapng file. Next is a snapshot of wireshark after this patch:

1695806657169

jerome-pouiller commented 1 year ago

Hello @qianfan-Zhao,

First of all, thank you for your contribution.

This feature mainly exist for the certification process. The certification testbed need to get the traffic received by the device: https://app.swaggerhub.com/apis/Wi-SUN/TestBedUnitAPI/1.1.6#/FrameSubscription

We don't know if forwarding the transmitted frames could break the certification process.

BTW, the Silicon Labs development boards offer an RF debug interface (called PTI) able to capture all the RF frames (including, acknowledgements, retries, corrupted frames, etc...). This interface is far more powerful that everything we can provide on the wsbrd side.

Did you have a specific use case in mind?

qianfan-Zhao commented 1 year ago

Hi @jerome-pouiller , nice to meet you.

I am a beginner of wisun and Silicon Labs and now I am learing wisun by using wsbrd and wireshark.

The first time I try make a analysis of pcapng but I can only find the RX packet, no TX packet on pcapng file. That is not good for a beginner. So I introduce this feature, and can read everythings in wireshark now.

Like it said above, I am a beginner and I don't have BRD4001A board, all my work are based on BRD4207B core boad and a custom desiged bottom board. The next work on my custom bottom board is add PTI interface and active it. Thanks for you's advice.

Could you please make sure can this patch break the certification process? Can we mege this patch if it doesn't break? Or add some command line argument to active it when we need it?

jerome-pouiller commented 1 year ago

BRD4207B? Do you mean BRD4270B? I don't think you will be able to enable PTI on a custom board (PTI relies on JLink chipset which is probably not included on your custom design).

The certification process is still evolving. It is not because it works today it will still work tomorrow. However, we could contact the Wi-SUN Alliance to specify that point (in fact, we already had that plan in mind).

We could accept this PR if we were sure it does not break the certification. However, it depends on bureaucracy stuff so, it won't happen before a long time.

qianfan-Zhao commented 1 year ago

Yes, it is BRD4270B.

The schematic of BRD4270B doesn't public all parts, actually I don't known the PTI part is connected on JLink.

Fortunately the logic signal of PTI is UART, it's not difficult to write a custom code to capture it and then import to wireshark. that is my next plan.

1695886554432

Since we can not make sure whether this patch will be broke certification process, I prefer add the other command line arg to enable capture TX packet.

jerome-pouiller commented 1 year ago

FYI: https://community.silabs.com/s/article/why-should-i-enable-the-pti-peripheral-x

qianfan-Zhao commented 1 year ago

Hi @jerome-pouiller, after the holiday and I finish the PR now. The default behavier is capture all packet but we can change the configuration file to filter RX only.

Please make a review again.

qianfan-Zhao commented 1 year ago

I had introduced a custom PTI capture tools based on CH347(usb to serial) device, which can sniffer uart data and then import to wireshark. That is better than add sometings in this project.

So I close this PR.