Closed Walthard closed 8 months ago
Following the comment on rate settings: https://github.com/seemoo-lab/nexmon_tx_task/blob/8d550c187261c4f1a637fa2ac316dd379fb51260/utils/tx_task.sh#L78
there is a define indicating LDPC coding here:
#define RATES_LDPC_CODING 0x00400000
Try setting this bit to 1
in the rate argument.
Please open a dedicated issue for that.
Did you try my suggested solution for this issue? If yes, is this solved and can be closed?
Sorry for that. According to your instruction, I found the 22th bit of parameter rt (in tx_task.sh) represent the BCC or LDPC coding. So, I just manually set the 22th bit of rt to 1. But the transmitted wave still BCC encoded.
To set the mentioned bit, you could replace with the following:
rt=$(${PRINTF} "\\\x%1x%1x\\\x00\\\x4%01x\\\xc2" ${spatial_streams} ${mcs} ${bandwidth})
Maybe you also have to change to a HT rate, like this:
rt=$(${PRINTF} "\\\x08\\\x00\\\x4%01x\\\xc1" ${bandwidth})
If that doesn't work one might need to activate LDPC first somehow.
I replace with the rt=$(${PRINTF} "\\\x%1x%1x\\\x00\\\x4%01x\\\xc2" ${spatial_streams} ${mcs} ${bandwidth})
mentioned above. I use the SDR to receive the signals and recover VHT-SIG-A2 field. Unfortunately, it shows the VHT frame still uses BCC coding.
What about the second option, using HT?
I tried the second option. It seems the parameters are incorrect and lead the router cannot transmit the wave (I cannot find any signals in my configured channel, though the _txtask.sh can be implemented). And I also cannot receive any 802.11 packets with my WiFi dongle.
After I change the last byte c2 to c1, the router can transmit the HT packets normally. But it is still BCC coding.
Right, my bad. Should have been c1
.
There is one more simple thing that you can try. On the router run (replace <interface>
):
/jffs/nexutil -I<interface> -s263 -l512 -b -v`printf "ldpc_tx\x00\x01\x00\x00\x00" | openssl enc -base64 | tr -d "\n"`
This calls a named IOVAR with the name "ldpc_tx"
with the value 1 (ON)
.
It might allow transmitting with LDPC.
To turn it OFF (0)
:
/jffs/nexutil -I<interface> -s263 -l512 -b -v`printf "ldpc_tx\x00\x00\x00\x00\x00" | openssl enc -base64 | tr -d "\n"`
To set on AUTO( -1)
:
/jffs/nexutil -I<interface> -s263 -l512 -b -v`printf "ldpc_tx\x00\xff\xff\xff\xff" | openssl enc -base64 | tr -d "\n"`
The above method works! The demodulated HT-SIG field shows packets sent are encoded by LDPC. Thank you very much for your help!
Great, happy to help and thank you for reporting back.
I have learnt that the channel coding scheme for wifi may be BCC or LDPC codes. I would like to know if nexmon supports changing the channel coding scheme.