diff --git a/Modem/config.h b/Modem/config.h index 4cbdebd..c2d238f 100644 --- a/Modem/config.h +++ b/Modem/config.h @@ -11,7 +11,7 @@ #define CONFIG_AFSK_RXTIMEOUT 0 // How long a read operation from the modem // will wait for data before timing out. -#define CONFIG_AFSK_PREAMBLE_LEN 250UL // The length of the packet preamble in milliseconds +#define CONFIG_AFSK_PREAMBLE_LEN 500UL // The length of the packet preamble in milliseconds #define CONFIG_AFSK_TRAILER_LEN 100UL // The length of the packet tail in milliseconds #endif \ No newline at end of file diff --git a/Modem/main.c b/Modem/main.c index afc87a5..f0b5a86 100644 --- a/Modem/main.c +++ b/Modem/main.c @@ -4,7 +4,7 @@ ////////////////////////////////////////////////////// #include // Interrupt functionality from BertOS -#include // Debug configuration from BertOS +#include "cfg/debug.h" // Debug configuration from BertOS #include // Serial driver from BertOS #include // Timer driver from BertOS @@ -101,6 +101,7 @@ int main(void) // and the byte is not a "transmit" (newline) character, // we should store it for transmission. if ((serialLen < MP1_MAX_FRAME_LENGTH) && (sbyte != 138)) { + kprintf("%d\n", sbyte); // Put the read byte into the buffer; serialBuffer[serialLen] = sbyte; // Increment the read length counter diff --git a/Modem/protocol/mp1.c b/Modem/protocol/mp1.c index f5d7b9a..9ff47c8 100644 --- a/Modem/protocol/mp1.c +++ b/Modem/protocol/mp1.c @@ -45,8 +45,8 @@ void mp1Poll(MP1 *mp1) { } else { // Checksum was incorrect //mp1Decode(mp1); - //kprintf("Incorrect checksum. Found %d.\n", mp1->buffer[mp1->packetLength]); - //kprintf("should be %d", mp1->checksum_in); + kprintf("Incorrect checksum. Found %d, ", mp1->buffer[mp1->packetLength]); + kprintf("should be %d\n", mp1->checksum_in); } } // If the above is not the case, this must be the diff --git a/bertos/cfg/cfg_debug.h b/bertos/cfg/cfg_debug.h index 1063984..cd83989 100644 --- a/bertos/cfg/cfg_debug.h +++ b/bertos/cfg/cfg_debug.h @@ -49,7 +49,7 @@ * Baudrate for the debug console. * $WIZ$ type = "int"; min = 300 */ -#define CONFIG_KDEBUG_BAUDRATE 115200UL +#define CONFIG_KDEBUG_BAUDRATE 57600UL /** * Clock source for the UART module. You need to write the code to reprogram the respective clock at the required frequency in your project before calling kdbg_init(). diff --git a/buildrev.h b/buildrev.h index a963caf..038af47 100644 --- a/buildrev.h +++ b/buildrev.h @@ -1,2 +1,2 @@ -#define VERS_BUILD 387 +#define VERS_BUILD 402 #define VERS_HOST "vixen"