I came into this strange issue:
1) In Ubuntu GUI mode, open gnome terminal, execute "adb devices", attached phone can be listed
2) Switch to console mode (Ctrl+Alt+F1), execute "adb devices", the phone is listed. But after execute "adb root; adb remount", then execute "adb devices", attached phone cannot be listed
3) Switch to GUI mode again(Alt+F7), and execute "adb devices" in gnome-terminal, phone is listed again
So the problem seems to be that if I never list device under GUI mode, then I cannot get the device listed in Console mode. Anybody see this problem before?
By the way, when the adb devices command doesn't listed the phone, lsusb can found the phone, so I guess in usb device aspect, things are good.
Related
I am trying to Power on/off a device using appium. I modified Webdriver.py in Appium python client. I added a function and command for power off. Its not working. Can anyone help me with Appium commands for power on/off. PS - I can not use adb commands
adb shell reboot -p power off device
adb reboot -p restart the device
I'm interested what function you added, because Appium server does not support device power on/off out of box, the only way you can do it is to use adb directly
I get this error message when i try to upload code to my arduino. Does anyone know what is going on?
I have installed the proper drivers and it works fine. My port appears on the menu and it is the corresponent to the device.
bless
Common error, here is the solution:
1 - Unplug the Arduino
2 - Upload code with no Arduino connected to PC
3 - Reconnect Arduino
4 - Upload code to the Arduino
Good luck!
From terminal:
ls -l /dev/ttyUSB*
# or:
ls -l /dev/ttyACM*
Get the groupname from the result:
crw-rw---- 1 root uucp 188, 0 5 apr 23.01 ttyUSB0
# or:
crw-rw---- 1 root dialout 188, 0 5 apr 23.01 ttyACM0
Add your username to the group:
usermod -a -G uucp username
# or:
usermod -a -G dialout username
Log out and in again for this change to take effect.
Source: https://playground.arduino.cc/Linux/All/#Permission
If you are on Linux,
just set current user to belong to "dialout" group which is the one who members are allowed to access ports.
Run following:
sudo adduser yourUserName dialout
then relog to take effect
(Ubuntu 18.04)
If your using the arduino IDE 2.0 you must close the serial monitor tab if it’s open to upload a sketch. Otherwise you will get this error.
USB may need CH340 driver.
Some Arduinos use the CH340 controller
Find and install the CH34X_Driver_V3.4_Windows.zip
click right on this computer, go to management, device manager, com, find the port of Arduino, then go to tools and in port select the com
I had the COM3 error too and this fixed it.
Open the Arduino application as Administrator
(Shift+Rightclick the app, 'Run as administrator').
I still had to upload without the Arduino connected, then connect and upload.
I had the same problem:
If you are using VS Code with Platform IO and you spam Serial Monitor with many message too fast, then when trying again to upload it will give you the above error. One way to solve it is to press the reset button on your board and immedietly after that to press upload in VS Code. Just don't spam the Serial Monitor too fast, when using VS Code with Platform IO and uploading while monitoring it.
If you are using CLion with Platform IO and you have opened Serial Monitoring via pio device monitor then you must close it and then upload, because it is using the port.
be sure you are not using 2 ides connected to arduino like ARDUINO IDE and VS Code
If you are using the USB-SERIAL CH340 driver: (on some cheaper ARDUINO clones)
Open Device Manager
Open Ports and click on the drop-down arrow to select your port.
Right-click and select "Properties"
Open the "Port Settings" tab.
Click on "advanced" to open a new window:
Un-tick "Use FIFO buffers (requires 16550 compatible UART)" and press "OK"
See image
Please let others know if this worked for you!
The only issue is that the button resides in the com.android.systemui package, or so I imagine. It is the OK button that a user has to press in order to allow adb over USB. My touchscreen is dead, and I am controlling the phone through an USB mouse, so I am unable to click that OK button to enable debugging (non rooted phone). I was thinking that an instrumentation apk would do it, but... there goes trouble.
Another approach I have taken has been signing the instrumentation .apk with systemui's certificate. That has only led to Failure [INSTALL_FAILED_INVALID_INSTALL_LOCATION] though.
So, any way to click that button ?
What I ended up doing was to root my phone via kingroot apk, then install a wifi adb apk which, as it says, enabled adb over wifi andI was able to use the OTG mouse in order to accept that dialog asking for permission to adb into the phone.
I am successfully using GNU Screen as serial terminal to "talk" to my Altair 8800 clone (http://altairclone.com/) using serial line. The command I use is 'screen -istrip /dev/ttyUSB0'. Screen does the VT100 emulation, strips off MSB from output etc. - works perfect.
Now, I am also working on an emulator of Altair 8800 in Java and would like to use some terminal emulator to connect and talk to it, just like it was a real machine behind serial device. What is the best way to solve in in the Linux world? Is there a way to use Screen for that? Something tells me the solution is trivial, but I just don't know it yet ;) Thanks for any suggestions.
You emulator has to create a something called a "pseudoterminal". This is a pair of devices - the master side is used by the terminal emulator, writing bytes that are to be sent to the program on the computer and reading bytes that the computer sends. The slave side is on the other end: it is the device that the program being controlled by the pseudoterminal opens to get input and send output to. The slave device will appear in the filesystem with a name like "/dev/pts/9". See http://www.gnu.org/software/libc/manual/html_node/Pseudo_002dTerminals.html.
Also, to get the vt100 emulation in Linux make sure the terminfo package is installed and set TERM=vt100; export $TERM after opening your terminal window
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.