Welcome to PhantomPilots.com

Sign up for a weekly email of the latest drone news & information

Encrypt your Camera to Repeater WiFi

Discussion in 'Phantom 2 Vision + Discussion' started by linuxkidd, Jun 16, 2014.

  1. linuxkidd

    Joined:
    Jun 12, 2014
    Messages:
    79
    Likes Received:
    2
    Location:
    Anywhere USA - Fulltime RV'er
    If you'd like to encrypt your 'Phantom_XXXXXX' network (FPV network), please see THIS THREAD.

    This HowTo assumes you already have the following knowledge:
    * How to connect to a hidden WiFi network
    * How to assign a static IP address to your computer for said hidden WiFi network
    * How to change your Computer back to DHCP after you're done


    This HowTo also assumes you've already installed the WebUI via this thread. Yes, it can be done via the CLI, but it's way too easy to mess things up and loose access to your drone/repeater in the process.


    NOTE: The order of operations is important! The Repeater WiFi will not be accessible if it cannot connect to the Phantom. Thus, you must configure the Repeater first, then the Phantom.

    Configure your Repeater First:
    1. Connect your computer to the WiFi of the Repeater (SSID: Phantom_XXXXXX)
    2. Log into the WebUI of your Repeater at http://192.168.1.2/cgi-bin/luci
    3. Click on the 'Network' -> 'WiFi' options from the top menu
      [​IMG]
    4. Write down the name of your Camera link network (FC200_XXXXXX) - Warning: Capitalization (Upper vs Lower case of the alpha characters) is IMPORTANT - Make sure you get it right.
    5. Click on 'Edit' next to your 'FC200_XXXXXX' network
    6. Scroll to the bottom, under 'Interface Configuration' click on 'Wireless Security'
    7. Select the Encryption of your choice from the 'Encryption' drop down (I strongly recommend WPA2+PSK)
    8. Select the Cypher of your choice from the 'Cypher' drop down (I strongly recommend Force CCMP (AES))
    9. Type in the password of your choice in the 'Key' area
      [​IMG]
    10. Click the 'Save & Apply' Button
    11. Congratulations.. your Repeater is now inaccessible.. Please continue below!

    Now, Configure your Phantom:
    1. Configure your computer to connect to the Hidden WiFi network name you wrote down from above (FC200_XXXXXX)
    2. Ensure to assign your computer a static IP address in the 192.168.1.x range (you can safely use 192.168.1.15)
    3. Once connected to your Phantom network, Log into the WebUI of the Phantom at http://192.168.1.1/cgi-bin/luci
    4. Click on the 'Network' -> 'WiFi' options from the top menu
      [​IMG]
    5. Click on 'Edit' next to your 'FC200_XXXXXX' network
    6. Scroll to the bottom, under 'Interface Configuration' click on 'Wireless Security'
    7. Select the Encryption of your choice from the 'Encryption' drop down (This must match what you chose for the Repeater above!)
    8. Select the Cypher of your choice from the 'Cypher' drop down (This must match what you chose for the Repeater above!)
    9. Type in the password of your choice in the 'Key' area (This must match what you chose for the Repeater above!)
      [​IMG]
    10. As an aside, you can also 'unhide' your SSID from the 'General Setup' section under 'Interface Configuration' if you'd like to do so.
    11. Click the 'Save & Apply' Button
    12. Remove the Static IP address from your computer

    After 30 to 60 seconds, you should be able to connect to your repeater's "Phantom_XXXXXX" network from your computer! Now, your Phantom to Repeater connection is encrypted (and visible if you chose to do so).

    NOTE: You can also use this method for changing other parameters of your WiFi. Some candidates are:
    • WiFi Channel
    • HT mode
    • WiFi SSID broadcast (mentioned above already)
    • Tx Power <- BE VERY CAREFUL DOING THIS, I STRONGLY DISCOURAGE CHANGING THESE VALUES

    Enjoy!
    LK
     
    shomci likes this.
  2. flyNfrank

    Joined:
    Feb 1, 2014
    Messages:
    4,216
    Likes Received:
    912
    Location:
    Indy, USA
    Great Work...a true asset!
     
  3. linuxkidd

    Joined:
    Jun 12, 2014
    Messages:
    79
    Likes Received:
    2
    Location:
    Anywhere USA - Fulltime RV'er
    As an aside, I apologize for the seemingly 15 duplicate threads on this topic.. I kept getting post errors, so I didn't think they were going through.. I continued to retry my post every little bit, thus the duplication. I've gone back and deleted all other copies.. (I hope!)

    Carry on.. :)
    LK

    Sent from my HTC One_M8 using Tapatalk
     
  4. HunterSK

    Joined:
    May 4, 2014
    Messages:
    137
    Likes Received:
    18
    Thanks Linuxkidd!

    As soon as I get my Phantom back, I'll be doing this through the GUI method that you've documented.

    In your guide: "... The Repeater WiFi will not be accessible if it cannot connect to the Phantom."

    Just letting you know that my WiFi repeater appears, even without connection to the Phantom.

    Thanks for the guide.
     
  5. tanemahuta

    Joined:
    May 2, 2014
    Messages:
    7
    Likes Received:
    0
    First thanks for the guide, butttt...
    Now I'm stuck on activating the encryption on the phantom side.
    There is no item "WiFi" under Network. :/

    EDIT:Regained access to repeater wifi. Still encryption on phantom side does not work.
     
  6. linuxkidd

    Joined:
    Jun 12, 2014
    Messages:
    79
    Likes Received:
    2
    Location:
    Anywhere USA - Fulltime RV'er
    Ok, we can fix this.. ;)

    Turns out, the stock wireless config file from DJI has some Windows style line endings that the config tools don't understand..

    I'm going to assume you have ZERO experience with VI (an editor in Unix/Linux land..) and give exact keystrokes... if you follow along, it'll work..
    1. On the phantom:
      Code:
      vi /etc/config/wireless
      
    2. Use the arrow keys to move the cursor down to the empty lines between the last two option lines.. There are 2 empty lines if I recall correctly.
    3. Once you're on the empty line, just hit the letter 'd' key twice...
      Code:
      dd
      
    4. The line you were on should now have gone away. -- You won't see the letter d appear on your screen anywhere.. this is normal.
    5. Repeat the 'dd' keystrokes on each empty line until there's no more empty lines between the last two options.
    6. When you're done, type
      Code:
      :wq
      
    7. The colon :)) is important.. looks like two periods, one overtop the other..
    8. Then press <enter>
    9. This should save and exit from editing the file.

    If you make a mistake!
    1. HIt 'Escape' key a few times, then type:
      Code:
      :q!
      
    2. This will exit VI without saving changes. Just enter the 'vi' command again from above to get back to the unchanged file and try again.

    If all goes well, once you save the file out.. you can refresh your LuCI interface and the WiFi option will be under 'Network'. Please do NOT save the file if you mess it up.. you could make your phantom inaccessible.

    Let me know if you have any questions...
    LK

    Adding the before and after shots below just in case..
    Before
    Code:
    config wifi-device  radio0
           option type     mac80211
           option channel  1
     #      option txpower  27
           option hwmode   11ng
           option path     'platform/ar934x_wmac'
           option htmode   HT20
           list ht_capab   LDPC
           list ht_capab   SHORT-GI-20
           list ht_capab   SHORT-GI-40
           list ht_capab   TX-STBC
           list ht_capab   RX-STBC1
           list ht_capab   DSSS_CCK-40
           # REMOVE THIS LINE TO ENABLE WIFI:
           # option disabled 1
    
    config wifi-iface
           option device   radio0
           option network  lan
           option mode     ap
           option wds      1
           option ssid     FC200_######
           option encryption none
    ^M
    ^M
           option hidden 1
    
    AFTER
    Code:
    config wifi-device  radio0
           option type     mac80211
           option channel  1
    #       option txpower  27
           option hwmode   11ng
           option path     'platform/ar934x_wmac'
           option htmode   HT20
           list ht_capab   LDPC
           list ht_capab   SHORT-GI-20
           list ht_capab   SHORT-GI-40
           list ht_capab   TX-STBC
           list ht_capab   RX-STBC1
           list ht_capab   DSSS_CCK-40
           # REMOVE THIS LINE TO ENABLE WIFI:
           # option disabled 1
    
    config wifi-iface
           option device   radio0
           option network  lan
           option mode     ap
           option wds      1
           option ssid     FC200_######
           option encryption none
           option hidden 1
    
     
  7. 8676309

    Joined:
    Jul 6, 2014
    Messages:
    29
    Likes Received:
    0
    Good work. If I get some time, I could throw together a script to run on MacOS and maybe something for Windows, too.


    Say, have you tried changing "txpower"? This must be what that range extender app does that the guy is selling on this forum.
     
  8. linuxkidd

    Joined:
    Jun 12, 2014
    Messages:
    79
    Likes Received:
    2
    Location:
    Anywhere USA - Fulltime RV'er
    I've got someone testing changes to the txpower setting... They've had a bunch of rain / thunderstorms, but once they're in the clear.. they'll give it a shot. If you'd like to test too.. Please feel free and let us know the results...

    Always looking for more fodder for http://phantommods.info :D
    LK
     
  9. aristosv

    Joined:
    May 19, 2014
    Messages:
    92
    Likes Received:
    0
    So following this guide i have enabled password protection between the repeater and the phantom. I have also configured the phantom to broadcast it's ssid, so i can see it.

    Everything was working ok, but after a restart of the bird and the repeater, i can no longer connect on the wifi network of the bird using my laptop, and the repeater cannot connect on it either. So i dont have video.

    The issue is that I can see the wifi network of the phantom, i try to connectg on it, i get a password prompt and enter the password. I used my phone number so I know I've got it right. After entering the password, i get a message saying "network security key mismatch"

    I have tried deleting all the saved wifi networks on my laptop and tried to connect again, but unsuccessfully.

    So what can i do to fix this?

    thanks
     
  10. linuxkidd

    Joined:
    Jun 12, 2014
    Messages:
    79
    Likes Received:
    2
    Location:
    Anywhere USA - Fulltime RV'er
    Hello aristosv,
    Unfortunately, DJI did not provide any means of resetting the WiFi config of the Phantom. The repeater can be reset via the 're-pair' button.. but alas.. there's no such button on the Phantom. You're only hope is to figure out what happened to the WiFi key between the last known working config, and now... Hopefully there's something that you can recall. Maybe a digit got transposed, or left off, etc...

    I wish I could help more, but this is really the only way to get into the bird. Worst case, possibly file a ticket w/ DJI and send it in for repairs with the symptom 'unable to connect to WiFi' or similar.

    I hope this helps...
    LK
     
  11. aristosv

    Joined:
    May 19, 2014
    Messages:
    92
    Likes Received:
    0
    Thanks for your reply. I found the mistake and connected to the wifi module.