We will not be using the Notecard library as we have a lot going on in our STM32 MCU. We are using an RTOS with several tasks, a uSDCard file system and some tight timing DMA and ISR activity, so need to control everything carefully. We are also squeezed on RAM with the present MCU, so don’t like to use malloc unless absolutely essential.
In the note on Notecard Communication without a library there is some useful information about timing, but I need to know:
• Can Notecard deal with DMA serial output from the MCU for a single chunk, if within the 256 byte limit?
• If not, we would use a hardware timer to separate characters coming to the Notecard. What inter-character spacing would you recommend in microseconds?
• Is there any reason not to use the (faster) auxiliary serial interface as the only Notecard interface, given that we will be mains powered when the Notecard is being used?
The note on Notecard Requests and Responses highlights the ndjson basic format for both. Do you have a similar format specification for the trace records? We are thinking about using a signal or environmental variable to allow us to turn on collection of this if we need to debug anything remotely.
Any update on the availability of binary mode, we definitely want to use this for our blocks of data – typically less than 32kBytes, the sector size on the SDCard FAT filesystem?
Any help would be appreciated.
Welcome to the Blues forum, we’re happy you found your way here!
I’ll try to answer your questions in the order they appear. In the future, it may be easier to open multiple questions (forum posts), so if a conversation were to arise then they could each follow their own natural path to conclusion. It would also reduce the opportunity for ambiguity/confusion as well as make it easier for others to follow.
Can Notecard deal with DMA serial output from the MCU for a single chunk, if within the 256 byte limit?
Is there any reason not to use the (faster) auxiliary serial interface as the only Notecard interface, given that we will be mains powered when the Notecard is being used?
If you do not have power constraints, then I cannot see any particular reason not to use the AUX UART.
… Do you have a similar format specification for the trace records?
Can you expand on the ask here? Are you wanting logs over the serial interface, or to see them appear on Notehub? If it’s the latter, then we provide some guidance on our dev site.
Any update on the availability of binary mode, we definitely want to use this for our blocks of data… ?
Yes, we will be releasing binary mode as part of our next developer release, which will be released imminently. It sounds like you have a perfect use case. If you are ready to start today, then please DM me and I can help you get setup.
Looking forward to hearing from you,
DMA - Great
Aux serial - Great
Trace - I would like to be able to use the trace command to collect a full trace from Notecard to help us (you!) debug any cellular connection issues. I am thinking about the type of log shown in the “…FTDI…” guide in the ‘Issuing an API request’ section.
Our systems are mainly installed overseas and to date have used uBlox 3G modems and our own AT code stack. We have had some issues with certain sites that were difficult to debug without full logs. I will be very happy for Blues to deal with the AT code, but I need a way of collecting the trace from within our main code if possible. We have an SDCard, so can save to that if we cannot establish the link.
Hi, I would like to hear more about the binary mode as well. We transmit “big” chunks of base64 encoded data at the moment. By the way here’s a rust driver for the notecard: https://github.com/gauteh/notecard-rs/blob/main/src/lib.rs#L457 that is not tied to note-c, might be useful.
I haven’t seen your name in ages! You will definitely want to take advantage of the new binary feature. When we release the new firmware (very soon), we will also be releasing documentation to describe how to utilize it. As always, the C implementation used to interact with the Notecard will be released open-source in the
note-c repository. Those two things should give you everything you will need to implement it in RUST.
Great!! Good to hear from you again as well! Looking forward to it!