Onos can't connect to mininet - connection

When I want to connect onos with mininet using
sudo mn --controller=remote,port=6653 --mac
I notice the mininet displays
connecting to remote controller 127.0.0.1:6653
which seems to show that the connection is ready. But when I open the ONOS-UI website, it shows
no devices are connected
What's wrong with it?
I have found many articles to solve the problem, but the only answer I can get is "open the app named fwd, openflow". In fact, I'm certain that I really open these app and it has no function wit h the connection.
what can I do to solve it?

Related

Is there any way to set the wifi permission programatically for iOS using ionic?

Actually I have created an iOS application using ionic to connect and disconnect from a particular network using wifiWizard2 Cordova Plugin.
But when I am trying to connect,Popup flashes and asks for "WiFi wants to join Wi-Fi Network "xxxx"".WiFi is my application name.
Then there is 2 option cancel | join.
How to remove this popup so that when I click on connect it should directly connect to the particular network I have specified.

roslaunch activation failure what should i do?

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.

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

Xamarin Webview - show custom error when network is not available

When a web page is not available, it shows default webpage not available error, I want to detect when a link is clicked if internet is available. Is this possible.
Check this out:
https://github.com/jamesmontemagno/ConnectivityPlugin
This is a cross platform way of checking network connection in Xamarin. It can also detect the type of connection currently active. It is very very easy to get up and running.
As for your solution - when that link is clicked, you can check for a network connection using the plugin then, if there is a connection proceed to the web view otherwise, display an error.

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.

Resources