Topics

Ramps14 & GPS Neo-7M Firmware Problem


mennsylv@...
 
Edited

Hello,

I am testing Onstep on Ramps14.

Everything works except the GPS.  I tested the GPS, it works perfectly.

In Config.h I added the following lines:

// TIME AND LOCATION -------------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#TLS
#define TIME_LOCATION_SOURCE          GPS //    OFF, DS3231 (I2c,) DS3234 (Spi,) TEENSY (T3.2 internal,) or GPS source.       Option
                                                                                //         Provides Date/Time, and if available, PPS & Lat/Long also.
#define SerialGPS                                     SerialC //
#define SerialGPSBaud                                9600 //

 But when compiling I get an error in Onstep.ino line 506:

/Users/sylvain/Library/Mobile Documents/com~apple~CloudDocs/Astro/Projet OnStep/OnStep-master/OnStep/OnStep.ino: In function 'void loop2()':
OnStep:506:17: error: 'class pserial2' has no member named 'end'; did you mean 'read'?
       SerialGPS.end();
                 ^~~
                 read
exit status 1
'class pserial2' has no member named 'end'; did you mean 'read'?


// 0.01S POLLING -------------------------------------------------------------------------------------

#if TIME_LOCATION_SOURCE == GPS

    if ((PPS_SENSE == OFF || ppsSynced) && !tls.active && tls.poll()) {

      SerialGPS.end();

      currentSite=0; nv.update(EE_currentSite,currentSite);


Do you know this problem ?

Sylvain


Howard Dutton
 

Using "SerialC" etc for this:

Correct, you can't do that on a Mega2560 OnStep.  Sometimes you can on others, but shouldn't.  And make sure the command channel associated with SerialC is OFF.

#define SerialGPS                 Serial2 //
#define SerialGPSBaud                9600 //


Howard Dutton
 

On Sat, Sep 12, 2020 at 05:54 AM, Howard Dutton wrote:
And make sure the command channel associated with SerialC is OFF.
Note this is because SerialC is really Serial2 (in this case) and it would attempt to process the GPS output as LX200 commands... which will fail and also mess up the stream of serial data going to the GPS NMEA decoder.


Howard Dutton
 

On Sat, Sep 12, 2020 at 05:58 AM, Howard Dutton wrote:
On Sat, Sep 12, 2020 at 05:54 AM, Howard Dutton wrote:
And make sure the command channel associated with SerialC is OFF.
Note this is because SerialC is really Serial2 (in this case) and it would attempt to process the GPS output as LX200 commands... which will fail and also mess up the stream of serial data going to the GPS NMEA decoder.
Well thinking about it more, in this case, it would likely (but not always) refuse to compile for a different reason.


mennsylv@...
 

Witch Serial2 compilation error !!!

// SERIAL PORT COMMAND CHANNELS ------------------------------------ see https://onstep.groups.io/g/main/wiki/6-Configuration#SERIAL
#define SERIAL_A_BAUD_DEFAULT        9600 //   9600, n. Where n=9600,19200,57600,115200 (common baud rates.)                  Infreq
#define SERIAL_B_BAUD_DEFAULT        9600 //   9600, n. See (src/HAL/) for your MCU Serial port # etc.                        Option
#define SERIAL_B_ESP_FLASHING         OFF //    OFF, ON Upload ESP8266 WiFi firmware through SERIAL_B with :ESPFLASH# cmd.    Option
#define SERIAL_C_BAUD_DEFAULT         OFF //    OFF, n, ON for ESP32 Bluetooth.                                               Option
#define SERIAL_C_BLUETOOTH_NAME  "OnStep" // "On..", Bluetooth device name for ESP32.                                         Option
 
// MOUNT TYPE -------------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#MOUNT_TYPE
#define MOUNT_TYPE                    GEM //    GEM, GEM for German Equatorial, FORK for Equatorial Fork, or ALTAZM          <-Req'd
                                          //         Dobsonian etc. mounts. GEM Eq mounts perform meridian flips.
 
// USER FEEDBACK -------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#USER_FEEDBACK
#define LED_STATUS                     ON //     ON, Blinks w/sidereal tracking otherwise steady on indicates activity.       Option
#define LED_STATUS2                   OFF //    OFF, ON Blinks 1s interval w/PPS sync, steady for gotos, off if in standby.   Option
#define LED_RETICLE                    ON //    OFF, n. Where n=0..255 (0..100%) activates feature sets default brightness.   Option
#define BUZZER                         ON //    OFF, ON, n. Where n=100..6000 (Hz freq.) for piezo speaker. ON for buzzer.    Option
#define BUZZER_STATE_DEFAULT           ON //    OFF, ON Start with piezo buzzer/speaker enabled.                              Option
 
// TIME AND LOCATION -------------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#TLS
#define TIME_LOCATION_SOURCE          GPS //    OFF, DS3231 (I2c,) DS3234 (Spi,) TEENSY (T3.2 internal,) or GPS source.       Option
                                          //         Provides Date/Time, and if available, PPS & Lat/Long also.
#define SerialGPS                      Serial2 //
#define SerialGPSBaud                9600 //

Here is the error:

HardwareSerial2.cpp.o (symbol from plugin): In function `Serial2':
(.text+0x0): multiple definition of `__vector_51'
sketch/OnStep.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1
Erreur de compilation pour la carte Arduino Mega or Mega 2560




 


mennsylv@...
 

I give up the gps, I tested master version and version 3.16, even the config.h file made with the online tool does not work.
The GPS only works without problem, the serial 2 of the Ramps14 also works, I tested it with the wifi esp.
I tested serial 2, 3, C, none works.
Sylvain


Howard Dutton
 
Edited

Compiles right up for me no problem (Arduino 1.8.13):

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\Howard\\AppData\\Local\\Temp\\arduino_build_290015/OnStep.ino.elf" "C:\\Users\\Howard\\AppData\\Local\\Temp\\arduino_build_290015/OnStep.ino.hex"
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
Using library EEPROM at version 2.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM
Using library TinyGPSPlus-1.0.2b at version 1.0.2 in folder: C:\Users\Howard\Documents\Arduino\libraries\TinyGPSPlus-1.0.2b
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\Howard\\AppData\\Local\\Temp\\arduino_build_290015/OnStep.ino.elf"
Sketch uses 130476 bytes (51%) of program storage space. Maximum is 253952 bytes.
Global variables use 5832 bytes (71%) of dynamic memory, leaving 2360 bytes for local variables. Maximum is 8192 bytes.

Using Config.h with:

//      Parameter Name              Value   Default  Notes                                                                      Hint
#define PINMAP                    Ramps14 //    OFF, Choose from: MiniPCB, MiniPCB2, MaxPCB, MaxPCB2, STM32Blue,             <-Req'd
                                          //         Ramps14, MaxESP2, MaxESP3. Check Constants.h for more info.

// SERIAL PORT COMMAND CHANNELS ------------------------------------ see https://onstep.groups.io/g/main/wiki/6-Configuration#SERIA
#define SERIAL_A_BAUD_DEFAULT        9600 //   9600, n. Where n=9600,19200,57600,115200 (common baud rates.)                  Infreq
#define SERIAL_B_BAUD_DEFAULT        9600 //   9600, n. See (src/HAL/) for your MCU Serial port # etc.                        Option
#define SERIAL_B_ESP_FLASHING         OFF //    OFF, ON Upload ESP8266 WiFi firmware through SERIAL_B with :ESPFLASH# cmd.    Option
#define SERIAL_C_BAUD_DEFAULT         OFF //    OFF, n, ON for ESP32 Bluetooth.                                               Option
#define SERIAL_C_BLUETOOTH_NAME "OnStep75"// "On..", Bluetooth device name for ESP32.                                         Option

// MOUNT TYPE -------------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#MOUNT_TYPE
#define MOUNT_TYPE                    GEM //    GEM, GEM for German Equatorial, FORK for Equatorial Fork, or ALTAZM          <-Req'd
                                          //         Dobsonian etc. mounts. GEM Eq mounts perform meridian flips.

// USER FEEDBACK -------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#USER_FEEDBACK
#define LED_STATUS                    OFF //     ON, Blinks w/sidereal tracking otherwise steady on indicates activity.       Option
#define LED_STATUS2                   OFF //    OFF, ON Blinks 1s interval w/PPS sync, steady for gotos, off if in standby.   Option
#define LED_RETICLE                   OFF //    OFF, n. Where n=0..255 (0..100%) activates feature sets default brightness.   Option
#define BUZZER                         ON //    OFF, ON, n. Where n=100..6000 (Hz freq.) for piezo speaker. ON for buzzer.    Option
#define BUZZER_STATE_DEFAULT          OFF //    OFF, ON Start with piezo buzzer/speaker enabled.                              Option

// TIME AND LOCATION -------------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#TLS
#define TIME_LOCATION_SOURCE          GPS //    OFF, DS3231 (I2c,) DS3234 (Spi,) TEENSY (T3.2 internal,) or GPS source.       Option
                                          //         Provides Date/Time, and if available, PPS & Lat/Long also.
#define SerialGPS                 Serial3 //
#define SerialGPSBaud                9600 //


mennsylv@...
 

Hello,

I have a lead on the problem.

For compilation with version 3.16, it's OK with:
#define SerialGPS SerialC //
#define SerialGPSBaud 9600 //

But the GPS still does not work.

Except at the first start of the set of boards, just after flashing the wifi board (ESP 12E).

For start-ups following the GPS no longer works.

If I flash the ESP 12E again the GPS will work for once.

I have the impression that the ESP 12E initializes all the serial ports of the Mega 2560 board at a speed not compatible with the GPS.

Sylvain


mennsylv@...
 

I did a lot of tests again, still no GPS jump after the ESP flash, then nothing.
I ordered a MKS GEN L V2, I would test this weekend


mennsylv@...
 

Big mistake on my part, on the MKS there is only one serial port that works, much worse than the Ramp14.

MKS Gen Lxx, Wifi and GPS impossible !!!



Khalid Baheyeldin
 

According to the Wiki page for Gen-L and RAMPS, they both have 3 serial ports.
One is USB, and two available for WiFi/Bluetooth.

https://onstep.groups.io/g/main/wiki/3996

One of the latter can be used for GPS, but OnStep has to be told not to use it
for commands.

It is not clear (to me) from the HAL file.

Howard will comment on how to do this.

In addition to that, you need the following in your Config.h, assuming
you wire the GPS to TX2/RX2. See the image in the Wiki for exactly where:

  #define TIME_LOCATION_SOURCE    GPS
  #define SerialGPS               Serial2
  #define SerialGPSBaud           9600


Howard Dutton
 

The MKS Gen-L boards all need hardware modification to use RX1/TX1.


Khalid Baheyeldin
 

On Fri, Sep 18, 2020 at 12:47 PM, Howard Dutton wrote:
The MKS Gen-L boards all need hardware modification to use RX1/TX1.
Then the Wiki page should be changed. The image should not highlight those two pins.
The writeup also has to change to explicitly say so.


mennsylv@...
 

Ce n'est pas grave, mais j'aimerais que cela fonctionne avec les Ramps14.


mennsylv@...
 

Hello,
 
I just flashed the Ramps14 and ESP-12E with WiFi Server 1.14e and OnStep 4.16f, master uploaded this morning.
 
It is now possible to compile without error with:
 
#define TIME_LOCATION_SOURCE GPS //
#define SerialGPS Serial2 //
#define SerialGPSBaud 9600 //
 
And since this flash the GPS works correctly.
 
What have you changed?


mennsylv@...
 

Hello, since WiFi Server 1.14e and OnStep 4.16f, the focusers and Rotator do not work.


mennsylv@...
 

I just put Onstep 3.16 back, the focussers and the rotator work again. With Onstep 4.16F they do not work.

I also noticed random operation of the Dec / Alt motor with the 4.16F.

On the version just before 4.16F just the GPS did not work, but all the stepper motors were OK.

I also tested all the "Aux" (1,2,3,4 and 8,9,10) everything is OK

(Mega 2560 and Ramps14)


Khalid Baheyeldin
 

On Fri, Sep 18, 2020 at 01:55 PM, Khalid Baheyeldin wrote:
On Fri, Sep 18, 2020 at 12:47 PM, Howard Dutton wrote:
The MKS Gen-L boards all need hardware modification to use RX1/TX1.
Then the Wiki page should be changed. The image should not highlight those two pins.
The writeup also has to change to explicitly say so.
Howard,

I reworded the Wiki page for RAMPS/MKS Gen-L to put the warning before discussing the ports and pins.
Hopefully that way, people will not try, fail then ask ...

Still, the TX1/TX2 image of the MKS Gen-L needs to change somehow, in case people don't read that far.


mennsylv@...
 

Khalid,
Tonight, I will delete the resistors and capacitors of the MKS GEN L v2.1 and test the serial ports.


Khalid Baheyeldin
 

On Tue, Sep 22, 2020 at 06:43 AM, <mennsylv@...> wrote:
Tonight, I will delete the resistors and capacitors of the MKS GEN L v2.1 and test the serial ports.
I assume that you are experienced with electronics and know what you are doing.
Otherwise, do not attempt this, unless you are willing to sacrifice the board for the cause ...