Android Things: Intel Edison: Using USB and Debugging - intel

Has anyone had any luck using USB debugging with an Edison while also using a USB peripheral? It looks like you have to use the switch to activate the bigger USB port, which also cuts off the debugging port. I'm trying to use a USB camera, but can't see the debugger info to actually figure out what's not correct. I also get a connection refused when attempting to use adb connect on the wifi ip.

It looks like you have to use the switch to activate the bigger USB port, which also cuts off the debugging port.
Correct, only one port can be active at a time between the USB Host and USB OTG on the Edison. If you just need access to logs for debugging, connect another USB cable for the serial debug console as described on the Android Things Edison page. This will give you shell access and you can run logcat.
I'm trying to use a USB camera, but can't see the debugger info to actually figure out what's not correct.
It's worth noting that USB cameras are not supported in the current preview release. It's unlikely that the device will be recognized as a camera through the APIs, though you may still be able to access it as a raw USB device if you wish.
I also get a connection refused when attempting to use adb connect on the wifi ip.
The Edison defaults to USB mode for ADB, but you should be able to set it to TCP mode to connect over the network (much like an Android phone):
$ adb tcpip 5555
$ adb connect <ip address>:5555
…or the following, which should persist the configuration across a reboot:
$ adb root
$ adb shell setprop persist.adb.tcp.port 5555
$ adb reboot
$ adb wait-for-device
$ adb connect <ip address>:5555

Related

connect and run adb commands on 25 devices via TCP WiFi without ever connecting any USB

i am trying to send adb commands to over 25 Android devices using TCP- Through my WiFi connection: May i know how i can skip connecting each or any of this devices through USB first before running the adb commands?
In the first time that you connect to the device - you must connect with a usb cable and write these adb commands:
adb tcpip xxxx
adb connect yy.yy.yy.yy:xxxx
where the xxxx - is 4 digits port and the yy.yy.yy.yy is the device ip address
Then, every time you want to connect - you should just write again this code - and you don't need to connect the device using USB cable!

Dragion yun shield ip address

