Go Down

Topic: Serial1 disables when on WiFi? (Read 384 times) previous topic - next topic

drakerex

I may be mistaking the way this is supposed to work. Not certain.

When I try to capture any data on pin 13 using Serial1 and I call WiFi.config, data stops.

Serial1 works perfectly without wifi enabled. Wifi works perfectly regardless.

Are the RX and TX pins (13 and 14) disabled during the WiFi usage?

I don't see anything bound in variant.cpp, but I may be reading it incorrectly.

-drr

Juraj

Esp32 is connected to Serial1. the serial connection is used to update the Esp32 firmware
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

drakerex

That would explain the image upload lag with a sensor plugged in. Thanks.

Juraj

#3
Oct 16, 2018, 09:28 pm Last Edit: Oct 16, 2018, 09:46 pm by Juraj
That would explain the image upload lag with a sensor plugged in. Thanks.
please, explain. what image upload? what sensor?

the firmware doesn't listen on esp32 UART connected to Serial1, so it should not be disturbed
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

drakerex

Referring to uploading the sketch and having an RFID sensor plugged in. When WiFi is enabled Serial1 isn't usable. Uploading the sketch with the RFID head plugged into pin 13 gives you a 50% chance for it to upload.

I'm specifically trying to read data from an ID-12LA rfid head on Serial1 since SoftwareSerial isn't implemented. It works, if you don't use WiFi. Serial1 reads the sensor just fine (just not with wireless).

I'm going to just figure out how to Sercom some extra ports. I tried a couple variations and wasn't able to read anything.

-drr

sandeepmistry

Would you be able to share your sketch?

Have you tried to move the Serial1.begin(...) after WiFi.begin(....) ?

drakerex

You're the man Sandeep. :) I was calling serial1 prior to wifi. Now it connects wifi and then last reads RFID via hardware Serial1 on pin 13. Thanks a bunch. :)

Juraj

You're the man Sandeep. :) I was calling serial1 prior to wifi. Now it connects wifi and then last reads RFID via hardware Serial1 on pin 13. Thanks a bunch. :)
@sandeepmistry, please explain why the order matters
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

sandeepmistry

The order matters because the WiFiNINA library enables and resets the NINA module. The ESP32 boot ROM is listening for messages the it's UART which is connected to the same pins as the Serial1 pins.

I suspect this causes the NINA to not boot the Arduino firmware, causing communication with the WiFiNINA library to fail.

Go Up