Can't get OpenLog to work

I just received my OpenLog from SF and I’m going through the Hookup Guide.

I have a 2GB, FAT32 uSD card in the slot. The OpenLog is connected to my SF FTDI 3.3V connector. (I tried attaching a photo of my set up but keep getting an error.)

I downloaded and installed the zipped firmware bundle in my Arduino library, and modified the SerialPort.h file. The next thing I did was upload the “OpenLog_Test_Sketch.” It compiled and uploaded without incident. I waited at least a minute for the sketch to run to completion, but started seeing some odd characters in the Serial Monitor. (I didn’t record what they were, now I wish I had.) Since that wasn’t working, I decided to try uploading the firmware.

I tried to upload the “OpenLog” sketch that’s in OpenLogBundle>firmware>OpenLog_Firmware. Unfortunately it won’t compile. Here’s the error:

In file included from C:\Users\Laptop\Documents\Arduino\OpenLogBundle\firmware\OpenLog_Firmware\OpenLog\OpenLog.ino:68:0:

C:\Users\Laptop\Documents\Arduino\libraries\SerialPort/SerialPort.h: In member function ‘size_t SerialPort<PortNumber, RxBufSize, TxBufSize>::write(const __FlashStringHelper*)’:

C:\Users\Laptop\Documents\Arduino\libraries\SerialPort/SerialPort.h:583:11: error: ‘prog_char’ does not name a type; did you mean ‘putchar’?

const prog_char* p = (const prog_char*)s;

^~~~~~~~~

putchar

C:\Users\Laptop\Documents\Arduino\libraries\SerialPort/SerialPort.h:584:25: error: ‘p’ was not declared in this scope

size_t n = strlen_P(p);

^

exit status 1

Error compiling for board Arduino Uno.

I was using Arduino IDE v1.8.12 so I went back and downloaded IDE v1.6.5, but that gave me the same error.

How can I get the OpenLog firmware to compile?

Since I can’t compile the OpenLog firmware. I tried compiling and uploading “OpenLog_Test_Sketch” again. (The OpenLog chip is still connected to my SparkFun 3.3v FTDI chip.) This sketch compiles and uploads no problem. The green LED on the OpenLog board flashes for about 35 seconds. After that the green LED starts flashing about once every 2 seconds for as long as it’s plugged into my computer.

Meanwhile on the Serial Monitor I got this:

⸮⸮py

Can anybody help me with what I’m doing wrong?

And I made an embarrassing mistake… I hadn’t noticed that in “OpenLog_Test_Sketch” the baud rate defaults to 115200. Once I set it to 9600 it seems to work just fine.

My next problem is that I can’t get OpenLog to enter Command Mode. I can upload the OpenLog_Test_Sketch and run it just fine. When it concludes the Serial Monitor shows the time taken, says “Done!”, but nothing after that. And no matter what I type in to the Serial Monitor, the OpenLog doesn’t respond.

Should Command Mode work even if the SD card isn’t recognized? The microSD card doesn’t seem to be able to initialize. It’s a 2 GB, FAT format (NOT FAT32), named “MicroSD.” I know the card works because I can plug it into an SD adapter, plug that into my computer and open the drive. Also the drive is empty. There’s no config file on it either. I’ve also tried 2 other microSD cards which were formatted FAT32, and neither of them worked.

I apologize for responding to my own posts so much, but I’ve been at this for almost 6 hours and I’m beginning to pull out what’s left of my hair!

The Arduino serial monitor does not act like a standard terminal program, so try one of those (Putty, Teraterm, etc.). The serial monitor does not send anything until you hit the Send button. And then, depending on the settings you choose, it may add a carriage return, line feed or both.

As for the problem compiling OpenLog, you are probably missing a required Arduino library, or have an incorrect library installed. You do not need to compile it unless you really, really need to make changes.

I seem to be having 2 issues which may or may not be related.

Issue 1: I haven’t been able to communicate with the OpenLog. According to the Hookup Guide, sending a ? should give me the firmware version. For me, sending a ? gets no response. In fact, no matter what I send through the Serial Monitor I get no response.

I compiled and uploaded the OpenLog_Test_Sketch, so every time I open Serial Monitor or use PuTTy it runs the test and gives me !:abcdefghijklm… eventually ending with…

Characters pushed: 11000

Time taken (s): 12

Done!

After that no matter what I send to the OpenLog there’s no response. Is it because the chip isn’t dropping back into Command Mode after running the test? I’ve tried sending 26 through the Serial Monitor 3 times, got no response from that. I tried the same thing with 27 instead, still no response. What else should I try sending?

I’ve also opened a connection using PuTTY. When it first connects I get the output from the test, and no matter what I send afterwards I don’t get a response.

What am I doing wrong?

Issue 2: Compiling and uploading the OpenLog firmware. I’m only trying this in the hope that reuploading the firmware will fix my communication problem. I uninstalled and reinstalled the Arudino editor on my laptop, but prog_char is still making a problem. I at least found that the issue was mentioned in the OpenLog Hookup Guide Discussion page: https://learn.sparkfun.com/tutorials/op … de/discuss

(Look towards the bottom of the page where it says “Compile Errors.”)

I tried the suggested fix but was still not able to compile the OpenLog firmware file.

I also tried uploading everything into the Arduino Online Editor in the hopes it would work there. I uploaded the OpenLog.ino firmware, the SdFat library, and the SerialPort library (Had to add a library.properties file to the SerialPort library to make it upload) but it wouldn’t compile there either. Here is the output from the online editor in case it helps:

