unable to flash esp32. the port doesn't exist - esp32

I've been trying to flash esp-wroom-32 for a long time, but I can't seem to get it. idf.py throws this error:
Serial port /dev/ttyUSB0
A fatal error occurred: Could not open /dev/ttyUSB0, the port doesn't exist
CMake Error at run_serial_tool.cmake:55 (message):
/home/matvey/.espressif/python_env/idf5.1_py3.9_env/bin/python;;/home/matvey/esp/esp-idf/components/esptool_py/esptool/esptool.py;--chip;esp32
failed
FAILED: CMakeFiles/flash /home/matvey/esp/esp-idf/examples/get-started/hello_world/build/CMakeFiles/flash
cd /home/matvey/esp/esp-idf/components/esptool_py && /usr/bin/cmake -D IDF_PATH=/home/matvey/esp/esp-idf -D "SERIAL_TOOL=/home/matvey/.espressif/python_env /idf5.1_py3.9_env/bin/python;;/home/matvey/esp/esp-idf/components/esptool_py/esptool/esptool.py;--chip;esp32" -D "SERIAL_TOOL_ARGS=--before=default_reset; --after=hard_reset;write_flash;#flash_args" -D WORKING_DIRECTORY=/home/matvey/esp/esp-idf/examples/get-started/hello_world/build -P /home/matvey/esp/esp-idf/components/ esptool_py/run_serial_tool.cmake
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/matvey/esp/esp-idf/examples/get-started/hello_world/build/log/idf_py_stderr_output_27303 and /home/matvey/esp/esp-idf/ examples/get-started/hello_world/build/log/idf_py_stdout_output_27303`
I have no idea what could be the problem, I changed the udev settings, but maybe it did not work for me.

add yourself to dialout and change permissions on it
$ sudo adduser <username> dialout
$ sudo chmod a+rw /dev/ttyUSB0
It worked for me

Another thing can happen that the modem file name will be changed from /dev/ttyUSB0 to /dev/ttyUSB1 instead. So check the /dev directory for alternatives.
There is a very nice script in this answer:
https://raspberrypi.stackexchange.com/a/132175/152061

Related

Read-only file system when attempting mkdir /root/.local/share on Mac with Putty

I am trying to start Bitnami AWS with Putty in mac, but when i start Auth in SSH with both Catalina and Big Sur i get this error:
(putty: 3637): Gtk-WARNING **: Attempting to set the permissions of `/Users/daniele/.local/share/recently-used.xbel ', but failed: No such file or directory
I tried to install the folder:
sudo mkdir -p /root/.local/share
I get this error:
mkdir: /root/.local/share: Read-only file system
As per the error message, we should create the folder at the following path:
/Users/daniele/.local/share/
And not:
/root/.local/share
Therefore, the correct command is:
mkdir -p /Users/Daniele/.local/share
Require the result in command: csrutil status
If result is enabled, you need to restart machine and press command + R, open the terminal in the recovery, so input csrutil diabled.
Restart, and check the status: csrutil status.
Here are two methods:
you are root.
sudo mount -uw /
so, you could mkdir or touch new file.
If you still can't read or write any, you maybe try this:
cd ~ # cd home directory
sudo vim /etc/synthetic.conf # create new file if this doesn't exist
In the conf files, add new line
data /User/xx/data # Notice: the space between this two strings is tab
Restart, and you will find a link named /data in the root.

Run time error in Castalia

Hey friends i had installed Omnet++ 4.2.2 and Castalia 3.2.I had tried to run the example simulations,but it saying an run time error.i had attached it as a image.Please help me.Please tell me the solutions.Help indeed please.
You probably didn't build the Castalia. In order to build it under Windows do the following:
Open in any text editor the file makemake from main Castalia-3.2 directory, and change the line: OPTS=" -f -r --deep -o CastaliaBin -u Cmdenv -P $ROOT -M release" into:
OPTS=" -f -r --deep -P $ROOT -M release"
Open console mingwenv.cmd.
Change directory to the Castalia directory. Example: assuming that Castalia-3.2 is in d:\Castalia-3.2 you should type: cd /d/Castalia-3.2
Then type in mingwcmd console:
./makemake
make
In order to check it try to start a simulation by typing in console:
cd Simulations/BANtest/
../../Castalia-3.2.exe
The simulation should start in graphical mode.

vagrant up "Error: Could not create directory '/home/username/.ssh'" when using cygwin

