Newby here, so take that into consideration!
I am still in “sandbox” mode where I am just playing with things to learn how the Notecard ecosystem works. My sandbox program is attempting to create a settings file, store some settings into it, then retrieve it.
The problem I have is that no matter what I have tried, my “note.get” calls have always failed with the “CRC error on response” being written to the [ERROR} output.
Example output is shown below. You will notice that I hub.set commands works fine, then I do a “card.time” request and set the system time of the ESP32. Then I attempt to load the settings file.
If the load of the settings file fails, I assume that the settings file is not correctly setup so I delete the settings file, then I create a default settings file.
I did sometimes get a failure on the delete with an error saying the file was still open. I assumed this was probably a sync problem, so for now I just added some time delays to slow things down.
My “file.delete” works fine.
My “note.add” works fine.
But my “note.get” has never worked.
At one point I connected a USB cable directly to the Notecarrier F and used the Blue.io quickstart terminal emulator to talk direcctly to the Notecard. The “note.get” works fine via this mechanism, but the exact same note.get call from my ESP32 always fails.
Please help.
Below is a log that shows everything from ESP32 boot time, including each request JSON and each response JSON string
03/15/2024 00:56:19.338: — Cleared @ 03/15/2024 00:56:19.338 —
03/15/2024 00:56:19.408: — Started @ 03/15/2024 00:56:19.408 —
03/15/2024 00:56:47.714: ets Jul 29 2019 12:21:46
03/15/2024 00:56:48.868:
03/15/2024 00:56:58.878: rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
03/15/2024 00:56:59.907: configsip: 0, SPIWP:0xee
03/15/2024 00:57:00.193: clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
03/15/2024 00:57:02.209: mode:DIO, clock div:1
03/15/2024 00:57:02.391: load:0x3fff0030,len:1184
03/15/2024 00:57:02.402: load:0x40078000,len:13260
03/15/2024 00:57:02.588: load:0x40080400,len:3028
03/15/2024 00:57:03.095: entry 0x400805e4
03/15/2024 00:57:03.275:
03/15/2024 00:57:03.782: ----------------------------
03/15/2024 00:57:03.962: BluesSandbox1 is starting…
03/15/2024 00:57:04.469: ----------------------------
03/15/2024 00:57:04.649: ------------------------------
03/15/2024 00:57:05.156: Booting…
03/15/2024 00:57:05.336: ------------------------------
03/15/2024 00:57:05.843: Initializing Notecard…
03/15/2024 00:57:06.023: req object:
03/15/2024 00:57:06.545: {
03/15/2024 00:57:07.560: “req”: “hub.set”,
03/15/2024 00:57:07.709: “product”: “OBSCURED_PRODUCT_STRING”,
03/15/2024 00:57:22.740: “mode”: “continuous”
03/15/2024 00:57:23.243: }
03/15/2024 00:58:23.269: [INFO] {“req”:“hub.set”,“product”:“OBSCURED_PRODUCT_STRING”,“mode”:“continuous”,“body”:{“agent”:“note-arduino”,“compiler”:“gcc 8.4.0”,“req_interface”:“i2c”,“cpu_name”:“esp32”},“crc”:“0000:3DDF411D”}
03/15/2024 00:58:23.451: [INFO] {}
03/15/2024 00:58:23.958: Notecard setup complete.
03/15/2024 00:58:26.019: [INFO] {“req”:“card.time”,“crc”:“0001:1110F247”}
03/15/2024 00:58:26.200: [INFO] {“minutes”:-240,“lat”:35.896837499999985,“lon”:-79.416890625,“area”:“Pleasant Hill NC region”,“country”:“US”,“zone”:“EDT,America/New_York”,“time”:1710478622}
03/15/2024 00:58:26.706: Status response:
03/15/2024 00:58:26.886: time : 1710478622
03/15/2024 00:58:27.408: minutes: -240
03/15/2024 00:58:28.423: ---------------------------------------
03/15/2024 00:58:28.572: System clock set to 00:57:02 03/15/2024
03/15/2024 00:58:43.603: ---------------------------------------
03/15/2024 00:58:44.106: ------------------------------
03/15/2024 00:59:44.130: Loading boat-settings.db file…
03/15/2024 00:59:44.314: req object:
03/15/2024 00:59:44.820: {
03/15/2024 00:59:45.001: “req”: “note.get”,
03/15/2024 00:59:45.508: “file”: “boat-settings.db”,
03/15/2024 00:59:45.688: “note”: “boat-settings”,
03/15/2024 00:59:46.195: “delete”: “false”
03/15/2024 00:59:46.375: }
03/15/2024 00:59:46.882: [INFO] {“req”:“note.get”,“file”:“boat-settings.db”,“note”:“boat-settings”,“delete”:“false”,“crc”:“0002:1431E8B2”}
03/15/2024 00:59:47.062: [ERROR] CRC error on response
03/15/2024 00:59:47.569: [INFO] {“req”:“note.get”,“file”:“boat-settings.db”,“note”:“boat-settings”,“delete”:“false”,“crc”:“0002:1431E8B2”}
03/15/2024 00:59:47.749: [ERROR] CRC error on response
03/15/2024 00:59:48.271: [INFO] {“req”:“note.get”,“file”:“boat-settings.db”,“note”:“boat-settings”,“delete”:“false”,“crc”:“0002:1431E8B2”}
03/15/2024 00:59:49.286: [ERROR] CRC error on response
03/15/2024 00:59:49.435: [INFO] {“req”:“note.get”,“file”:“boat-settings.db”,“note”:“boat-settings”,“delete”:“false”,“crc”:“0002:1431E8B2”}
03/15/2024 01:00:04.466: [ERROR] CRC error on response
03/15/2024 01:00:04.865: [INFO] {“req”:“note.get”,“file”:“boat-settings.db”,“note”:“boat-settings”,“delete”:“false”,“crc”:“0002:1431E8B2”}
03/15/2024 01:01:04.888: [ERROR] CRC error on response
03/15/2024 01:01:05.073: [INFO] {“req”:“note.get”,“file”:“boat-settings.db”,“note”:“boat-settings”,“delete”:“false”,“crc”:“0002:1431E8B2”}
03/15/2024 01:01:05.580: [ERROR] CRC error on response
03/15/2024 01:01:05.760: [ERROR] {“err”:“crc error {io}”,“src”:“note-c”}
03/15/2024 01:01:06.266: rsp object:
03/15/2024 01:01:06.447: {
03/15/2024 01:01:06.953: “err”: “crc error {io}”,
03/15/2024 01:01:07.134: “src”: “note-c”
03/15/2024 01:01:07.640: }
03/15/2024 01:01:07.821: err = crc error {io}
03/15/2024 01:01:08.328: ------------------------------
03/15/2024 01:01:08.508: Deleting the boat-settings.db file…
03/15/2024 01:01:09.029: req object:
03/15/2024 01:01:10.045: {
03/15/2024 01:01:10.399: “req”: “file.delete”,
03/15/2024 01:01:25.432: “files”: [“boat-settings.db”]
03/15/2024 01:01:25.703: }
03/15/2024 01:02:25.721: [INFO] {“req”:“file.delete”,“files”:[“boat-settings.db”],“crc”:“0003:725C262B”}
03/15/2024 01:02:25.904: [INFO] {}
03/15/2024 01:02:26.410: rsp object:
03/15/2024 01:02:26.590: {
03/15/2024 01:02:27.097: }
03/15/2024 01:02:27.278: Settings file was successfully deleted.
03/15/2024 01:02:27.785: Sleep 15 seconds…
03/15/2024 01:02:27.965: ------------------------------
03/15/2024 01:02:28.472: Create default settings (note.add)
03/15/2024 01:02:28.652: req object:
03/15/2024 01:02:29.158: {
03/15/2024 01:02:29.339: “req”: “note.add”,
03/15/2024 01:02:29.860: “note”: “boat-settings”,
03/15/2024 01:02:30.876: “file”: “boat-settings.db”,
03/15/2024 01:02:31.024: “body”: {
03/15/2024 01:02:46.056: “sensorReadInterval”: 60,
03/15/2024 01:02:46.714: “settingsCheckInterval”: 120
03/15/2024 01:03:46.739: },
03/15/2024 01:03:46.922: “sync”: true
03/15/2024 01:03:47.429: }
03/15/2024 01:03:47.612: [INFO] {“req”:“note.add”,“note”:“boat-settings”,“file”:“boat-settings.db”,“body”:{“sensorReadInterval”:60,“settingsCheckInterval”:120},“sync”:true,“crc”:“0004:A49ECC71”}
03/15/2024 01:03:48.117: [INFO] {“total”:1}
03/15/2024 01:03:48.297: rsp object:
03/15/2024 01:03:48.803: {
03/15/2024 01:03:48.984: “total”: 1
03/15/2024 01:03:49.490: }
03/15/2024 01:03:49.670: ------------------------------
03/15/2024 01:03:50.177: Default settings created (note.add)
03/15/2024 01:03:50.358: Sleep for 60 seconds…
03/15/2024 01:03:50.880: ------------------------------
03/15/2024 01:03:51.895: Loading boat-settings.db file…
03/15/2024 01:03:52.457: req object:
03/15/2024 01:04:07.489: {
03/15/2024 01:04:07.761: “req”: “note.get”,
03/15/2024 01:05:07.777: “file”: “boat-settings.db”,
03/15/2024 01:05:07.961: “note”: “boat-settings”,
03/15/2024 01:05:08.468: “delete”: “false”
03/15/2024 01:05:08.648: }
03/15/2024 01:05:09.157: [INFO] {“req”:“note.get”,“file”:“boat-settings.db”,“note”:“boat-settings”,“delete”:“false”,“crc”:“0005:1431E8B2”}
03/15/2024 01:05:09.335: [ERROR] CRC error on response
03/15/2024 01:05:09.844: [INFO] {“req”:“note.get”,“file”:“boat-settings.db”,“note”:“boat-settings”,“delete”:“false”,“crc”:“0005:1431E8B2”}
03/15/2024 01:05:10.023: [ERROR] CRC error on response
03/15/2024 01:05:10.531: [INFO] {“req”:“note.get”,“file”:“boat-settings.db”,“note”:“boat-settings”,“delete”:“false”,“crc”:“0005:1431E8B2”}
03/15/2024 01:05:10.710: [ERROR] CRC error on response
03/15/2024 01:05:11.218: [INFO] {“req”:“note.get”,“file”:“boat-settings.db”,“note”:“boat-settings”,“delete”:“false”,“crc”:“0005:1431E8B2”}
03/15/2024 01:05:11.397: [ERROR] CRC error on response
03/15/2024 01:05:11.920: [INFO] {“req”:“note.get”,“file”:“boat-settings.db”,“note”:“boat-settings”,“delete”:“false”,“crc”:“0005:1431E8B2”}
03/15/2024 01:05:12.934: [ERROR] CRC error on response
03/15/2024 01:05:13.446: [INFO] {“req”:“note.get”,“file”:“boat-settings.db”,“note”:“boat-settings”,“delete”:“false”,“crc”:“0005:1431E8B2”}