pico_tnc icon indicating copy to clipboard operation
pico_tnc copied to clipboard

I think tx does not work.

Open randall3000 opened this issue 1 year ago • 4 comments

I have tried 3 different Picos and I can decode fine but there is nothing in PWM0 when transmit, have anyone tested ?

randall3000 avatar Aug 17 '24 23:08 randall3000

Looking through the code it could be it isn't configured correctly - skips TX if any required values are missing.

ShawnStoddard avatar Oct 02 '24 23:10 ShawnStoddard

Thanks @ShawnStoddard I'll check again, but I ended up buying NinoTnc.

randall3000 avatar Oct 14 '24 18:10 randall3000

Yes, TX works fine. Here is a minimal working example for send.

// The TX pin is GP10 by default!

#include "config.h"

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>

#include "pico/stdlib.h"
#include "hardware/dma.h"
#include "hardware/pwm.h"
#include "hardware/irq.h"
#include "hardware/sync.h"
#include "hardware/structs/uart.h"
#include "pico/util/queue.h"
#include "hardware/watchdog.h"

#include "tnc.h"
#include "receive.h"
#include "send.h"
#include "ax25.h"
#include "beacon.h"

void setup() {
  Serial.begin(115200);

  // Core init
  tnc_init();
  send_init();
}

uint64_t lastMillis;

void loop() {
  // watchdog_update();

  if (millis() - lastMillis >= 4 * 1000UL) {
    lastMillis = millis();  // get ready for the next iteration
    tnc_t *tp = &tnc[0];
    char *message = (char *)"Hello DE Dhiru here!";
    send_packet(tp, (uint8_t *)message, strlen(message));
  }

  send();
}

kholia avatar Mar 01 '25 11:03 kholia

@kholia Thank you for checking. I'll test again.

randall3000 avatar Mar 01 '25 17:03 randall3000