QT PY ESP32-S3 WiFi Test fails - can't fetch data - wifi

I am experienced in Arduino programming but pretty new to CircuitPython, so I would like to ask if anyone could help me with the following issue:
I am using an Adafruit QT Py ESP32-S3 board with CircuitPython on it. I want to try fetching data from the web with the CircuitPython Internet Test script from Adafruit
I followed the instructions there (created a secrets.py file etc) and also copied the library file adafruit_requests.mpy into the lib folder of my board's USB drive.
When I execute the code, the board is able to connect to my WiFi, but it does not proceed to fetch the data from websites. Instead, the request runs into a timeout with the error message OutOfRetries: Repeated socket failures.
The strange thing: the websites are all working via a browser (so my Internet access is ok).
I am using Mu as an editor. The prompt of the Serial Console looks like that:
ESP32-S2 WebClient Test
My MAC addr: ['0xf4', '0x12', '0xfa', '0x44', '0xd', '0x1c']
Available WiFi networks:
E.E.M.M.S RSSI: -75 Channel: 6
HmmmSchorlee RSSI: -87 Channel: 6
LiveFreeAndEqual RSSI: -93 Channel: 6
GetYourOwnWifi RSSI: -93 Channel: 6
EasyBox-A97322 RSSI: -84 Channel: 1
WLAN-843096 RSSI: -93 Channel: 11
Connecting to GetYourOwnWifi
Connected to GetYourOwnWifi!
My IP address is 192.168.179.19
Ping google.com: 0.000000 ms
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
Zurückverfolgung (jüngste Aufforderung zuletzt):
Datei "code.py", Zeile 45, in <module>
Datei "adafruit_requests.py", Zeile 723, in get
Datei "adafruit_requests.py", Zeile 688, in request
OutOfRetries: Repeated socket failures
Programm wird ausgeführt.
Adafruit CircuitPython 7.3.1 on 2022-06-22; Adafruit QT Py ESP32-S3 no psram with ESP32S3
I tried to exchange the first website http://wifitest.adafruit.com/testwifi/index.html to my own website https://www.becke-stauner.de. Then I get the following error: OSError: -2
Zurückverfolgung (jüngste Aufforderung zuletzt):
Datei "code.py", Zeile 45, in <module>
Datei "adafruit_requests.py", Zeile 723, in get
Datei "adafruit_requests.py", Zeile 664, in request
Datei "adafruit_requests.py", Zeile 506, in _get_socket
OSError: -2
Does anyone have a clue what could be wrong or how can I debug that error further?
Thank you very much for your help!
greetings,
Vinzenz

Related

Trouble with minimqtt and CircuitPython

I have been unable to connect to io.adafruit by mqtt, and I wonder if it is the minimqtt library. I am using the stock example code on github.
Example code: here
Board: Adafruit Esp32-S2 Feather
Firmware: CircuitPython 7.3.2
Secrets File:
secrets = {
'ssid' : '[deleted]',
'password' : '[deleted]',
'aio_username' : '[deleted]',
'aio_key' : '[deleted]',
'timezone' : "America/New_York", # http://worldtimeapi.org/timezones
'broker' : 'io.adafruit.com',
'port' : 1883
}
Output:
Connecting to [home network]
Connected to [home network]!
Attempting to connect to io.adafruit.com
Traceback (most recent call last):
File "code.py", line 97, in
File "adafruit_minimqtt/adafruit_minimqtt.py", line 441, in connect
File "adafruit_minimqtt/adafruit_minimqtt.py", line 254, in _get_connect_socket
TypeError: extra positional arguments given
I was having similar errors using the Unexpected Maker ESP32-S2 as well.
Possibly related github issues? #3836, #4394

Coral Dev Board Windows 10 setup

