Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Transparent Transmission Usage Scenario 2 - upstream from Mobile Device to OES for iOS #112

Closed
EonKid opened this issue Mar 27, 2017 · 4 comments

Comments

@EonKid
Copy link

EonKid commented Mar 27, 2017

I am building an iOS app in which, i want to send some data to custom hardware which is attached with drone using UART to perform some task by custom hardware.I want to send a flag which will be triggered to perform some action by custom hardware .

Using documentation i have found the command using Data Transparent Transmission
Usage Scenario 2 - upstream from Mobile Device to OES
The following SDK interface can help you understand how to communicate with Onboard SDK Device on different mobile platforms including iOS and Android.
iOS
Please use the following method of DJIFlightController:

  • (void)sendDataToOnboardSDKDevice:(NSData *)data withCompletion:(DJICompletionBlock)completion;

The OES can receive the data sent from the Mobile Device by means of a CMD from Autopilot with the CMD Set, ID and Val to be:
CMD Set: 0x02
CMD ID: 0x02
Data Type Offset(byte) Size(byte) Description
CMD Val 0 1~100 User Data
ACK Val --- --- N/A

Can you give use case example to send data to custom hardware to trigger some action .Like setting a flag to perform an action.
I want packet structure and proper conversion to NSData to send it to custom hardware.Also give me some suggestion how to interact with custom hardware?

@amenonDJI
Copy link
Contributor

@EonKid This app sends commands from the iOS app to the OES device (Manifold/x86/STM) and triggers all the sample commands such as Takeoff, Land etc.

The existing Blocking Linux sample app can be run in "Mobile mode", in which case it receives the commands from the iOS app and triggers the command on the aircraft. The full pipeline from the iOS app to the OES device and ACK data back to the Mobile app is exposed in our code.

@EonKid
Copy link
Author

EonKid commented Apr 3, 2017

@amenonDJI Hi ,I have reviewed you sample .But it only provide Command Id sending, it does not provide Command set.
Can you shared code for iOS app.For sending both data listed below
CMD ID: 0x01
CMD Set : 0x0C

@amenonDJI
Copy link
Contributor

amenonDJI commented Apr 3, 2017

@EonKid We don't have code that exactly sends CMD ID and CMD Set. The app was written to run all the basic commands of the OSDK and a few samples. The pipeline and the interfaces that enable you to do this is shown in the app. Please feel free to branch off and make changes to the code.

@EonKid
Copy link
Author

EonKid commented Apr 6, 2017

@amenonDJI Thanks !

@EonKid EonKid closed this as completed Apr 6, 2017
pcler pushed a commit that referenced this issue May 7, 2020
…develop

* commit '5ea77784bfec6c4db51d6ef2e761aead9dd545c8':
  fix: fix hal interface bugs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants