@Lazar-Demin So to program the Arduino Dock v2 we need an external programmer?
Posts made by jonty
-
RE: Arduino Dock - avrdude: AVR device not responding
-
Omega2: pip3 requests - Out of Memory
I have an Omega2 running the latest firmware version 0.3.2 (b233).
I followed the Boot from External Storage to increase the Omega's storage capacity.
I tried to install the Python
requests
module usingpip3
. But I get the following memory errors:Do I need to follow the Extend the Available Memory guide in order to fix this issue?
-
Boot from External Storage - Can't create /fstab: Read-only file system
I'm trying to Boot from an External Storage USB Drive on my Omega2 running the latest firmware(v233).
When I try to generate the device’s
fstab
entry usingblock-mount
:
block detect > /etc/config/fstab
, I get the following error:can't create /etc/config/fstab: Read-only file system
What could be the reason for this and is there a way to fix this?
-
RE: AWS IoT Python SDK v2 Installation
@crispyoz Interesting. I got the Omega2 so I'll have to make do with a single USB drive.
-
RE: AWS IoT Python SDK v2 Installation
@Lazar-Demin Can I perform both methods on the same USB drive thereby extending both the storage and the memory of the Omega?
-
RE: AWS IoT Python SDK v2 Installation
@Lazar-Demin I had extended my Omega's memory by following the Boot from external storage because I ran out of memory when I tried to install
python3
andpip
packages.Will I be able to install those packages if I follow the extend the available memory with a swap file guide?
Also is it possible to install AWS IoT Python SDK v2 on the Omega2 with this method?
-
RE: AWS IoT Python SDK v2 Installation
I also tried installing the AWS IoT Python SDK v1 using
pip3 install AWSIoTPythonSDK
but I get the following error:
even though I have extended my Omega's memory with a 4GB USB drive.Essentially I want to install and run either v1 or v2 of the AWS IoT Python SDK on my Omega2 running the latest firmware. Has anyone managed to do it successfully?
-
AWS IoT Python SDK v2 Installation
Has anyone managed to install the AWS IoT Python SDK v2 on the Omega2?
I tried to install it from PyPI using
python3 -m pip install awsiotsdk
but I keep getting the following error:Collecting awsiotsdk Downloading https://files.pythonhosted.org/packages/55/d1/239722d8cea8e3a1c4a822a7f90e09961e1863a75e64a2227ac96653b16d/awsiotsdk-1.5.6-py3-none-any.whl Collecting awscrt==0.10.7 (from awsiotsdk) Downloading https://files.pythonhosted.org/packages/8c/33/8d8a4ccce58eaccfac2321c6111226693d84c6b9ef485bcaf42dc1d3bd6f/awscrt-0.10.7.tar.gz (2.8MB) 54% |█████████████████▍ | 1.5MB 697bytes/s eta 0:31:03Bus error
It seems like it's got something to do with the lack of availability of the precompiled wheels for the Omega.
AWS recommends installing the following packages if we encounter the precompiled wheels issue mentioned above:
sudo apt-get update sudo apt-get install cmake sudo apt-get install libssl-dev
But since the Omega uses opkg package installer instead of apt-get and OpenWRT doesn't support
cmake
andlibssl-dev
, I haven't managed to find something that works with the Omega system.Is there a way to fix these issues and get the AWS IoT Python SDK to work with my Omega2?
-
RE: Arduino Dock - avrdude: AVR device not responding
SOLVED:
I just made sure it was running the latest firmware and ran the package installation steps again:opkg update opkg install arduino-dock-2
-
Arduino Dock - avrdude: AVR device not responding
I have an Onion Omega2 running the latest firmware version. 0.3.2 (b233) which is connected to the Arduino Dock 2.
I followed the Flashing the Arduino Dock tutorial.
But when I try to run the Blinky sketch, I get the following error:
I had a look at the Known Firmware Issues document. Is this the same problem caused by the Cannot flash Arduino Dock if arduino-dock-2 is installed when LEDE package repos are active issue?
If it is the same issue, I would need to resolve it using Option 2: If already Installed. But one of the steps is: deactivate the LEDE package repos by commenting them out in. My question is how do I identify the LEDE packages that need to be commented out from the list of packages? -
sudo apt get commands on Omega2
I need to install some packages using the sudo apt-get commands.
But none of these commands work. Is there a way to get these commands to work on the Omega2? -
RE: Code Editor not showing filesystem folders
@crispyoz Is it normal for the Omega storage expansion steps to be undone due to the firmware update?
-
RE: Code Editor not showing filesystem folders
I managed to fix this issue by updating the firmware using the Legacy Console app.
But this undid the USB drive memory extension steps that I had performed earlier. -
Code Editor not showing filesystem folders
I have an Onion Omega2.
I followed this guide to expand my Omega's storage capacity using a 4GB USB drive connected to the Arduino Dock.
The mounting process seems to have worked properly:But when I use the Code Editor, I can no longer see the Folders/Directories within the
/
directory:
This makes it impossible for me to create New Folders/Files and use the Code Editor to edit files.
I previously had an Omega2+ and had used the same guide to expand the storage using a MicroSD card instead and I did not face this problem with the Code Editor.
-
RE: Python Socket Server/Client Error
@crispyoz Thanks a lot. Your solution worked.
Since the Server contained a
while()
loop and never closed the connection if I terminated(CTRL+Z
) the python program, it would produce this error, when I run the Server again:File "server.py", line 17, in <module> s.bind(('', port)) OSError: [Errno 125] Address in use
The fix is to lookup the process that's still using the port
lsof
- Gives a list of active processes with their PID numbers.
kill -9 <PID>
- Will kill the process. -
RE: Python Socket Server/Client Error
@crispyoz said in Python Socket Server/Client Error:
Did you update the client code to use the specific port 9090?
Even after updating the client code to use the specific port 9090, it returns the same WinError10061
# Import socket module import socket # Create a socket object s = socket.socket() # Define the port on which you want to connect port = 9090 # connect to the server on local computer s.connect(('127.0.0.1', port)) # receive data from the server print (s.recv(1024) ) # close the connection s.close()
python client.py Traceback (most recent call last): File "client.py", line 11, in <module> s.connect(('127.0.0.1', port)) ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
-
RE: Python Socket Server/Client Error
I made the changes you recommended.
When I run the Server script, I get the following output:Socket successfully created socket binded to 9090 socket is listening
But I keep getting the previous error (WinError 10061) as mentioned earlier with the Client script.
I was trying to view the list of open processes using the
lsof
command, but that doesn't work. So I'm not even sure about which process to kill. -
Python Socket Server/Client Error
I have installed Python 3 on my Omega2+ board.
I'm trying to use the Python Socket library to create a simple socket communication server/client setup between my Omega2+(server) and Windows laptop(client).
I have been using the example code given here:
Server:# first of all import the socket library import socket # next create a socket object s = socket.socket() print ("Socket successfully created") # reserve a port on your computer in our # case it is 12345 but it can be anything port = 12345 # Next bind to the port # we have not typed any ip in the ip field # instead we have inputted an empty string # this makes the server listen to requests # coming from other computers on the network s.bind(('', port)) print ("socket binded to %s" %(port)) # put the socket into listening mode s.listen(5) print ("socket is listening") # a forever loop until we interrupt it or # an error occurs while True: # Establish connection with client. c, addr = s.accept() print ('Got connection from', addr ) # send a thank you message to the client. c.send('Thank you for connecting') # Close the connection with the client c.close()
Client:
# Import socket module import socket # Create a socket object s = socket.socket() # Define the port on which you want to connect port = 12345 # connect to the server on local computer s.connect(('127.0.0.1', port)) # receive data from the server print (s.recv(1024) ) # close the connection s.close()
I run the server script first followed by the client script but each returns a different error:
Server Error:
File "server.py", line 17, in <module> s.bind(('', port)) OSError: [Errno 125] Address in use
Client Error:
File "client.py", line 11, in <module> s.connect(('127.0.0.1', port)) ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
For the server error, I read on some other forums that suggest killing other processes that use this port. But none of the terminal commands to kill processes seem to work with the Omega2+.
Another suggestion is to change the port number. I've tried this but I seem to get the same error.
I was hoping someone would have encountered similar problems and would be aware of some sort of solution.