jameswhiteman

Recent activity

Posted in Nocan.receiveMessage(&msg) 250 ms delay

looking at running a https://www.balena.io/fin/ board and cm3+L for the nocan server and hat as well as aws greengrass, using aws greengrass and remotely deployed lambdas to interact with the nocan server to pubsub messages. Nocan is going to be an overwhelming success story as it will allow us to deploy on mass over the air updates to our product in the field. It is also going to allow us the ability to add extra functionality to our product by just by adding another node.
Personally I believe that nocan really is ground breaking for the era of IoT, and am grateful to both yourself and our man Justin at OSE who put this all together

Posted in Nocan.receiveMessage(&msg) 250 ms delay

Hi Alain,

Implemented and it works a treat! back to 3-4 ms cycles. Thank you.
Have a picture of the board, but I don't know how to attach a image to your forum

Cheers,

James

Started Nocan.receiveMessage(&msg) 250 ms delay

Hi Alain,

So our board (node) is using the same STM32 chip, and maybe a higher pin count SAMD board, but other than that we have taken the compiled node code and dropped it on the STM32 chip (The hardware is not really my field)
The issue we are facing is we want two way comms to the board. This is so we can send commands from a browser application to the device. We are using the nocan server to achieve this. The problem we are facing is that on setup we subscribe to a channel and then once in the main program, every loop we subscribe to Nocan.receiveMessage(&msg).
Some rough recieveMessage code ::

void receiveMsg() {
    if(Nocan.receiveMessage(&msg)== 0){
        Serial.println("Nocan Message :: ");
        Serial.print("node ID and ChannelID : ");
        Serial.print(msg.node_id);
        Serial.println(msg.channel_id);
        Serial.print("Data Length : ");
        Serial.println(msg.data_len);

        Serial.print("Data : ");
        Serial.print(msg.data_len);
        for ( int a = 0; a < msg.data_len; a = a + 1 ){
            Serial.print(msg.data[a]);
        }
        Serial.println();
    }
}

Problem is this takes 250 ms to respond even if returning no message. Is this correct operation? is it something wrong with our board setup/my code, (everything else is working fine, uploads, sending nocan messages)
Our looptime with out this is at worst 4 ms.

Kind Regards,

James

Posted in Possible hardware fault

Hi Alain,

Thank you for you quick and detailed response. I didn't know of nocanc power off I shall definitely try that next time. Does that cycle the power on the chips?
You are correct I should have posted what version I was running at the header.
I'm running v0.1.13 both nocanc and nocand
nocand is set up as a service and I restarted it a few times, with no errors, I even have a pub event I fire to the nocand server that is monitored on our board and spits it out on Serial, sending to the nocand server gave no errors. However the minicom showed no response other than the general running messages of the board, hence leading me to believe it was a nocan comms failure.
There is only one node, which is our board, although there are 3 nodes in the cache, left over from testing other nodes. The node that is left and running is node 3.
I did do nocanc monitor at the time and had no issue with the voltage.

current nocanc monitor returns ;

EVENT   bus-power-status-update-event   #6      Driver voltage=13.7, current sense=0, reference voltage=3.35, status(40)=+powered.

unfortunately I didn't grab the logs I will know for next time
journalctl -u nocand.service did return the boot from this afternoon

Feb 20 15:17:11 raspberrypi nocand[747]: 2019/02/20 15:17:11 DEBUG+ Waiting for TX line to be HIGH
Feb 20 15:17:12 raspberrypi nocand[747]: 2019/02/20 15:17:12 INFO Created new client 0 (127.0.0.1:53906)
Feb 20 15:17:12 raspberrypi nocand[747]: 2019/02/20 15:17:12 DEBUG+ Processing event client-auth-event(2) from client 0 (127.0.0.1:53906), with 24 bytes of payload

all looks well, as it should as the system is running fine.
Like I say we have been running rock solid in the field for at-least 2+ weeks, with constant uploads, the only issues we are having is to do with our own code, this was the first time I had a issue with nocan comms.
Touch wood it was a random one off
Appreciate your time and when our product does launch I will add it to the forum projects page.

Cheers,

James