I just got an arduino yun shield by dragino.
I plugged into my computer usb with an Arduino uno following the instructions of the wiki and powering it from 5v > vin.
After a while the wifi network popped up, so I entered it.
Went to http://192.168.240.1/ where I found the website / settings panel and added a password and connected to my own wifi network.
Now I have no idea how to get back to that website, what ip adress to use, or even how to reset those settings so it makes its own wifi network.
I can connect to the Arduino yun through the Arduino program, but I got this error after just trying to do a blinking light. It does not show me the IP for it.
I have also tried connecting it to the wall outlet but it didn't create a network.
Is there anyway to completely reset the board?
It seems as if the shield was set to connect to your WiFi which in turn was set to get an IP address from your WiFi Router. If you want to find out what IP Address was assigned to the shield by the WiFi Router then you can go about it in two ways:
Log onto your WiFi Router and see if it contains a DHCP clients
list. If the shield was assigned an IP from that router then it will be in that list as well.
Use software like SoftPerfect Network Scanner (https://www.softperfect.com/products/networkscanner/) to scan for all hosts on your network. You can then see which IPs were assigned to the hosts. One of them will most probably be the shield.
According to the shield's user manual you can reset to factory settings:
5.7 How to reset the Yun Shield? Yun Shield has a toggle button which can be used for reset. When the system of Yun Shield is
running, user can press the toggle button to reset the device.  If
pressing the toggle button and release after 5 seconds , it will
reset the WiFi setting and other settings will be kept.  If
pressing the toggle button and release after 30 second s , it will
reset ALL the setting to factory default.
There are many options.
If you haven't changed the name of your Yun it's likely to have the default hostname: arduino.local, therefore, if the device has connected properly, you should be able to access it in the browser as http://arduino.local
This should work on OSX. On Windows you will need to use the Bonjour Service for this (which should come with iTunes for Windows). On Linux you can use avahi.
Another option is to ask your Yun what it's IP address is using an Arduino sketch and the USB cable. You can find some handy examples in Arduino > File > Examples > Bridge
I recommend checking out sketches like :
WiFiStatus
YunSerialTerminal
ShellCommands
Either of these should allow you to get see useful info in Serial Monitor.
For example, if you send the ifconfig command via Serial Monitor.
Also, as Blurry Sterk already mentioned, you have the WiFi reset button which can reset the Wifi settings to default. By the way, with the default settings, the WiFi Access Point network name is
Arduino Yun-XXXXXXXXXXXX", where the twelve 'X' are the MAC address of your Yún
(according to the Arduino docs).
write it down (or at least the first 3 parts). You can see devices on your network along with the mac addresses using the arp command.
On Windows:
arp -a
On OSX:
arp -a -x -l
You can find the Yun's mac address in the list, and the IP from there.

COM port lockup with Mbed Virtual Serial Port

I am working with someone using Mbed and a LPCXpresso11U68 board.
I'm not intimately familiar with this particular board, but it has two USB connectors on it, one for the OpenSDA-ish debugger, and a second one is a direct connect to the CPU. I can connect both of these ports to my PC and attach a terminal emulator to each of them, and both ports show output (with a small installed program running on the board).
The device manager shows me that one port (COM51) is using "mbed Serial Port" driver and the other port (COM52) is using "Mbed Virtual Serial Port.
So far so good...
There is a reset button on the board. If I press that button, the port that is attached to the PC using the Mbed Virtual Serial Port driver (in my case COM52) stops operating. The other port (COM51) just restarts cleanly.
The problem I'm having is that after I exit the terminal program (note this happens with both TeraTerm and uCon), if I attempt to reconnect to that port, its not in the list of available comports. Strangely thought, it is still present in the Device Manager.
The only way I've found that I can clear this problem is to unplug/plug that usb cable (COM52) or issue a BREAK condition to COM51 (which AFAIK, resets the board).
I am the writer of uCon and I'd like to be able to detect this (which I can), and also be able to restart the comport connection without any other manual intervention.
One final note: apparently this is not specific to the LPCXpresso11U68 board; my guess it is some issue with the Mbed Virtual Serial Port driver.
Anyone have a clue what may be going on here?

Arduino COM port not found

For the past week I have been programming an Arduino Uno with a computer running Windows 7. When I first started, I found the device on COM6 and was able to upload code no problem. Recently it suddenly stopped receiving code under the error:
Serial port 'COM6' not found. Did you select the right one from the
Tools > Serial Port menu?
The Serial port menu though is grayed out. Research has told me to open up Device Manager and update drivers but there is no other devices tab in my Device Manager. The Arduino is run off the power of the USB cable and runs the code I uploaded a few days ago just fine. What can I do to be able to upload code to the Arduino?
Update:
I installed the Arduino software on another computer and it does not recognize the Arduino either. One of the comments indicates that this could be a problem with the FTDI chip. How can I test if this is the case, and if it is, can I fix it?
There are two types of cable:
Charging Cable
Data Transfer Cable
So try changing the cable, if you have already tried every USB driver and port; or else
Install a new driver using this link, http://www.wch.cn/download/CH341SER_MAC_ZIP.html.
But after installing the driver, if it doesn't work, then change the cable.
For Linux:
To solve the problem, simply run the IDE as super user, so go to terminal and type 'sudo arduino'.
To solve this problem permanently:
In the terminal, run 'gksudo gedit'
In gedit, open the /usr/share/applications/arduino.desktop file.
Change the line Exec=arduino
to Exec=gksudo arduino. Save the file.
Similarly, do the same for Windows...
Also try to re-install Arduino driver.
The Arduino probably started using a different port. When you plug Arduinos into a different USB port it sometimes defaults to a new COM port. Check your device settings for which ports are being used and try each of those. Also try plugging it into a different USB port (if no ports are displayed) and it should register with a new COM. If that fails reboot your machine and repeat the above. If that fails reinstall the Arduino USB driver and repeat above. If that fails you might have fried your Arduino's USB chip (or some other hardware on the Arduino).
For Linux: Vinayk93 is completely right. Adjust the serial port's access rights like so:
$ cd /dev/ ; ls -l ttyA* -- find the right portname, then
$ sudo chmod 666 ttyACMx -- x is 0 or 1

Arduino COM port doesn't work

I bought an Arduino Uno recently. After getting the necessary cables, I decided to upload an example to the chip.
Instead of seeing that Blink, I received an error like processing.app.SerialException: Serial port 'COM1' not found. Did you select the right one from the Tools > Serial Port menu?
Yes, I tried that. But even Serial Port Monitor doesn't seem opening. Then again, I get some exception that isn't worth mentioning.
After I found out that my Serial COM ports don't work (via Portmon.exe), and figuring out that I may even don't have any (there is no COM port in Device Manager), I also tried to download a driver for COM port, but it has also failed.
Some say that it's because of my Acer Aspire 5742's motherboard. Some say that the reason is Windows 7.
Long story short, I'd really appreciate if someone can help me with my COM port problem and mend my broken dreams.
Installing Drivers for Arduino in Windows 8 / 7.
( I tried it for Uno r3, but i believe it will work for all Arduino Boards )
Plugin your Arduino Board
Go to Control Panel ---> System and Security ---> System ---> On the left pane Device Manger
Expand Other Devices.
Under Other Devices you will notice a icon with a small yellow error graphic. (Unplug all your other devices attached to any Serial Port)
Right Click on that device ---> Update Driver Software
Select Browse my computer for Driver Software
Click on Browse ---> Browse for the folder of Arduino Environment which you have downloaded from Arduino website. If not downloaded then http://arduino.cc/en/Main/Software
After Browsing mark include subfolder.
Click next ---> Your driver will be installed.
Collapse Other Devices ---> Expand Port ( its in device manager only under other devices )
You will see Arduino Written ---> Look for its COM PORT (close device manager)
Go to Arduino Environment ---> Tools ---> Serial Port ---> Select the COM PORT as mentioned in PORT in device manager. (If you are using any other Arduino Board instead of UNO then select the same in boards )
Upload your killer programmes and see them work . . .
I hope this helps. . .
Welcome
Did you install the drivers? See the Arduino installation instructions under #4. I don't know that machine but I doubt it doesn't have any COM ports.
I've had my drivers installed and the Arduino connected through an unpowered usb hub.
Moving it to an USB port of my computer made it work.
Abstract: Steps of How to resolve "Serial port 'COM1' not found" in fedora 17.
Today install the packages for Arduino in Fedora 17.
(yum install arduino) and I have the same problem: I decided to upload an example to the chip. and got the same error "Serial port 'COM1' not found".
In this case when I run Arduino program, some banner appears which warns me that my user is not in 'dialout' and 'lock' group. Do you want add your user in this groups? I click in add button, but for some reason the program fail and not say nothing.
Step1: recognize the Arduino device
unplug your Arduino and list /dev files:
#ls -l /dev
plug your Arduino and go and list /dev files
#ls -l /dev
Find the new file (device) that was not before plugging, for example:
ttyACM0 or ttyUSB1
Read this properties:
ls -l /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Dec 24 19:25 /dev/ttyACM0
the first c mean that Arduino is a character device.
user owner: root
group owner: dialout
mayor number: 166
minor number: 0
Step2: set your user as group owner.
If you do:
groups <yourUser>
And you are not in 'dialout' and/or 'lock' group. Add yourself in this groups run as root:
usermod -aG lock <yourUser>
usermod -aG dialout <yourUser>
restart the pc, and set /dev/<yourDeviceFile> as your serial port before upload.
unplug not necessary,just uninstall your port,restart and install driver again.you will see arduino COM port under the LPT & PORT section.
This fix / solution worked for me:
Device Manager --> Ports --> right click on Arduino Uno --> Update Driver Software --> Search automatically for updated driver software
I restarted my computer and then opened the IDE again and it worked while none of the above did.
Maybe you have to do the things above as well, but make sure to restart the computer too.

Resources