I have some problem with UART on DWM1001c PANS2. I communicate with dwm via UART but. I have some question/problem:
When I upload dwm1001_dwm-simple.hex i can communicate in SHELL mode but can’t in generic mode. I send eg. dwm_gpio_cfg_output(DWM_GPIO_IDX_13, 1) ,on RX I get nothing neither output don’t set.
So I add dwm_serial_uart_compile() and upload. I can communicate in generic mode but when try to enter SHELL mode i get in hex 0x40 0x01 0x01 ( @ SOH SOH). This also occure when i upload DWM1001_PANS_R2.0.hex. So I can use GENERIC or SHELL mode depends of what i upload to nRF. This is my main problem. Maybe somebody have similar problem?
Is it some an example of bit configuration for a structure dwm_cfg_anchor to get Gateway/Bridge ? I should set bridge=1 and uwb_mode=ACTIVE ? Can it be uwb_mode=PASSIV ?
Any command to get status of bluetooth and turn it on/off (SHELL) ?
I checked some options and i can’t get uart GENERIC and SHELL work together. It should work like this:
-double enter, enter the shell mode
-quit , quit shell mode and use GENERIC mode
And it did’t work like this, when I compille project with dwm_shell_compile() I can access to shell mode but when I quit I get wrong values of variable in GENERIC mode. When I add dwm_serial_uart_compile(); I get right value in GENERIC but can’t access to SHELL mode. It is strange behavior and It shuoldn’t work like this.
I solve the problem: when using dwm_shell_compile and dwm_serial_uart_compile toghether you must start with generic mode (TLV) and next go to shell by sending ENTER until it enter the shell mode (you will recive 0x40 0x01 0x01 if DWM do not enter shell mode). Maybe DWM send error when they power up and can’t get to SHELL mode too quick, don’t know.
just some last notes. This is correct behavior. After the reset the module is by default in UART TLV API mode. There double enter must come within 1s between each other else it would consider the input as a TLV command.