Ajay K

Forum Replies Created

Viewing 2 posts - 301 through 302 (of 302 total)
  • Author
    Posts
  • in reply to: MDot Recieve and retries. #14236
    Ajay K
    Participant

    Thanks Jason for your response.

    1) If I got it right the first link I would execute a transmit followed by a recv and this would be the synchronous operation. I guess this should work out in most scenarios correct and more or less a blocking call.

    2) The second link describes the asynchronous operation. However I am a little confused about it, since in the serial loop method once the transmit is executed, there seems to be a recv being called. So when does the RadioEvent:: MacEvent(LoRaMacEventFlags* flags, LoRaMacEventInfo* info) get invoked? Also the if condition in the code below is when data is received and rxBuffer is a pointer to a vector of bytes?

    if (flags->Bits.Rx) {
    if (serial_data_mode) {
    logDebug(“Rx %d bytes”, info->RxBufferSize);
    if (info->RxBufferSize > 0) {
    _serial.write((char*) info->RxBuffer, info->RxBufferSize);
    }
    }

    }

    Ideally I would prefer making a non blocking call via the send and receive the data asynchronously, so that none of the threads are blocked for IO.

    Thanks,
    Ajay.

    in reply to: MDOT serial Communication #12001
    Ajay K
    Participant

    Thanks Jason for your response. I was looking to the code base that you pointed me to. The AT+SD command seems to be exactly what I am looking for. However by following the code base, it seems like it has not been implemented yet. As far as I can see its being handled by CmdDummy.cpp. Is there a more current version of the implementation for the command?

    Also like you pointed out the pins to use to the DB9 connector, should I be actually using MBED api’s to connect to the serial port or should I be leveraging the API set in the AT Commmand firmware, if it is even possibe to use. I am just trying not to re-invent the wheel if there is already a time tested code.

    Thanks,
    Aj.

Viewing 2 posts - 301 through 302 (of 302 total)