Closed stan-jelavic closed 1 year ago
Hi thanks for raising this issue. I assume you pressed the reset button in your log after sending AT+TXPWR=4? I'll try to reproduce, just so I have the same setup as you, have you flashed the tags with the precompiled sw and flashed using the pre-flashed bootloader on the tags or compiled the sw yourself?
Thank you for a prompt reply. We tried a few builds. Tried flashing from here: https://github.com/u-blox/c209-aoa-tag/releases Then I did the build from here https://github.com/u-blox/c209-aoa-tag/ The results were the same -- First it was OK but after I tried a new power settings the tag went into low power permanently.
Hi @stan-jelavic I have tried to reproduce but unfortunately unable to. I send the commands and then reset the C209 using the button after each AT+TXPWR=X Here's a plot where I changed the output power down and then back up again, plotted the RSSI on channel 37 on the C211 anchor.
I added a command to read out the output power, here app-dfu-boot-with-read-txpwr.zip is a release build for you to test or you can compile this branch jkra_txpwr_issue_18
Can you flash this and see what your output is when you have low output power even if you have set it to something high. Send AT+TXPWR?
to read back the output power.
I tried your build and read the power ok. AT+TXPWR=6 OK
Reset at this point
AT+TXPWR? +TXPWR:6 OK
This is what I get from the C211 at about a foot distance. Very low RSSI. +UUDF:6C1DEBA41849,-93,-6,18,-98,37,"6C1DEBA09A54","",62264 +UUDF:6C1DEBA41849,-84,18,18,-90,37,"6C1DEBA09A54","",62368 +UUDF:6C1DEBA41849,-85,16,20,-91,37,"6C1DEBA09A54","",62477 +UUDF:6C1DEBA41849,-92,18,4,-96,38,"6C1DEBA09A54","",62582 +UUDF:6C1DEBA41849,-89,6,6,-85,38,"6C1DEBA09A54","",63514 +UUDF:6C1DEBA41849,-89,58,-8,-85,39,"6C1DEBA09A54","",63938 +UUDF:6C1DEBA41849,-87,-56,-16,-85,39,"6C1DEBA09A54","",64043
A few questions: Is there a way of clearing out the NV ram. Does the build that you sent me use the patched radio.c for CTE?
Does the build that you sent me use the patched radio.c for CTE?
Yes it's with the CTE patch as I can see my C211 giving angles that looks ok when I move the C209 tag.
Is there a way of clearing out the NV ram.
You can erase NVS if you have a j-link debugger and just erase the flash with JFlashLite for example and then flash back the SW according to the README. However I don't think NVS is the issue as you get a correct readback in AT+TXPWR? command. The only thing I can think of right now is if for some reason it fails to actually set the output power to the Bluetooth controller.
Here is a debug build which gives you logs on the UART, can you flash that and send me the log. app-with-read-txpwr-debug.zip
Look for this print set Tx Power successful:
[00:00:00.017,578] [0m<inf> app: Bluetooth initialized[0m
[00:00:00.017,608] [0m<inf> app: Setting TxPower: 6[0m
[00:00:00.017,761] [0m<inf> app: Set Tx Power successful: 6[0m
*** Booting Zephyr OS build v2.4.99-ncs1 ***
[00:00:00.014,923] [0m<inf> fs_nvs: 4 Sectors of 4096 bytes[0m
[00:00:00.014,923] [0m<inf> fs_nvs: alloc wra: 0, f98[0m
[00:00:00.014,953] [0m<inf> fs_nvs: data wra: 0, 2c[0m
[00:00:00.014,953] [0m<inf> storage: NVS Init done[0m
[00:00:00.014,953] [0m<inf> app: InstanceId (MAC)
fa c1 d6 6e 15 42 |...n.B [0m
[00:00:00.015,045] [0m<inf> buttons: Set up button at GPIO_0 pin 2[0m
[00:00:00.017,578] [0m<inf> app: Bluetooth initialized[0m
[00:00:00.017,608] [0m<inf> app: Setting TxPower: 6[0m
[00:00:00.017,761] [0m<inf> app: Set Tx Power successful: 6[0m
[00:00:00.018,524] [0m<inf> bt_adv: adv started[0m
[00:00:00.018,615] [0m<inf> app: Started blink thread[0m
AT+TXPWR?
+TXPWR:6
OK
AT+TXPWR=-20
OK
*** Booting Zephyr OS build v2.4.99-ncs1 ***
[00:00:00.014,923] [0m<inf> fs_nvs: 4 Sectors of 4096 bytes[0m
[00:00:00.014,923] [0m<inf> fs_nvs: alloc wra: 0, f90[0m
[00:00:00.014,923] [0m<inf> fs_nvs: data wra: 0, 30[0m
[00:00:00.014,953] [0m<inf> storage: NVS Init done[0m
[00:00:00.014,953] [0m<inf> app: InstanceId (MAC)
fa c1 d6 6e 15 42 |...n.B [0m
[00:00:00.015,045] [0m<inf> buttons: Set up button at GPIO_0 pin 2[0m
[00:00:00.017,578] [0m<inf> app: Bluetooth initialized[0m
[00:00:00.017,578] [0m<inf> app: Setting TxPower: -20[0m
[00:00:00.017,761] [0m<inf> app: Set Tx Power successful: -20[0m
[00:00:00.018,493] [0m<inf> bt_adv: adv started[0m
[00:00:00.018,615] [0m<inf> app: Started blink thread[0m
AT+TXPWR?
+TXPWR:-20
OK
AT+TXPWR=6
OK
*** Booting Zephyr OS build v2.4.99-ncs1 ***
[00:00:00.014,923] [0m<inf> fs_nvs: 4 Sectors of 4096 bytes[0m
[00:00:00.014,923] [0m<inf> fs_nvs: alloc wra: 0, f88[0m
[00:00:00.014,953] [0m<inf> fs_nvs: data wra: 0, 34[0m
[00:00:00.014,953] [0m<inf> storage: NVS Init done[0m
[00:00:00.014,953] [0m<inf> app: InstanceId (MAC)
fa c1 d6 6e 15 42 |...n.B [0m
[00:00:00.015,045] [0m<inf> buttons: Set up button at GPIO_0 pin 2[0m
[00:00:00.017,578] [0m<inf> app: Bluetooth initialized[0m
[00:00:00.017,608] [0m<inf> app: Setting TxPower: 6[0m
[00:00:00.017,761] [0m<inf> app: Set Tx Power successful: 6[0m
[00:00:00.018,524] [0m<inf> bt_adv: adv started[0m
[00:00:00.018,646] [0m<inf> app: Started blink thread[0m
AT+TXPWR?
+TXPWR:6
OK
Have you managed getting a tag from "stuck in low power" to good output power? If so what did you do? Do you have more than one tag? Same problem on them (i.e. antenna could not be damaged)?
We have several tags but tried one tag only. Possibly damaged tag for whatever reason. The other tags have the factory flashed code and work ok. Since we need the tags for testing we are reluctant to try changing the power. Will check if we can find another tag to test this. Your debug code gave me the same results as yours.
Booting Zephyr OS build v2.4.99-ncs1
[00:00:00.014,984] [0m
[00:00:00.014,953] [0m
[00:00:00.014,984] [0m
@stan-jelavic Since output power seems to be set correctly down to Zephyr and with a no error response back, I'm leaning towards a HW issue on that tag. You can visually inspect the PCB antenna and compare it with a working C209 PCB antenna, check so none of the components on the PCB antenna are missing/looks damaged. If the PCB antenna looks good, then please try another tag.
Inspected the antenna cct under the microscope and discovered that one cap in the antenna cct was missing. After the fix the power came back. Thank you for your support.
Inspected the antenna cct under the microscope and discovered that one cap in the antenna cct was missing. After the fix the power came back. Thank you for your support.
Great that you managed to solve it!
The tags received from the factory work OK and track very nice. We wanted to be able to control the power level for several reasons such as to minimize the reflections and save battery but ran into this weird issue. When the TX power is set via AT+TXPWR=2 or 4 or 8 the board goes into a very low power mode. No matter what is written into the board, the power stays low. The antenna board can only see the tag if it is with inches from it. Here is the log where I am setting the power to 4. AT+TXPWR=4 OK Booting Zephyr OS build v2.4.99-ncs2-1
[00:00:00.014,923] [0m fs_nvs: 4 Sectors of 4096 bytes[0m
[00:00:00.014,923] [0m fs_nvs: alloc wra: 0, f40[0m
[00:00:00.014,953] [0m fs_nvs: data wra: 0, 58[0m
[00:00:00.014,953] [0m storage: NVS Init done[0m
[00:00:00.014,953] [0m app: InstanceId (MAC)
6c 1d eb a4 18 49 |l....I [0m
[00:00:00.015,045] [0m buttons: Set up button at GPIO_0 pin 2[0m
[00:00:00.017,578] [0m app: Bluetooth initialized[0m
[00:00:00.017,608] [0m app: Setting TxPower: 4[0m
[00:00:00.017,761] [0m app: Set Tx Power: 4[0m
[00:00:00.018,524] [0m bt_adv: adv started[0m
[00:00:00.018,646] [0m app: Started blink thread[0m