Doc I followed - https://coral.ai/docs/dev-board/get-started/#install-mdt
Python3 version: 3.9
What I have done
Flashed the board with a microSD card.
I have installed MDT and it is working fine.
Connected the dev board via USB, confirmed a new Network Adapter (Remote NDIS Compatible
Device) shows up in Device Manager
Ran mdt devices
What the docs said should happen
connected dev board should be listed
What actually happened
After waiting for some time nothing gets listed (mdt cannot see the
connected device)
Running mdt wait-for-device stalls in "Waiting for device..."
Running mdt shell gives the error, "Waiting for a device... Unable to find any devices on your local network segment."
This might not be the best way to do this, but this did the trick for me:
First connect your board to your PC.
Go to Control Panel > Network and Internet > Network and Sharing Center
Here you will see an Unidentified network click on it and go to Properties.
In properties, go to Sharing and check Allow other network users to connect through this computer's internet connection.
Now try running mdt shell command.
After you have successfully connected your board, make sure to uncheck the previous option in Network Sharing.
I did the above but it did not fix my problem. Here is what fixed it -
Apparently the dev board is seen as a unidentified network under public networks. My Windows Firewall settings blocked python.exe from writing to or reading to public networks. I did the following -
How to check if Windows Firewall is blocking a program
Press Windows Key + R to open Run.
Type control and press OK to open Control Panel.
Click on System and Security.
Click on Windows Defender Firewall.
From the left pane Allow an app or feature through Windows Defender Firewall.
In the allowed apps window, scroll through all the apps.
Locate the app you want to review and see if the app is checked.
(Here the python.exe was not checked. I changed the setting and voila, mdt devices finds the device and everything works on from here.)
If it is unchecked, the app is blocked on the Firewall.
If your program is blocked, simply check the app and click OK.
Related
When debugging in Unity Editor I can see the Debug.Log() output in the Console, which is great. However, when connecting MonoDevelop to a device I don't know where to find this output. It is not in the "Application Output" window. Breakpoints, variables, stack - all works fine. Is there a way to see the debug output in MonoDevelop?
Is there anything better then this answer suggests? Debug/Trace output in MonoDevelop
1) Enable "USB debugging" on your device and connect the device to your development machine via USB cable. Ensure your device is on the same subnet mask and gateway as your development machine. Also, make sure there are no other active network connections on the device (i.e. disable data access over mobile/cellular network).
2) On your development machine, open up your terminal/cmd and navigate to the location of the ADB. You can find the ADB tool in /platform-tools/
3) Restart host ADB in TCP/IP mode with the following command:
adb tcpip 5555
This should produce the following output:
restarting in TCP mode port: 5555
This will have enabled ADB over TCP/IP using port 5555. If port 5555 is unavailable, you should use a different port.
(See http://developer.android.com/tools/help/adb.html)
4) Find out the IP address of your Android device (Settings -> About -> Status) and input the following command:
adb connect DEVICEIPADDRESS
(DEVICEIPADDRESS is the actual IP address of your Android device)
This should produce the following output:
connected to DEVICEIPADDRESS:5555
5) Ensure that your device is recognised by inputting the following command:
adb devices
This should produce the following output:
List of devices attached
DEVICEIPADDRESS:5555 device
6) Build and run your Unity application to the device. Ensure you build your application with Development Build flag enabled and Script Debugging turned on.
7) The device no longer needs to be connected to your development machine via USB.
8) Finally, while the application is running on your device, open your script in MonoDevelop, add a breakpoint, select "Run" -> "Attach to Process" and select your device from the list. (Note that it might take a few seconds for the device to appear in the list. It may not appear in the list if the application is not running or if the device's display goes to sleep).
For some more details and for troubleshooting, see the Wireless Usage section in the Android developers guide for the ADB: http://developer.android.com/tools/help/adb.html#wireless
NB:
The device sends multicast messages and the editor and MonoDevelop subscribe/listen for them. For this to work, your network will need to be setup correctly for Multicasting.
Taken From here
There are other ways also to debug your application in terminal
******************* On MacOS ***************************
Start Terminal from launchpad
First Method
Turn USB Debugging on, on your android device
Connect the android device through usb cable
Go to “platform-tools” folder in Adroid sdk folder by using “cd”
command
Connect the android device through usb cable
type “adb devices” in terminal it will print the list of devices
attached
type “adb logcat -s Unity ActivityManager PackageManager dalvikvm
DEBUG” to see logcat of only unity related stuffs
Second Method
creating an environment variable to access ADB directly
Go to your home directory by typing “cd ~”
Type touch .profile this will create a hidden file named profile
Type open -e .profile this will open the file you just created in
TextEdit
In the file, type export
PATH=${PATH}:/AndroidSdkPath/android-sdk-mac_86/platform-tools
Save file, close TextEdit, Quit Terminal, and Relaunch Terminal
Turn USB Debugging on, on your android device
Connect the android device through usb cable
type “adb devices” in terminal it will print the list of devices
attached
type “adb logcat -s Unity ActivityManager PackageManager dalvikvm
DEBUG” to see logcat of only unity related stuffs
Now you can start your app/game on the target device and Terminal will log all the activities of your app.
Solved!
Install "Visual Studio Community 2015" - Free to use
Install "VS tools for Unity" https://www.visualstudio.com/en-us/features/unitytools-vs.aspx - Free!
Add Package in Unity as explained https://msdn.microsoft.com/en-us/library/dn940025.aspx
Run, attach the debugger and look into the "Error List" window - Log message will appear there as "Messages".
Should the above does not work, check this: https://msdn.microsoft.com/en-us/library/dn940025.aspx , in particular: "Took a while but finally found a very simple thing that I was not aware of - being a newbie - There is a filter button on the error list, which didn't look like it was clickable, so I clicked that and messages are now coming through, who knew?"
I have this code in my WinJS default.html:
<x-ms-webview src="http://localhost/"></x-ms-webview>
<x-ms-webview src="http://display/"></x-ms-webview>
<x-ms-webview src="http://192.168.1.2/"></x-ms-webview>
display is defined in the hosts file:
127.0.0.1 display
and 192.168.1.2 -- the one that is successful -- is another computer on the network.
This is in my appx.manifest:
display and localhost successfully load in IE on the desktop and metro.
My OS is Windows 8.1 Enterprise. I have also completely disabled the Windows Firewall and this has had no effect.
What else can I do?
Microsoft blocks connections to the local machine except while running from the Visual Studio debugger.[1]
There is, however, a workaround tool. Quoting from this post on an MSDN blog:
Immersive applications (and IE11 on the Desktop) run inside isolated processes known as “AppContainers.” By default, AppContainers are forbidden from sending network traffic to the local computer (loopback).
[...]
I have built a GUI tool that allows you to very easily reconfigure an AppContainer to enable loopback traffic. This tool requires Windows 8 and runs on the .NET Framework v4. When launched, the utility scans your computer’s AppContainers and displays them in a list view. Each entry has a checkbox to the left of it, indicating whether the AppContainer may send loopback traffic. You can toggle these checkboxes individually, or use the buttons at the top to set all of the checkboxes at once. Click Save Changes to commit the configuration changes you’ve made, or click Refresh to reload the current configuration settings.
The aforementioned standalone tool is available from here.
I am trying to install and run my Windows Store app on a real Surface RT device. I have installed the Remote Debugger for ARM and its running, with no authentication on 4018.
Visual Studio fails to see the device, fails to connect and deploy.
In Windows on the desktop, I cannot ping and my port-query tool says 4018 is down, the host is unreachable.
What can I do? Why didn't they just use USB like Windows Phone development?
Microsoft don't tell you this, but you need to configure some firewall rules for the device to become visible on the network. Of course, you won't find anything by searching for "firewall" from the Start screen, but it can be found as a Snap-in for MMC.
You could turn the firewall off for the Private Profile, i.e. your local, private home network, since your home router already has a firewall and the one in Windows is just there to annoy people; cause family members to call and interrupt your dinner while they struggle to get things working on their budget new Windows 8 laptops (with no touch screen), or you could set the right rules manually.
However there's an easier way, turn on the oh-so-discoverable - especially on a tablet that's not even supposed to even have a desktop - "Network discovery and file sharing" by opening Windows (file) Explorer and clicking on the Network node on the left. A bar will pop up to remind you that Windows is getting in the way and that you can click it to make stuff work again; this configures the firewall for you.
Note that turning on "Network discovery..." via the option under Control Panel > Network Sharing Blah > Instantly-forgettable Name doesn't work. No one knows why.
By now you should be able to ping you device and the port is open, just in time for your battery to have gone flat.
Important Edit
Today, its not working again and pop-up doesn't appear again so I cannot try the same trick. My port query tool says the port is not open (it was the other day).
So I tried this, but its not working for me.
# Elevated Command Prompt #
netsh advfirewall firewall add rule name="RemoteDebugger" dir=in action=allow protocol=TCP port=4018
That says 'Ok.' but the port isn't open.
So I went into MMC and added the Firewall snap-in and its enabled itself again for the Private profile.
Then I noticed that it doesn't turn off. If you flip it to Off and hit Apply, it does nothing!!
There are now two inbound rules for the Remote Debugger, the one I setup and another for the executable. Still, doesn't work.
This thread:
http://answers.microsoft.com/en-us/windows/forum/windows_rt-networking/possible-windows-firewall-bug-on-surface-rt-blocks/caa8b40c-dacc-4d19-a751-7a04f8ef00e4
There's an answer stating:
Open Control Panel -> Administrative Tools -> Windows Firewall with Advanced Security.
Click "Windows Firewall Properties" in the main frame
In each of the three tabs of Domain, Private and Public Profile:
1) Note that: If you change "Firewall state", or change "Inbound connections" to "Allow" (inbound connections that do not match a rule are allowed), it is not going to work. The change is immediately lost after you click "OK" or "Apply" to close the dialog box.
2) What you need to do is: click Protected network connections: "Customize", it will show another dialog box, in which you can deselect some network connections. In this case, you can uncheck "Wireless" and leave "Bluetooth" on.
Once you finish step 3, Action Center will pop up an alert, saying Windows Firewall is off or not using recommended settings. You can ignore this alert, or turn it off in "Change Action Center settings".
Though someone on that thread confirm it had worked, it hasn't for me.
Luke
When I try to run netsh wlan start hostednetwork, I get the following message:
C:\Windows\system32>netsh wlan start hostednetwork
The hosted network couldn't be started.
The group or resource is not in the correct state to perform the requested operation.
I'm running this with admin privileges, so it's not the notorious
C:\Users\Kevin>netsh wlan start hostednetwork
You must run this command from a command prompt with administrator privilege.
How do I get the hosted network "in the correct state"?
This happen after you disable via Control Panel -> network adapters -> right click button on the virtual connection -> disable
To fix that go to Device Manager (Windows-key + x + m on windows 8, Windows-key + x then m on windows 10), then open the network adapters tree , right click button on Microsoft Hosted Network Virtual Adapter and click on enable.
Try now with the command netsh wlan start hostednetwork with admin privileges. It should work.
Note: If you don't see the network adapter with name 'Microsoft Hosted Network Virtual Adapter' try on menu -> view -> show hidden devices in the Device Manager window.
Let alone enabling the network adapter under Device Manager may not help. The following helped me resolved the issue.
I tried Disabling and Enabling the Wifi Adapter (i.e. the actual Wifi device adapter not the virtual adapters) in Control Panel -> Network and Internet -> Network Connections altogether worked for me. The same can be done from the Device Manager too. This surely resets the adapter settings and for the Wifi Adapter and the Virtual Miniport adapters.
However, please make sure that the mode is set to allow as in the below example before you run the start command.
netsh wlan set hostednetwork mode=allow ssid=ssidOfUrChoice key=keyOfUrChoice
and after that run the command netsh wlan start hostednetwork.
Also once the usage is over with the Miniport adapter connection, it is a good practice to stop it using the following command.
netsh wlan stop hostednetwork
Hope it helps.
First off, when I went into cmd and typed "netsh wlan show drivers", I had a NO for hosted network support too. Doesn't matter, you can still do it. Just not in cmd.
I think this problem happens because they changed the way hosted networks work in windows 10. Don't use command line.
Just go on your pc to settings>Network>Mobile Hotspot and you should see all the necessary settings there. Turn it on, set up your network.
If it's still not working, go to Control panel>Network and Internet>Network and Sharing Center>Change Adapter Options> and then click on the properties of the network adapter that you want to share. Go to the sharing tab, and share that internet connection, selecting the name of the adapter you want to use to share it with.
I encountered this problem on my laptop. I found the solution for this problem.
Test this command in the command prompt "netsh wlan show driver".
See Hosted network supported.
If it is no,
Then do this
Go to device manager.
Click on view and press on "show hidden devices".
Go down to the list of devices and expand the node "Network Devices" .
Find an adapter with the name "Microsoft Hosted Network Virtual Adapter" and then right click on it.
Select Enable
This will enable the AdHoc created connection, it should appear in the network connections in Network and Sharing Center, if the AdHoc network connection is not appear then open elevated command prompt and apply this command "netsh wlan stop hostednetwork" without quotations.
After this, the connection should appear.
Then try starting your connection. It should work fine.
First check if your wlan card support hosted network and if no update the card driver. Follow this steps
1) open cmd with administrative rights
2) on the black screen type: netsh wlan show driver | findstr Hosted
3) See Hosted network supported, if No then update drivers
Symptoms
You install an application that uses Microsoft Virtual WiFi technology on a computer that is running Windows 7 or Windows Server 2008 R2. However, the application does not work after the computer restarts. Additionally, you receive an error message that resembles the following:
The hosted network couldn't be started. The group or resource is not in the correct state to perform the requested operation.
Cause
This issue occurs because the Virtual Wi-Fi filter driver does not create the Virtual Wi-Fi Adapter correctly when a PNP resource rebalance occurs during the startup process.
Notes
1.This issue may occur when a Plug and Play (PNP) resource rebalance occurs during the startup process. The PNP resource rebalance is usually triggered by a change to the hardware configuration.
2.If you open Device Manager when this issue occurs, you notice that the Virtual WiFi Adapter is not created.
If you can't restart your hostednetwork after rebooting the OS ,just Try this hotfix .It fixed my problem. Or try to figure it out by yourself according to the Symptoms and Cause mentioned at the start of my answer.
Often, I've found that the solution to this problem can be fixed by disabling and then enabling the Wifi hardware. I've made a script to do this automatically instead of doing it manually by going to the device manager. You can find it here
Some fixes I've used for this problem:
Check if the connection you want to share is shareable.
a. Press Win-key + r and run ncpa.cpl
b. Right click on the connection you want to share and go to properties
c. Go to sharing tab and check if sharing is enabled
Run devmgmt.msc from the run console.
a. Expand the network adapters list
b. Right click -> properties on the adapter of the connection you want to share
c. Go to power management tab and enable allow this computer to turn off this device to save power. Restart your laptop if you've made changes.
Check if airplane mode is disabled. You can enable airplane mode and then turn on the wi-fi, you can never know. Do disable airplane mode if it is on.
Use admin command prompt to run this command.
If none of the above answers worked for you, You can try the following solution which worked for me.
Go to Services manager(services.msc) and enable the below services and try again.
WLAN AutoConfig
Wi-Fi Direct Services Connection Manager Service
Hope this solved your problem.
The hosted network won't start if there are other active wifi adapters.
Disable the others whilst you're starting the hosted network.
Fixed by installing "Wifi Direct Access Point". HostedNetwork is not well supported by some Windows 10 drivers.
I’m developing Windows Phone app using VS2012 on Dell XPS 15 laptop with Win8 pro.I read a lot of troubleshooting articles here (specially Windows Phone 8 emulator can't connect to the internet) and in other places on the web and have not managed to solve the issue (see the subject). Note my laptop gets successfully IP using DHCP on both adapters (wireless and wired) and no MAC filtering is set on the router. Here is the story:
1) Does not work: When starting WP emulator, it does not get IP from
router (DHCP)
2) Works:
start over (delete virtual switches and machine in Hyper-v)
disable wireless adapter
connect wired adapter to router with cable
start emulator (it creates machine and switches)
gets IP and Internet is accessible
3) Does not work:
start over (delete virtual switches and machine in Hyper-v)
disable wired adapter– windows control panel shows : Bluetooth and
Wireless enabled and wired disable – no others
start emulator (it creates machine and switches)
result:
a) router log shows “DHCP server received REQUEST”
b) on the host I see (ipconfig) virtual switch gets IP (vEthernet
(Intel(R) Centrino(R) Wireless-N 1030 Virtual Switch)) – it selected
as “Windows Phone Emulator External” in virtual machine settings
c) in emulator network tab of “Additional Tools” window I see adaptors
with default IP 169.*
3) Partially works:
delete virtual switches
disable wired adapter– windows control panel shows : Bluetooth and
Wireless enabled and wired disable – no others
create internal switch in hyper-v named “Windows Phone Emulator
Internal Switch” and select it in internal network adapter of virtual
machine
enable sharing in wireless adapter (in control panel)
start emulator as standalone with xde.exe (starting from VS will not
use right snapshot with deployed app) and does not allow it to
connect to network – loading takes much more time and after that, OS
is loading and emulator shows error dialog “Some functionality maybe
disables”
it possible to use emulator with Internet, but device buttons does
not work – use keyboard shortcuts
(http://devatheart.azurewebsites.net/2011/06/04/windows-phone-7-emulator-and-physical-keyboard-shortcuts/)
it cannot be used for debugging – it is good only for showing the app on public ;-)
You have answered your question but this may help.
connect with your wireless network
host the wireless connection using netsh in CMD. an alternative is creating an internal switch sharing your connection with your lan adapter
you can do that with connectify too.
by now, your PC should show you are both connected to a wireless and lan network.
run the emulator from visual studio and you get connected.