I am having issues with USB local serial connection. I've been using the myFP2ESP in Access Point without problems for some time, but it would be convenient for my setup to use it through USB. However, I can't connect. I have tried to connect at the default speed of 57600 bps, and also at 19200 (changing the local serial speed from the code also to match it), with no luck.
Is it mandatory to reset the ESP32 before connection? Because I was using an old DSLR, I modified the esp32 so it cannot be reset through the RTS pin, which was soldered to another pin which I used for camera shutter control. I could rewire the RTS pin if needed, but I'm not sure if this is the issue or maybe is another thing (I am clearing the option reset before connection in the myFP2 windows app).
I attach the logs, which first connect at 57600 and alter at 19200. It seems to me that it somehow connects but then it is unable to communicate, as if I try with other COM ports the error is different.
Hi
The logs show that the connection failed.
Please let me know the firmware revision you are using
I also need the focuserconfig.h file
Some things you can check immediately - if this works no need for any files.
In the myFP2ESP.ino file make sure that the start of setup() looks like (the first serial.begin(115200) is commented out
void setup()
{
//Serial.begin(115200);
The connection speed will be 57600 unless the moonlite protocol was enabled (in which case it is 9600).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for this info - I finally got my focuser working in localserial mode by following this answer (comment out the serial.begin(115200) ).
Should it be commented out in the source code, or is it needed in one of the other modes?
Thanks also for a great project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The line at the start of setup() was uncommented, so I understand that it blocked the com port. Now it works perfectly.
I am using the last version 230.
Now I can't find how to enable the temperature probe since the management service is stopped for local serial connection. Anyway, I think I'll stay with the wifi connection and forget about problems.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Now I can't find how to enable the temperature probe since the management service is stopped for local serial connection.
To do that - enable the temperature probe when controller is running local serial,
The trick would be to first program as an AP, upload the data sketch files, then connect to it with the windows app and set the temperature probe on. This would save the probe state into the data_per.jsn file
Then reprogram as a local serial and do not upload the sketch data files. By not uploading the sketch files, the controller will read from the prior data_per.jsn file, and start the temperature probe,
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, Wifi is unavailable when LOCALSERIAL is used. Its asking a bit much of the ESP32 to handle both.
I normally have that Serial.begin as first statement in setup() because when working in WiFi i can send some debug data out to the serial port when writing/modifying code. I forgot to disable it when posting the last firmware.
Strange about the AP though, that may be a network issue rather than a firmware issue.
For myself, I have a computer that has both Ethernet and Wifi ports.
I use my Ethernet port to connect to my LAN at 192.168.2.x
Then I use my WiFi port to connect to 192.168.4.1
If you only have 1 network adapter on your computer you cannot do that though.
Cheers
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
First of all, thanks for this awesome project.
I am having issues with USB local serial connection. I've been using the myFP2ESP in Access Point without problems for some time, but it would be convenient for my setup to use it through USB. However, I can't connect. I have tried to connect at the default speed of 57600 bps, and also at 19200 (changing the local serial speed from the code also to match it), with no luck.
Is it mandatory to reset the ESP32 before connection? Because I was using an old DSLR, I modified the esp32 so it cannot be reset through the RTS pin, which was soldered to another pin which I used for camera shutter control. I could rewire the RTS pin if needed, but I'm not sure if this is the issue or maybe is another thing (I am clearing the option reset before connection in the myFP2 windows app).
I attach the logs, which first connect at 57600 and alter at 19200. It seems to me that it somehow connects but then it is unable to communicate, as if I try with other COM ports the error is different.
Many thanks!
Hi
The logs show that the connection failed.
Please let me know the firmware revision you are using
I also need the focuserconfig.h file
Some things you can check immediately - if this works no need for any files.
In the myFP2ESP.ino file make sure that the start of setup() looks like (the first serial.begin(115200) is commented out
The connection speed will be 57600 unless the moonlite protocol was enabled (in which case it is 9600).
Thanks for this info - I finally got my focuser working in localserial mode by following this answer (comment out the serial.begin(115200) ).
Should it be commented out in the source code, or is it needed in one of the other modes?
Thanks also for a great project.
Thanks for the fast answer.
The line at the start of setup() was uncommented, so I understand that it blocked the com port. Now it works perfectly.
I am using the last version 230.
Now I can't find how to enable the temperature probe since the management service is stopped for local serial connection. Anyway, I think I'll stay with the wifi connection and forget about problems.
Thanks
Now I can't find how to enable the temperature probe since the management service is stopped for local serial connection.
To do that - enable the temperature probe when controller is running local serial,
The trick would be to first program as an AP, upload the data sketch files, then connect to it with the windows app and set the temperature probe on. This would save the probe state into the data_per.jsn file
Then reprogram as a local serial and do not upload the sketch data files. By not uploading the sketch files, the controller will read from the prior data_per.jsn file, and start the temperature probe,
I also noted that when working in Access Point mode, my laptop couldn't obtain an IP so I had to change from myFP2ESP.ino:
int staticip = STATICIPON;
//int staticip = STATICIPOFF;
And then it connects flawlessly.
Yes, Wifi is unavailable when LOCALSERIAL is used. Its asking a bit much of the ESP32 to handle both.
I normally have that Serial.begin as first statement in setup() because when working in WiFi i can send some debug data out to the serial port when writing/modifying code. I forgot to disable it when posting the last firmware.
Strange about the AP though, that may be a network issue rather than a firmware issue.
For myself, I have a computer that has both Ethernet and Wifi ports.
I use my Ethernet port to connect to my LAN at 192.168.2.x
Then I use my WiFi port to connect to 192.168.4.1
If you only have 1 network adapter on your computer you cannot do that though.
Cheers
Robert