Phantom 3 Standard range mod , let's do it together...

Tuning P3S's wifi link capability.

P3S transmits video packet with fragmentation, and each fragmented packet requires ACK to complete transmission. If ACK does not arrive, drone retransmits packet. So even if some packet lost by any reason, the video can be seen normally, in close range.

Before FCC mod, it was not a problem that this ACK had timeouts, because P3S usually flown at close range. Packets transmitted, and ACK transmitted in return, so there is round trip of packets. The time limit set upon this round trip is 1us by default on most APs, because wifis are used within 10-20m range.

After FCC mod, P3S began to fly further, and problem arisen. At 1km, packets cannot return in 1us. Over 300m, time taken in round trip distance(×2) increases 1us at every 300m. Over this distance, ACK timeouts occured frequently even in ACK has been normally transmitted from RC. Retransmission is frequently occured at longer distance from drone for no purpose, at this time video transmission begins to lag behind, despite of full signal strength and clean radio environment. Combined this, loss of some amount of ACKs makes drone link speed drop, and transmission itself adjusted to less frequent. By the nature of TCP transmission, dropped link speed is slowly recovered over time, because wifi weighs error-less transmission over realtime-ness, and it suggests congested wifi network over dropped link speed.

There is option to increase ACK timeout in wifi command in drone and RC. By tuning this timeout parameter, video can be smoothed in the distance.

Try to run this at the terminal, after boot (essentially at drone, and better apply at RC)
iw phy phy0 set distance 800

By applying this, ACK timeout adjusted 1us to near 3us, and I could feel smoother video over 500-800m. (Where I usually feeling lagged video in clean wifi radio environment ).

Making this option too high, phantom's video signal meter drops, even if the drone is very close to the RC. That signal check method is known for counting successfully received ACK packets in some time window, so loosing the ACK window too much causes that method confusion. Making packets unfragmented (making packet transmission less frequent, for high throughput networking) shows similar result.

I got favorable result for test one or two, but it is still not proven. Same as txpower option, adjusting this parameter considered as not harmful during test. It can be executed at terminal, but as usually, test always should taken at own risk, because I don't know the side effects at the field, or in environment with much interference.

And please let me know when I got wrong at the theory. I feel everything is not evident without proper amount of testing.

Please do update us with any more results and confirmations from further tests. Thank you.
 
1us, 3us are ACK timeouts.

Changing ACK timeout and Slottime

For every further 300 meter increase in distance above 300 meters add 1 µs to the Slottime of your device, and 2 µs to the ACK timeout and CTS timeout.

Every station connected on the same channel should have the same time constants.

Use the furthest distance between any two nodes as the distance in your calculations.

For specific examples for popular operating systems and drivers please see http://www.air-stream.org/Change_ACK

Definitions

ACK Timeout = Air Propagation Time (max) + SIFS + Time to transmit 14 byte ACK frame [14 * 8 / bitrate in Mbps] + Air Propagation Time (max)

Slottime = MAC and PHY delays + Air Propagation Time (max)

DIFS = SIFS + 2 * Slottime

See here for more detailed info.

ACK Timeouts and the effects on distance links | Air-Stream

It is something like running app in windows, you click an app, windows executing, but you only wait 1us, but app executes at 3us. You don't wait for that app executing and double clicks icon at 1us. Windows starts to lag. This is a situation similar to above.

Theorically, it does not affect packet transmission itself. But it can affect the wifi network throughput, you can feel lagging videos if that timeout setting have problems. If you feel problems, just return the bird and reboot(unless you did not added it to startup script). It is close to tuning, somewhat far from modification. iw and iwinfo does not shows the ACK timeout, so checking parameter in telnet is impossible. (In normal wifi enviornment it should be left as it is, and no one should care about it)

Please update us with results and confirmations from further tests. Thank you.
 
Your mod worked like a charm. I'm finally able to enjoy flying the Phantom with an almost lag free video feed.. It feels like the flight time has increased 2x, cause I no longer waste time waiting for signal or the video to catch up. It's freed me up to do so much more! :)

