roslaunch activation failure what should i do? - sdk

i tried to launch the sdk package by typing
roslaunch dji_sdk sdk.launch
however every time i get this error:
... logging to /home/dji/.ros/log/b31d5e94-fec0-11e9-9835-74da38ebc18f/roslaunch-manifold2-18825.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://manifold2:41911/
SUMMARY
PARAMETERS
/dji_sdk/align_time: False
/dji_sdk/app_id: 1079440
/dji_sdk/app_version: 1
/dji_sdk/baud_rate: 921600
/dji_sdk/enc_key: 39d353a8e9ad01b6c...
/dji_sdk/serial_name: /dev/ttyUSB0
/dji_sdk/use_broadcast: False
/rosdistro: kinetic
/rosversion: 1.12.13
NODES
/
dji_sdk (dji_sdk/dji_sdk_node)
auto-starting new master
process[master]: started with pid [18835]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to b31d5e94-fec0-11e9-9835-74da38ebc18f
process[rosout-1]: started with pid [18848]
started core service [/rosout]
process[dji_sdk-2]: started with pid [18856]
STATUS/1 # init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 921600...
STATUS/1 # init, L66: ...Serial started successfully.
ERRORLOG/1 # getDroneVersion, L1503: Drone version not obtained! Please do not proceed.
Possible reasons:
Serial port connection:
SDK is not enabled, please check DJI Assistant2 -> SDK -> [v] Enable API Control.
Baudrate is not correct, please double-check from DJI Assistant2 -> SDK -> baudrate.
TX and RX pins are inverted.
Serial port is occupied by another program.
Permission required. Please do 'sudo usermod -a -G dialout $USER' (you do not need to replace $USER with your username). Then logout and login again
ERRORLOG/1 # activate, L1387: Unable to initialize some vehicle components![ERROR] [1572843926.785053218]: drone activation error
[ERROR] [1572843926.785190956]: Vehicle initialization failed
^C[dji_sdk-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
here is the steps that i followed to activate the drone:
source devel/setup.bash
catkin_make
rosed dji_sdk sdk.launch
where i edit the baud rate/app id/ enc key/ and serial name.
app_id: 1079440
baud_rate: 921600
serial_name: /dev/ttyUSB0
enc_key: 39d353a8e9ad01b6c659111904bae57ebb138785aa5159699383f28da3f56563
and i continued with the following commands:
roslaunch dji_sdk sdk.launch
its where i got the error.
i'm using USB-TTL cable to connect manifold 2-c with M210 RTK V2, also i got the permission first before typing any code by typing :
usermod -a -G dialout $USER
and then log out and log in
then i typed :
sudo chmod 666 /dev/ttyUSB0
to read and give permission to serial port.
TX (green wire) and Rx (white wire) and ground (black wire) there were put respectively.
so now what should i do?

Some USB-TTL cable doesn't support 921600 baudrate,I suggest you using FT232R USB-TTL cable
You need to enable SDK in the DJI Assistant 2 and set the drone buadrate 921600

There are too many possibility
Please refer my previous answers and check them one by one
DJI A3 Onboard SDK problem (No connection)
Information you have given is not enough, there could be many possibilities. Please go through with the following checklist (this is what first comes to my mind, if I remember sth new, I`ll add it in)
The list is meant for error such as Drone version not obtained or new device error or first success connection(get firmware) then failed activation for Both DJI OSDK and DJI OSDK-ROS. Assuming you already enabled the API control, then check
Does UART on RPI is enabled? if not, enable it. Are you using the correct serial ID as well? If not, set it right. Recommend using /dev/serial/by-id/usb-XXX method
Does Baud rate in DJI assisatnt2 is same as the one in the USERCONFIG file of OSDK? if not, make it same
Did u give permission to the serial device e.g sudo chmod a+rw or sudo usermod -a -G dialout $USER or set the udev rule . If not choose a way to get it right.
FTDI series problems
4.1 Did you use this FTDI cable successfully on other platform before?(to make sure tx rx is correct)
4.2 Is this FTDI 3.3V? If not, high chance your FCU board is already burned. Send it back for repair.
4.3 Measure the voltage on Tx and RX pin while everything is connected, is it being pulled up at 3.3V? if less than 3 then there is a serious communication issue.
4.4 Is there EMI generator around?( this one happen to me once, took me 2 weeks to isolate the issue, EMI cause unreliable connection)
4.5 As an additional test, prob the tx and tx by Y cable using real-term to see if you can see any proper communication happening.
Did u forget to turn on the RC ? If so turn it on while calling the sdk.launch
GO app side issue
6.1 Did u connect the Go app while running sdk.launch? If not connect by GO app, connect it as it will pop up sth.
6.2 Did you login to your account which creates the app id?If not, login to it.
6.3 And is your account being banned for flying in the non-authorized area before(e.g caught by DJI aeroscope/Flyhub) and police is actually going after you? If so, stop playing the drone and surrender urself in. Normally it should be max of one year Jail time, but if you resist, the punishment can be more deadly.
Did u give authority from GO app? click ok or confirm on the GO App once you run sdk.launch in the RPI. Once you launch the sdk, the Go app will pop up sth, Did u do/experience it? After changing the firmware, you should experience this again.
Did u tried the hardware with the 3.8 with a Normal X86/X64 Intel PC/notebook with Ubuntu 16/18 before? is it working? ( rule out hardware / connection issue ) If can work, then its RPI issue. If can not, high chance drone/RC side. I do have couple RPI burn down experience b4.
Did u have valid/correct app id and enc key? double check it. If not, enter is correct.
Is the voltage supplied to A3 stable and clean?
Have you tried this way of calling? /the_sample_u_wish_to_run UserConfig.txt /dev/ttyACM0 (this is what I gathered from other peoples experience)
Which version of RPI you are using, if you are using 2 series, the high chance you have to use https://github.com/dji-sdk/Onboard-SDK/tree/raspberrypi-support with older version firmware. I only tested with RPI 3B. Can not guarantee the function of other versions. That's why number 8 is important to isolate the issue.
Are you calling the sdk.launch from somewhere else? make sure you only call it once and prevent it from being calling again. Make sure the serial port is not occupied.
Make sure API is enabled in DJI assistant2. Close everything power on and connect to DJI assistant 2 again to verify this. If by any chance the board has an issue, the API enable you set in the previous run will get auto deselected. This is to rule out burned FCU board issue.
If by now it is still can not work, then you should try other 3.8 or 3.7 with firmware 1.7.7 and 1.7.5 or whatever firmware you can access. as far as I know, their delay+ wait for ACK always have all sorts of issues. Maybe adding more delay in the wait for serial ack will help you(solution from other github dji_osdk post)
In case of this particular A3 burned, swap another fresh open A3 and proven working FTDI cable(test with Arduino) to rule out the A3 problem
If still no luck, file a ticket to dev#dji.com + send a complaint to Samuel#DJI. Send them the long list of thing you tested, and if they say high chance it is a hardware issue. Do send it back for RMA. I do have experience of one Normal A3 and one M600 A3 has burned FCU board issue before.
After this, if you encounter can not fly GPS mission by OSDK or can not do local flight control. Just try different firmware version. DJI firmware release is usually very buggy for developer.
edit
For you case, use windows. as i have no issue with windows based method
Make sure the slider to the right with my image view. I have no MAC so cant test MAC solution.
YOu might need to plug in and un plug and plug in for couple time
by default api is disabled. so you have to enable it and select the hz rate for topic you wish to receive. Good Luck. This is all I can do.

Related

Burpsuite proxy troubleshoot issue

I am working on mobile pentests currently. At first, using my home network I was able to intercept traffic on burpsuite for both iOS and Android versions of “Test App”. Then the next day, I still am able to intercept traffic but the behaviour of this “Test App” for both iOS and Android seem like it has certificate pinning as I was just stuck on the pre-auth page and getting errors when trying to log in. Without proxy though I am still able to login OK and proceed with the app normally so I don’t think my home network got blacklisted? (For context, the binaries does not have any certificate pinning).
But when I tried to change my network to my mobile hotspot, I could intercept the traffic and app behaves normally again.
Anyone encountered the same previously? Any ideas on what could be causing this? Thanks
This does seem odd. I would wager one of three things is happening here:
You accidentally left "Intercept" on in Burp Suite Proxy. This holds the response in Burp Suite until you click Forward, which would cause behavior very similar to what you are describing here. I have done this more times than I am willing to admit.
There was a temporary outage in the application's API. Not unheard of, especially if this is an unreleased app.
There is some sort of issue on your home network, but this is unlikely. Maybe two devices have the same static IP address?
It's hard to say exactly what the issue might be based on the information you provided, but hopefully this was helpful, or at least gives you a place to start!

Bluetooth HM-10 PIN to connect, Authentication / Security

I am using a HM10 Bluetooth - UART module in my embedded Device. I connect to it via the UUID with an iPhone App, but I would like to activate a PIN to connect for the first time, so that not everybody with an iPhone and a App like LightBlue or something like that, can send data to my device.
Is this somehow possible with the HM10? In the manual is written, that it is possible to use a PIN to pair, but even if I activate this, I didn't need to enter this.
Thank you
I am also using the same adapter (HM-10) or basically CC41-A module, because I have just found out that my module is a clone. I do not know that it could cause authentication issue or not, but I would recommend first identify your module. Do you have also on your board a missing crystal in the position what is shown on this picture:
http://nerdclub-uk.blogspot.com/2016/02/working-with-cheap-bluetooth-btle4.html
If it is missing it is a clone module.
EDITED:
I have just found on that blog in the comments that clone is not supporting authentication.
https://blog.yavilevich.com/2017/03/mlt-bt05-ble-module-a-clone-of-a-clone/
You're trying to change the password of the HM-10 Bluetooth Chip. To do this, you can issue an AT Command.
Assuming you're using an Arduino environment to interface with your embedded device, you'll want to go to the Serial Monitor found in Tools Serial Monitor and type in the following in the textfield:
AT + PASS [YOURPASSWORD]
Press enter or send and you should see the following:
OK + Set: [para1]
You can find more AT Commands for the HM-10 chip at http://fab.cba.mit.edu/classes/863.15/doc/tutorials/programming/bluetooth.html
Use AT command for set password:
AT+PASS?
AT+PASS[parameter]
Bond mode (0: not need PIN Code, 1: Auth not need PIN, 2: Auth with PIN, 3: Auth and bond):
AT+TYPE?
AT+TYPE[parameter]
Important: if your module version is less than V515, please don't use this command.
AT+VERR?

How to remote desktop to an iOS device, a.k.a. how do Mobile Device Farms work?

I have been trying to understand how Mobile Device Farms like DeviceConnect, AWS Device Farm, SauceLabs, etc. get to remote control iOS devices, but I can't find anything on the subject. They get to do it without jailbreaking, which baffles me even more.
I love these kind of projects, because at the moment it seems undoable, but I know that it is possible ('they' are doing it).
With remote control I mean: seeing the screen of the iOS device on your computer screen and able to touch and swipe with your mouse.
Can someone please point me in the right direction as to how these technically work?
If you're using an iPad (in particular) or an iPhone (if you think you'll be able to make our any detail on the smaller screen) then using remote access to view and control what's on your friend's Mac is a good option. And the best way to remote-access a Mac from an iPad is to use Google's free Chrome Remote Access service, which lets you remotely use Mac programs from an iOS device.
It's quite an involved process to set it up the first time, but easy if you want to do it again in future. You'll need the Google Chrome web browser for Mac, and a Google account.
Here is link for Chrome Remote access
https://chrome.google.com/webstore/detail/chrome-remote-desktop/gbchcmhmhahfdphkhkmpfmihenigjmpp?hl=en
Open Chrome and go to Chrome Remote Desktop on the Chrome Webstore. Click Add to Chrome, then Add App. Click Allow, then Continue.
I will give you one approach and small explanation .
You will need to create application with all possible permissions at first also implementation handlers functions .
For example :
Works with files
Real native Socket connections (not http protocol) + need to have some main server signalling (domain or static ip).
Handle remote touch trigger (main problem for real remote/iOS)
Background part experience
Your app need to be non-Market app (more likely).
You can make Application with all possible options that apple give us.
What can you do remote with your app : -control camera/ Mic read geo data , work with galleries , delete or create files . Socket will be communication line .
Also app must initially started and make (on user request) always allow all permissions .
Use camera :
Send with socket some command example ( openCamera ) . AFTER receive this string perform action for opening camera .
If you can fix programability triggering touch events you can make remoteIOS.
More data links :
Q/A send remote events
Q about touch events
Q/A about Permisions
Sorry for the first quick answer,
All of these: DeviceConnect, AWS Device Farm, SauceLabs use Appium in order to control devices.
The component that execute the command is the WebDriver.
Appium have different WebDriver implementation in order to execute operations to different device.
The iOS WebDriver can be found here: https://github.com/appium/appium-ios-driver.
The protocol in use is the JsonWireProtocol.
more details can be found here:
http://appium.io/,
http://www.seleniumhq.org/
Regards

iPhone/ Android will not dismiss wifi landing page implemented with DNS

I am trying to implement a splash page/ wifi landing page on my existing public wifi network, using the DNS method mentioned in Wiki, in which I host a custom DNS server, that will redirect ALL dns lookup to a local address where a web server is hosted, for all user before they click agree.
After the user clicked agree, my custom DNS server starts returning correct ip for the look up, thus, user will be able to get online.
note: We totally understand that this is in no way secure our network, and even putting our network at risk. But the goal here is to just to pop the landing page up in front of our users.
This approach actually works on Windows Phone (Windows 8 I tested) as splash page, and even on a computer when I try to open a random website, it redirects me to my page, and after I hit agree, I can get to the internet.
When I try it on iPhone/ Android, once I connect to the hotspot, the splash page/ wifi landing page appear as expected (because the device is trying to verify internet access by going to the set of pages) However, after I click agree, and allow internet access, both iPhone and Android splash screen will not go away. I have to force iphone to "use this wifi without network" to exit.
I wonder if there is a special (javascript?) method I can call in the page, or some package I need to send to the device? I noticed on iOS, if I click a link to the App Store, the splash page go away without disconnecting from the network, So, I guess I am missing something here.
For example, clicking the link to the iOS StackOverflow App on iOS device can be a workaround.
Had been googling around for a week now, nothing seems to came up.
by the way, I am building my custom dns server on node js, with the module dnsd.
=-=-=
=-=-=-=-= edit =-=-=-=-=-=
I also uploaded a demo of my code on GitHub:
https://github.com/kylelam/dnsd_wifi
To test it, run it in your local network (sudo node demo.js). Then, change your phone's dns to your machine's IP. Disconnect your phone from wifi and connect to it again. (on iOS, you might need to go into detail, and enable auto-login, and auto-join, or if you can't, just reboot.)
*note1: the server will need to run on port 53, and 80, so it need sudo.
*note2: please don't laugh at my code, I'm very new to this. But please do point out.
*note3: you will need to npm install these packages: os, express, dns, dnsd
ttl set to 0 might be the cause of the issue, try a different value like 5.

Reading Apple Watch syslog (NSLog()) in real-time

I'm looking for a way to read the watch's syslog in real-time, similar to the way Device Console or this do it for the iPhone.
It's ok if the phone will be plugged by usb to the computer at the time I'm reading.
At this point I'll even settle for a solution that somehow reads the texts at real-time from Xcode debug console, really (though I will prefer a way to hook in to the watch's syslog in a standard fashion :)..
Thanks!
While I couldn't find any official way to get logs from the device, I did manage to write a hack that does so in real time.
It uses a python GUI automation library to pull the text from the Xcode console window.
Please notice this solution does have it's limitations, as it:
requires the phone to be connected to the computer via cable
only contains the logs from your own app, thus it falls short of the tools mentioned earlier.
However, it did solve my problem and I'm publishing the short python code in the hopes that it will help other developers.
import atomac
def get_console():
xcode = atomac.getAppRefByBundleId('com.apple.dt.Xcode')
return xcode.windows()[0].groups()[0].textAreasR()[1]
def run():
console = get_console()
while True:
clog = console.AXValue[-1000:]
last_read = clog.split("\n")[-2]
print last_read
if __name__ == "__main__":
run()
Notice you may have to play with some of the indexes inside get_console() to get the console window in your Xcode setup.
(If you're interested, this hack code was written for a hackathon project, as a way to get fast data from the watch since it couldn't send any UDP packets on WatchOS2 Beta 4 and the official ways of sending data from the watch [such as sendMessageData:replyHandler:errorHandler:] were too slow for what we needed).
I know this is an old thread, but for anyone who lands on this search, there is way to do this: https://forums.developer.apple.com/thread/94693.
To summarize, load a diagnostic profile onto the watch, (link in the forum post,) then you can use MacOS system console to see the watch messages. Right now I'm having a strange issue where some of the messages I NSLog() appear and others don't, but you can see the watch messages in real time.

Resources