Using vagrant 1.8.1, when trying to do a "vagrant up --provider virtualbox" for a box that has already been init'd, I get an "Error: Could not create directory '/home/username/.ssh'."
Per directions here - https://atlas.hashicorp.com/centos/boxes/7the following:
command:
vagrant init centos/7; vagrant up --provider virtualbox
Output:
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.
Host path: /cygdrive/c/VMs/vagrant/centos7-util/
Guest path: /home/vagrant/sync
Command: rsync --verbose --archive --delete -z --copy-links --chmod=ugo=rwX --no-perms --no-owner --no-group --rsync-path sudo rsync -e ssh -p 2222 -o ControlMaster=auto -o ControlPath=C:/DEV/cygwin64/tmp/ssh.540 -o ControlPersist=10m -o StrictHostKeyChecking=no -o IdentitiesOnly=true -o UserKnownHostsFile=/dev/null -i 'C:/VMs/vagrant/centos7-util/.vagrant/machines/default/virtualbox/private_key' --exclude .vagrant/ /cygdrive/c/VMs/vagrant/centos7-util/ vagrant#127.0.0.1:/home/vagrant/sync
Error: Could not create directory '/home/username/.ssh'.
Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.
mm_receive_fd: no message header
process_mux_new_session: failed to receive fd 0 from slave
mux_client_request_session: read from master failed: Connection reset by peer
Failed to connect to new control master
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]
I originally didn't have a /home/username/.ssh directory, and so I tried with a manually created directory, and then also with a symlink to my existing c:/users/username/.ssh directory, but always get this same error.
update: I tried reverting to vagrant 1.7.4, and get the same error. Also, this occurs when trying to do a vagrant up via git bash, cygwin, or windows cmd prompt.
For my case, it appears that this error is only occuring with this specific box. From too much additional troubleshooting, I finally found that using most any other box works fine, e.g. https://github.com/CommanderK5/packer-centos-template/releases/download/0.7.1/vagrant-centos-7.1.box.
I hope that this saves someone else some time.
Under Windows, RSync will try and update the %HOME%/.ssh/known_hosts file. If %HOME% is not defined as one of your environment variables, it may try and add/update that file where it has no permissions, and fail. Solution: Set user environment variable HOME to be %USERPROFILE%.
source: https://github.com/mitchellh/vagrant-aws/wiki/Common-Pitfalls

Boot2Docker searching for docker-bootstrap.sock which does not exist

I am currently trying to set up kubernetes on a multi-docker container on CoreOS stack for AWS. To do this I need to set up etcd for flannel and am currently using this guide but am having problems at the first stage where I am suggested to run
sudo sh -c 'docker -d -H unix:///var/run/docker-bootstrap.sock -p /var/run/docker-bootstrap.pid --iptables=false --ip-masq=false --bridge=none --graph=/var/lib/docker-bootstrap 2> /var/log/docker-bootstrap.log 1> /dev/null &'
The problem is the 1st command
docker -d -H unix:///var/run/docker-bootstrap.sock
from within boot2docker. There is no docker-bootstrap.sock file in this directory and this error is thrown:
FATA[0000] An error occurred trying to connect: Post https:///var/run/docker-bootstrap.sock/v1.18/containers/create: dial unix /var/run/docker-bootstrap.sock: no such file or directory
Clearly the unix socket did not connect to this nonexistent socket.
I will note this is a very similar problem to this ticket and other tickets regarding the FATA[0000] though none seem to have asked the question in the way I currently am.
I am not an expert in unix sockets, but I am assuming there should be a file where there is not. Where can I get this file to solve my issue, or what is the recommended steps to resolve this.
specs: running OSX Yosemite but calling all commands from boot2docker
Docker should create this file for you. Are you running this command on your OS X machine? or are you running it inside the boot2docker VM?
I think you need to:
boot2docker ssh
Then:
sudo sh -c 'docker -d -H unix:///var/run/docker-bootstrap.sock -p /var/run/docker-bootstrap.pid --iptables=false --ip-masq=false --bridge=none --graph=/var/lib/docker-bootstrap 2> /var/log/docker-bootstrap.log 1> /dev/null &'
You need to make sure that command runs on the Vagrant Linux box that boot2docker creates, not your OS X machine.
Hope that helps!

Perforce Server connection error in Mac OS X

Good Day everyone!
I am trying to configure perforce server in OS X(10.8.4) . I tried to follow instructions from here. In fact i am not sure if i am doing it right ! Please check the commands below that i entered in Terminal.
Last login: Sun Sep 1 02:13:19 on ttys000
MDs-MacBook-Pro:~ Emon$ export PATH=~/perforce:$PATH export P4PORT=1666
MDs-MacBook-Pro:~ Emon$ cd ~/perforce chmod a+x p4d p4d -d
MDs-MacBook-Pro:perforce Emon$ chmod a+x p4
MDs-MacBook-Pro:perforce Emon$ mkdir ~/myws cd ~/myws p4 client myws
mkdir: /Users/Emon/myws: File exists
mkdir: p4: File exists
MDs-MacBook-Pro:perforce Emon$
After that i tried to connect from p4v, but the following occurs !
In connection setup assistance i tried (as instructed in the link)
Host : localhost
Port : 1666
And the connection continues to refuse showing this...
Connect to server failed;check $P4PORT.
TCP Connection to localhost:1666 failed.
Connect: 127.0.0.1:1666 : Connection refused.
Please someone guide me in this regard. Thank you in advance. :)
There are some formatting problems with that web page. Try these commands instead:
Set up the path and port variables:
export PATH=~/perforce:$PATH
export P4PORT=1666
Set executable bits on p4d and p4 and start p4d in its default configuration
cd ~/perforce
chmod a+x p4d
p4d -d
chmod a+x p4
Create a test directory for your workspace and initialize the client
mkdir ~/myws
cd ~/myws
p4 client myws
I think they accidentally reformatted the page, so the line breaks were missing.

Resources