NOTE: Your mod / program ran STEP 1 and STEP 2 automatically, without me having to restart the RC and AC in between. I was only directed to restart at the end. Is that an update in your program's working?
Yes indeed, at the beginning of step 1 there is a checking if need to step 2 or not (Magic Power v4.x)
 
  • Like
Reactions: razrdan
Yes indeed, at the beginning of step 1 there is a checking if need to step 2 or not (Magic Power v4.x)

Ok. Cause the YouTube video had you doing both steps.. It worked fine. But still had to ask cause it was unlike the tutorial video. Thanks.
 
Sorry for not wanting to troll through 66 pages of this thread - but can the mod, or someone else please let me/us know if there's a sure fire way to do this mod without it reverting back on every reboot etc.
i.e. can we get a fixed/sticky post that has the most up to date changes/steps for the mod with the results?

Thanks :)

Hunt
 
Sorry for not wanting to troll through 66 pages of this thread - but can the mod, or someone else please let me/us know if there's a sure fire way to do this mod without it reverting back on every reboot etc.
i.e. can we get a fixed/sticky post that has the most up to date changes/steps for the mod with the results?

Thanks :)

Hunt
Here you go

How to Update Tx-Power with DJIUpdate.exe (CE to FCC)
 
Tuning P3S's wifi link capability.

Try to run this at the terminal, after boot (essentially at drone, and better apply at RC)
iw phy phy0 set distance 800

And please let me know when I got wrong at the theory. I feel everything is not evident without proper amount of testing.
I am using:
iw phy phy0 set coverage nn

And the result is very good, you can try my app Magic Power v5.0
 
I am using:
iw phy phy0 set coverage nn

And the result is very good, you can try my app Magic Power v5.0

I found "set coverage nn" is equivalent to "set distance nnnn" somewhat later. I'm using "set distance 800" which is range limit of my 5.8g.
After typing "iw phy0 list" I found what I set was "coverage 2", equivalent distance to "~900m". Within this range video is very smooth, if the radio environment is clean.
I saw your app not only redesigned to have glimming user interface but felt quite surprised when I saw the watchlog.sh.
Did a quite job that read actual signal strength(seemed to estimate distance) and changing coverage parameter, which is clever.
I'll apply your solution when I'll become available to my P3S. Keep up good work! (The solution would be perfect when it include 5.8g boost too...!)
 
  • Like
Reactions: PapaTita
Have been in pursuit of 5.8Ghz boosting. Having no opportunity to touch my P3S recently, so I have searched for documents.

This is what I found so far.

Untitled-1.gif


From Ocjze's comment that 5.8g board uses BK5811, I looked for its datasheet for chip setup. Alas, there was RF power setup in that document.

2016-10-12_9-30-27.png


Giving CE pin output 0, BK5811 enters into standby state. In this state, we can give it SPI command. That RF_SETUP register address is 06, so we can write that register with some values.

with this command

2016-10-12_9-28-23.png


With SPI protocol, we send 2 byte to BK5811, which is 1 byte W_REGISTER command with register address 06 (replace with AAAAA), and next is the data value 1 byte. The value can be guessed by above chart.

All SPI pins are out for use. I did some puzzling with above pictures. I marked red chars to highlight the purpose of each pins.

One last question. Of which way we can initialize and command that BK5811.

Easy method and currently long shot : 2.4G Atheros module is equipped with SPI interface with GPIO. Somehow if it is connected to 5.8G pins, we can give some commands to setup and boost 5.8g module, on the telnet console. Load spi kernel module, /dev/spi1.0 pops up, and echo "command" > /dev/spi1.0 could be the key commands. Disabling CE pins is another problem.

Another way : RC controller is only way to give command to BK5811. If it is only way to do the mod, I have to know about the RC controller specifics, including model number. I have no idea in this way for now.

Don't have all the clue but felt there's hope for the boosting.

And feeling that someone may laugh for lack of knowledge...
 