I followed the windows host instructions described in the https://coral.ai/docs/dev-board/get-started/
When I run command mdt devices, I get following exception always:
$ mdt devices
Traceback (most recent call last):
File "c:\users\ram\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\ram\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Ram\AppData\Roaming\Python\Python38\Scripts\mdt.exe\__main__.py", line 7, in
<module>
File "C:\Users\Ram\AppData\Roaming\Python\Python38\site-packages\mdt\main.py", line 162, in
main
exit(command.run(sys.argv[1:]))
File "C:\Users\Ram\AppData\Roaming\Python\Python38\site-packages\mdt\devices.py", line 43, i
n run
self.discoverer.discover()
File "C:\Users\Ram\AppData\Roaming\Python\Python38\site-packages\mdt\discoverer.py", line 40
, in discover
self.zeroconf = Zeroconf()
File "C:\Users\Ram\AppData\Roaming\Python\Python38\site-packages\zeroconf\__init__.py", line
2508, in __init__
self._listen_socket, self._respond_sockets = create_sockets(
File "C:\Users\Ram\AppData\Roaming\Python\Python38\site-packages\zeroconf\__init__.py", line
2343, in create_sockets
respond_socket = new_respond_socket(i, apple_p2p=apple_p2p)
File "C:\Users\Ram\AppData\Roaming\Python\Python38\site-packages\zeroconf\__init__.py", line
2302, in new_respond_socket
respond_socket = new_socket(
File "C:\Users\Ram\AppData\Roaming\Python\Python38\site-packages\zeroconf\__init__.py", line
2250, in new_socket
s.bind((bind_addr[0], port, *bind_addr[1:]))
OSError: [WinError 10049] The requested address is not valid in its context
Versions of my set up:
$ python --version
Python 3.8.5
$ mdt version
MDT version 1.5.2
Can you please help me to resolve this issue?
The same happened to me. Skipping some IP addresses solved the issue. Try this code:
import logging
import zeroconf
import ifaddr
for adapter in ifaddr.get_adapters():
print("IPs of network adapter ", adapter.nice_name)
for ip in adapter.ips:
print(" %s/%s", ip.ip, ip.network_prefix)
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("zeroconf").setLevel(level=logging.DEBUG)
z = zeroconf.Zeroconf()
From the log, find
INFO:zeroconf:Address not available when adding XXX.XXX.XX.XX to multicast group, it is expected to happen on some systems
Along with the Zeroconf log, there should be a list of ip addresses and names. Please find the name of the hardware that is causing the problem.
Now, open zeroconf/__init__.py and goto get_all_addresses() and replace the code with below
adapters = [x for x in ifaddr.get_adapters()
if not "Microsoft Wi-Fi Direct Virtual Adapter" in x.nice_name
and not "Bluetooth Device" in x.nice_name]
return list(set(addr.ip for iface in adapters for addr in iface.ips if addr.is_IPv4))
Please replace the "Microsoft Wi-Fi Direct Virtual Adapter" and "Bluetooth Device" with the appropriate name.
This is not a neat way, so I'd be open to better answers.

How to Connect SAP BW DataSource to IBM Cognos Analytics

I am trying to set up a SAP BW DataSource in my IBM Cognos Analytics Enviroment. First of all what I did was:
installed IBM Cognos Analytics via EASY INSTALL
configured the Cognos Analytics Enviroment vir IBM Cognos Configuration
installed SAP GUI 7.50
set up the DataSource Connection to my SAP BW System
If I test the Connection, I get the following Error:
For dynamic query mode: Handler-Traceback: [the_dispatcher] com.cognos.pogo.handlers.performance.PerformanceIndicationHandler [the_dispatcher] com.cognos.pogo.handlers.logic.ChainHandler [service_lookup] com.cognos.pogo.handlers.engine.ServiceLookupHandler [load_balancer] com.cognos.pogo.handlers.logic.ChainHandler [wrapped_lb_forwarder] com.cognos.pogo.auth.NewAuthHandler [lb_forwarder] com.cognos.p2plb.clerver.LoadBalanceHandler [queryChainHandler] com.cognos.pogo.handlers.logic.ChainHandler [queryAsyncHandler] com.cognos.pogo.async.impl.AsyncHandler [queryServiceHandler] com.cognos.xqebifw.cubingservices.CubingServicesHandler
Can anybody help me solve this Problem? Do I need to prepare the SAP System, or do I have to set up any RFC connection?
Also the configuration of the SAP BW namespace ends up in an error:
['SAP BW Admin']
[ FEHLER ] AAA-LPS-0005 Keine Kommunikation mit Vorgänger-Namespace-Server möglich. Er ist möglicherweise nicht mehr verfügbar. Versuchen Sie es später erneut.
[ FEHLER ] java.io.IOException: Failed to send HTTP request or read HTTP response
[ FEHLER ] java.net.SocketException: Connection reset
['SAP BW Admin']
[ FEHLER ] AAA-AUT-0013 Der Benutzer ist bereits in allen verfügbaren Namespaces authentifiziert.
COGNOS BI should fully work with SAP BW.
Setting up the Namespace for SAP BW is in my eyes a bit strange. You should consider not to do it.
For Setting up a datasource for COGNOS ANALYTICS you Need the 64 bit RFC from SAP. A SAP GUI Installation won't help alone.

Intel Edison + Ubilinux + USB to UART = USB Device not created

Dear community members,
We are working in the development of a robot autonomous control system running inside an Intel Edison, which -in turn- runs in a PixHawk automatic pilot module . This system uses ROS (Robot Operating System) and therefore we had to install Ubilinux. Our system requires being connected with a 360-degree laser (RPLIDAR-360) that sends data through a serial channel, so we are trying to get laser's data through USB-to-UART adapter (Silicon lab's CP2102) (the PixHawk only has a USB available for data transfer).
In summary, the laser is connected to the USB2UART adapter, and the adapter is connected to Edison's serial port.
However, we are stuck with some kind of driver issue. When tracing 'dmesg' the device is detected (idVendor=10c4, idProduct=ea60):
[ 917.812195] usb usb2: Product: xHCI Host Controller
[ 917.812214] usb usb2: Manufacturer: Linux 3.10.17-yocto-standard-r2 dwc-xhci
[ 917.812232] usb usb2: SerialNumber: dwc3-host.2
[ 917.812858] xHCI xhci_add_endpoint called for root hub
[ 917.812878] xHCI xhci_check_bandwidth called for root hub
[ 917.813141] hub 2-0:1.0: USB hub found
[ 917.813185] hub 2-0:1.0: 1 port detected
[ 918.128982] usb 1-1: new full-speed USB device number 2 using dwc3-host
[ 918.151786] usb 1-1: New USB device found, idVendor=10c4, idProduct=ea60
[ 918.151818] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 918.151839] usb 1-1: Product: CP2102 USB to UART Bridge Controller
[ 918.151857] usb 1-1: Manufacturer: Silicon Labs
[ 918.151875] usb 1-1: SerialNumber: 0001
With the following details:
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=10c4 ProdID=ea60 Rev= 1.00
S: Manufacturer=Silicon Labs
S: Product=CP2102 USB to UART Bridge Controller
S: SerialNumber=0001
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
But no /dev/ttyUSBX device is created, and there are no error messages about missing Drivers or configuration failures.
We are using Ubilinux 3, which reports the following with the 'uname' command:
** 3.10.17-yocto-standard-r2
And the following is the listing of the installed drivers:
usb
/lib/modules/3.10.17-yocto-standard-r2/kernel/drivers/media/usb:
/lib/modules/3.10.17-yocto-standard-r2/kernel/drivers/media/usb/gspca:
/lib/modules/3.10.17-yocto-standard-r2/kernel/drivers/media/usb/uvc:
/lib/modules/3.10.17-yocto-standard-r2/kernel/drivers/usb:
/lib/modules/3.10.17-yocto-standard-r2/kernel/drivers/usb/gadget:
usb_f_acm.ko
/lib/modules/3.10.17-yocto-standard-r2/kernel/drivers/usb/serial:
usb_wwan.ko
Does anyone has had a similar configuration and managed to make work a CP2102 adapter?
As a last resort, we are trying to compile and install the driver by ourselves, using this reference: [url=https://askubuntu.com/questions/941594/installing-cp210x-driver]Installing CP210x Driver?Installing CP210x Driver? - Ask Ubuntu[/url]
The 'make' process crashes due to a lack of headers. We were unable to download the headers through APT, but at the end, we managed to compile the '.ko' module by downloading the headers manually from a Website.
However, after doing:
insmod cp210x.ko
We got:
Insmod: ERROR: could not insert module cp210x.ko: Invalid module format
So, at this point we have several questions... any advice about any of them would be really appreciated:
Does anybody know how to install the Kernel headers in Ubilinux - 3.10.17?
What is the official procedure to upgrade the Kernel in Ubilinux?, we already have ROS working on the board... do you think a kernel upgrade could mess our ROS configuration?
In general, do you have any successful experience in the configuration of a cp210x device?
Thanks in advance,
Héctor
The driver for cp2102 already exist in kernel, no need of extra efforts. Just use the correct udev rule file (not present by default in linux distro). An example is here. With this file /dev/ttyUSBX will be created.

ESP8266 AT commands working but Fatal on NodeMCU

Hardware: ESP8266-1
Settings in IDE
Module: ESP8266-1
Flash Size: 4MB
Flash Mode: DIO
Flash Speed: 40Mhz
Upload Using: Arduino FTDI Serial
Firmware installed :
nodemcu_integer_0.9.5_20150318.bin : 0X00000
(Also tried with latest firmware nodemcu_integer_0.9.6-dev_20150627.bin)
Error : (Esplorer)
PORT OPEN 115200
Communication with MCU…
……….
……….
Got answer! AutoDetect firmware…
Communication with MCU established.
Can’t autodetect firmware, because proper answer not received (may be unknown firmware).
Please, reset module or continue.
Fatal exception (0):
epc1=0x40210880, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
epc1=0x40210880, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
PS : I'm using a separate 3.3V power supply from beaglebone.
I'm able to flash the module with NoduMCU (above settings without any error)
Module works fine with AT commands
boot_v1.6.bin : 0X00000
esp_init_data_default.bin : 0XFC000
blank.bin : 0XFE000
user1.1024.new.2.bin : 0x1000
But not able to program Lua in my module.
Please help!!!

Resources