/home/builder/opt/arduino-builder/arduino-builder -compile -core-api-version 10611 -hardware /home/builder/opt/arduino-builder/hardware -hardware /home/builder/.arduino15/packages -tools /home/builder/opt/arduino-builder/tools -tools /home/builder/.arduino15/packages -built-in-libraries /home/builder/opt/libraries/latest -logger humantags -fqbn arduino:avr:uno -build-cache /tmp -build-path /tmp/285960701/build -verbose -prefs runtime.tools.arduinoOTA.path=/home/builder/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs runtime.tools.avr-gcc.path=/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5 -prefs runtime.tools.avrdude.path=/home/builder/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs runtime.tools.bossac.path=/home/builder/.arduino15/packages/industruino/tools/bossac/1.7.0-industruino -prefs runtime.tools.openocd.path=/home/builder/.arduino15/packages/Intel/tools/openocd/0.9.0+0.1 -prefs runtime.tools.dfu-util.path=/home/builder/.arduino15/packages/arduino/tools/dfu-util/0.9.0-arduino1 -prefs runtime.tools.mkspiffs.path=/home/builder/.arduino15/packages/esp8266/tools/mkspiffs/2.5.0-3-20ed2b9 -prefs runtime.tools.arduino101load.path=/home/builder/.arduino15/packages/Intel/tools/arduino101load/2.0.1 -prefs runtime.tools.linuxuploader.path=/home/builder/.arduino15/packages/arduino/tools/linuxuploader/1.5.1 -prefs runtime.tools.xtensa-lx106-elf-gcc.path=/home/builder/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9 -prefs runtime.tools.arc-elf32.path=/home/builder/.arduino15/packages/Intel/tools/arc-elf32/1.6.9+1.0.1 -prefs runtime.tools.CMSIS.path=/home/builder/.arduino15/packages/arduino/tools/CMSIS/4.5.0 -prefs runtime.tools.arm-none-eabi-gcc.path=/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4 -prefs runtime.tools.CMSIS-Atmel.path=/home/builder/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0 -prefs runtime.tools.x86-linux-gcc.path=/home/builder/.arduino15/packages/arduino/tools/x86-linux-gcc/7.2.0 -prefs runtime.tools.core2-32-poky-linux.path=/home/builder/.arduino15/packages/Intel/tools/core2-32-poky-linux/1.6.2+1.0 -prefs runtime.tools.i586-poky-linux-uclibc.path=/home/builder/.arduino15/packages/Intel/tools/i586-poky-linux-uclibc/1.6.2+1.0 -prefs runtime.tools.sketchUploader.path=/home/builder/.arduino15/packages/Intel/tools/sketchUploader/1.6.2+1.0 -prefs runtime.tools.arm-linux-gcc.path=/home/builder/.arduino15/packages/arduino/tools/arm-linux-gcc/4.9.3 -prefs runtime.tools.nrf5x-cl-tools.path=/home/builder/.arduino15/packages/arduino/tools/nrf5x-cl-tools/9.3.1 -prefs runtime.tools.esptool.path=/home/builder/.arduino15/packages/esp8266/tools/esptool/2.5.0-3-20ed2b9 -prefs runtime.tools.flashpack.path=/home/builder/.arduino15/packages/Intel/tools/flashpack/2.0.0 -libraries /tmp/285960701/custom -libraries /tmp/285960701/pinned /tmp/285960701/OpenLog_Firmware

Multiple libraries were found for “SdFat.h”

Used: /tmp/285960701/custom/SdFat

Not used: /home/builder/opt/libraries/latest/sdfat_adafruit_fork_1_2_3

Not used: /home/builder/opt/libraries/latest/sdfat_1_1_4

Multiple libraries were found for “EEPROM.h”

Used: /home/builder/.arduino15/packages/arduino/hardware/avr/1.8.2/libraries/EEPROM

Not used: /home/builder/opt/libraries/latest/hello_drum_0_7_6

Not used: /home/builder/opt/libraries/latest/arduino_nvm_0_9_1

Using library SerialPort at version 2014.2.16 in folder: /tmp/285960701/custom/SerialPort

Using library EEPROM at version 2.0 in folder: /home/builder/.arduino15/packages/arduino/hardware/avr/1.8.2/libraries/EEPROM

In file included from /tmp/285960701/OpenLog_Firmware/OpenLog_Firmware.ino:68:0:

/tmp/285960701/custom/SerialPort/SerialPort.h: In member function ‘size_t SerialPort<PortNumber, RxBufSize, TxBufSize>::write(const __FlashStringHelper*)’:

/tmp/285960701/custom/SerialPort/SerialPort.h:583:11: error: ‘prog_char’ does not name a type; did you mean ‘putchar’?

FWIW, I’ve resolved my problem and I’m writing this in case it helps anybody else.

I got the OpenLog firmware to finally compile by using the Hook Up Guide’s link to the latest copy of the SerialPort library. https://github.com/greiman/SerialPort Once I had that, and made the 2 changes to the SerialPort.h file the OpenLog firmware compiled (and uploaded to the OpenLog) just fine.

After that I had some brief trouble getting the thing to go into Command Mode, but after reading SparkFun’s awesome tutorial on Serial Terminals https://learn.sparkfun.com/tutorials/te … l-overview I found that by going to the Serial Monitor in the Arduino IDE and changing a dropdown box at the bottom to “Both NL & CR” the thing went into Command Mode just fine.

Cheers!