Jump to content

Opcode

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Opcode

  1. 1 minute ago, MavproxyUser said:

    So for those of you that missed the information I shared with this gentleman... here is some sample code to communicate with the DJI Assistant Web Socket. There are some things left for you as an exercise, but this will give you a solid start. 

     

    
    #!/usr/bin/python
    import binascii
    
    from websocket import *
    ws = create_connection("ws://localhost:19870/general")
    ws.settimeout(1)
    
    while 1:
        try:
            result =  ws.recv()
        except WebSocketTimeoutException:
            break
    
        if result == "": break
        print result
    
    # {"SEQ":"12345","CMD":""} - Get command list on any service. 
    
    # ws://localhost:19870/controller/p4_ext/787d599803c40b695ac8b44d276cd7e48b5d5e69
    # {"SEQ":"12345","CMD":"get_info"} - Serial Number & User Token
    
    # ws://localhost:19870/controller/config/user/787d599803c40b695ac8b44d276cd7e48b5d5e69
    # {"SEQ":"12345","CMD":"EnterFcSdCard"} 
    #
    # {"SEQ":"12345","CMD":"read","INDEX":"fly_limit_height"}
    
    ws.close()

     

    Thanks for your work, appreciated.

    Besides im trying to go the CopterSafe Route and see, what this tool is exactly doing.

    • Upvote 1
  2. Yes, i think Assistant 2 is the way to go.

    The Tool from Coptersafe is using the exactly same driver set (ADB etc), that are included in the Assistant 2 Installation.

    As the Tool is only provided for Windows and im only having a old XP Machine "in stock", i couldnt investigate further.

     

     

     

×
×
  • Create New...