I'm migrating a working firmware from ArduinoIDE to PlatformIO. During the change I found out that UIPEthernet was replaced by a native lwip lib for ENC28j60. That's great! I tried and it works very nicely. My ENC connection is way faster now, but there's a problem:
I can't find a way to make WiFi work when ethernet is initialized. I can run the ENC library and use the asyncWebServer (https://github.com/khoih-prog/ESPAsyncWebServer) very smoothly. The whole thing also works well with WiFi, even with SoftAP but only individually. ETH and Wifi don't work together because after calling:
eth.begin(ethMac)
Wifi do not work properly anymore. Not even ping works once eth is started. The ETH interface keeps working properly, it's only WiFi that breaks.
The calls:
WiFi.softAP()
WiFi.begin()
WiFi.WiFi.softAPIP()
WiFi.localIP()
all return true, but there's no connection (on SoftAP the network doesn't show up). The old UIPethernet was able to coexist with WiFi but the new LwIP apparently cannot.
Any light from you ESP/Arduino masters will be super appreciated!
Some details about the environment:
Hardware: ESP8266
Framework: framework-arduinoespressif8266 3.30002.0 (3.0.2)
Core Version: Espressif 8266 (4.0.1)
Development Env: Platformio
Operating System: Windows10
Module: WEMOS D1 R1
lwip lib: lwIP_enc28j60 # 1
Related
I am trying to establish a connection between my MacBook Pro and Arduino Uno WiFi Rev 2 using BLE.
Adruino provides a BLE library. I have installed the adafruit_ble library on the laptop since I want to work in Python. But I continue to get a "NotImplemented" error in my python code when I try to commence "advertising". (I have another question about this on this site).
I have begun to wonder if the MacBook may not support BLE. But how can this be if my laptop easily communicates with my iPhone?
I have been able to connect the two machines over my home WiFi but my project will be deployed in the field and WiFi will not be available.
I recently got an Arduino board (Portenta H7). I would like to load programs with the arduino ide on the controller, which has worked well so far. Since this morning it no longer works, because the usb port is no longer recognized. I have already changed the cable and also reinstalled the drivers.
When i connect the board to the Mac the previously loaded program is played.
Does anyone know what could be the reason for this ?
thank you very much.
Hi I think I found the solution working for me.
I use D-link USB-C to USB HMI and Ethernet hub, connect normal USB to USB-C wire and it connected to the MacBook and Arduino IDE is able to program it :-)
I think with other USB hub will also work.
Jacob
I am trying to get a simple Serial Port connection between dotnet 5 and a Marlin based printer board which is running some variant of a micro controller (LPC1768FBD100 https://www.arrow.com/en/products/lpc1768fbd100551/nxp-semiconductors).
I can open a connection to the board using other tools, send a "M503\n" command and receive a response, the tools I've used successfully are
Pronterface (Windows)
Arduino Serial Monitor (Windows)
miniterm (Linux)
putty (Windows)
So I know the board to be functioning correct in both Linux and Windows, but when attempting from .net, I am yet to succeed in getting any response back from the board. I have uploaded a simple tool in .net 5 that connects to a serial port and allows you to TX / RX strings,
https://github.com/devoctomy/SerialPortTester
I have tested this code in Windows and Linux, same port settings, no response back. I have also tested this exact code against a simple echo program running on an Arduino Uno board and it all works as expected, but for the life of me I can't get anything back from the other board.
I'm wondering if there's something about serial comms that these other apps are doing that I just don't know about. I'm using the same port settings which are shown in device manager across the board when testing in Windows, and also the same settings when testing in Linux.
In Linux the board comes up as ttyACM0, which is how my Arduino Uno is also mounted.
Any suggestions? I'm sure this isn't a "Marlin" issue, as only one of the other tools I've tested with is specific for Marlin and the Arduino serial monitor is about as basic as you can get. There's something I'm not doing in the .net code I think...
I've also tried someone elses old .net code and it also doesn't get a response back from this board, but does from my Arduino Uno running the echo program.
https://www.codeproject.com/Articles/23656/Termie-A-Simple-RS232-Terminal
Nick.
Edit:
I'm currently looking to see if it's just .net and the underlying mechanisms that is effected here and have found this page,
https://www.sparxeng.com/blog/software/must-use-net-system-io-ports-serialport
I've modified my tester code to access to base stream for sending / receiving data just in-case, but this has not fixed the issue.
Okay I got it, I knew I was missing something,
port.DtrEnable = true;
This fixes it and now I'm receiving and sending data to the Marlin board.
recently I started using my arduino again, but it can no longer run sketches or anything. All I get is this error:
processing.app.debug.RunnerException at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:152)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
at processing.app.SketchController.upload(SketchController.java:732)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$UploadHandler.run(Editor.java:2047)
at java.lang.Thread.run(Thread.java:748)
Caused by: processing.app.SerialException: Error touching serial port 'COM4'.
at processing.app.Serial.touchForCDCReset(Serial.java:107)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:136)
... 5 more
Caused by: jssc.SerialPortException: Port name - COM4; Method name - openPort(); Exception type - Port busy.
at jssc.SerialPort.openPort(SerialPort.java:164)
at processing.app.Serial.touchForCDCReset(Serial.java:101)
... 6 more
I tried restarting pc, using different port, stopping other devices in device manager from using the port, reinstalling the IDE, and more.
nothing works.
It cant even run blink without throwing this error.
I am using windows 10 pc, Arduino MKR WIFI 1010 , with a usb 3.0 cable, the Arduino used to work too.
none of the other answers on the internet has worked for me.
could this be a problem? ->
EDIT: I figured out what was wrong. the cable I was connecting to my arduino and computer was ONLY a charging cable, it had no ability to send serial data across to the arduino
this can happen if you have other stuff connected to your arduino that sends or receives data, like a bluetooth module.
Try disconnecting everything from the board and resetting the board, then connect the usb to your arduino
The issue was I was using the wrong type of cable for connecting my arduino to computer
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