Last edited:
  • Like
Reactions: sinxa and PapaTita
I am using:
iw phy phy0 set coverage nn

And the result is very good, you can try my app Magic Power v5.0

After watching watchlog.sh, Sunkyu pointed me that in your script, "set coverage" runs only at RC. Drone is who waiting ACK after sending video packet, so adjusting distance shall be done in Drone, or hopefully both side.

I did not analyzed script myself, but please be informed for that issue. For myself, I did it both drone and RC side as coverage 2.
 
After watching watchlog.sh, Sunkyu pointed me that in your script, "set coverage" runs only at RC. Drone is who waiting ACK after sending video packet, so adjusting distance shall be done in Drone, or hopefully both side.

I did not analyzed script myself, but please be informed for that issue. For myself, I did it both drone and RC side as coverage 2.
Thank you for the information, I try to test it soon.
 
Have been in pursuit of 5.8Ghz boosting. Having no opportunity to touch my P3S recently, so I have searched for documents.

This is what I found so far.

View attachment 66941

From Ocjze's comment that 5.8g board uses BK5811, I looked for its datasheet for chip setup. Alas, there was RF power setup in that document.

View attachment 66942

Giving CE pin output 0, BK5811 enters into standby state. In this state, we can give it SPI command. That RF_SETUP register address is 06, so we can write that register with some values.

with this command

View attachment 66943

With SPI protocol, we send 2 byte to BK5811, which is 1 byte W_REGISTER command with register address 06 (replace with AAAAA), and next is the data value 1 byte. The value can be guessed by above chart.

All SPI pins are out for use. I did some puzzling with above pictures. I marked red chars to highlight the purpose of each pins.

One last question. Of which way we can initialize and command that BK5811.

Easy method and currently long shot : 2.4G Atheros module is equipped with SPI interface with GPIO. Somehow if it is connected to 5.8G pins, we can give some commands to setup and boost 5.8g module, on the telnet console. Load spi kernel module, /dev/spi1.0 pops up, and echo "command" > /dev/spi1.0 could be the key commands. Disabling CE pins is another problem.

Another way : RC controller is only way to give command to BK5811. If it is only way to do the mod, I have to know about the RC controller specifics, including model number. I have no idea in this way for now.

Don't have all the clue but felt there's hope for the boosting.

And feeling that someone may laugh for lack of knowledge...
Using an external amp would be much easier, if you already have a annenta mod that is.

Sent from my HTC 10 using PhantomPilots mobile app
 
Using an external amp would be much easier, if you already have a annenta mod that is.

Sent from my HTC 10 using PhantomPilots mobile app

Actually dumping p3s and getting a new mavic eliminates all problem easily. I just want a cleaner solution which not adds another battery pack with amp back of the controller... Just rc and drone.

FCC mod is made upon contributors in this thread. Maybe you feel easier using 2.4G+5.8G amp than establishing those kind of modding. How about pointing that another place other than this thread. And I don't have any other antenna and amp than original, and no plan to purchase.
 
Last edited:
Actually dumping p3s and getting a new mavic eliminates all problem easily. I just want a cleaner solution which not adds another battery pack with amp back of the controller... Just rc and drone.
In that case you could just get the Advanced at half the price of the Mavic and still accomplish the same goal.

Sent from my HTC 10 using PhantomPilots mobile app
 
Thank you for the information, I try to test it soon.

Thanks for the amazing work PapaTita. Let us know what come our of this investigation, I have been noticing some video lag when flying further than 1 km (god bless Ocjze) and this could solve it !
 
Thanks for the amazing work PapaTita. Let us know what come our of this investigation, I have been noticing some video lag when flying further than 1 km (god bless Ocjze) and this could solve it !
I've made changes in the Magic version 5.1 with better results, Download: bit.ly/p3magic

Sent from my Redmi Note 2 using PhantomPilots mobile app
 

Recent Posts

Members online

No members online now.

Forum statistics

Threads
143,099
Messages
1,467,633
Members
104,985
Latest member
DonT