-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
la915 #42
Comments
Still running well on LA915 (LATIN AMERICA) --> toString(i->Status) <--- |
Enable the debug. |
Yes, but i want to get access to that Status from my main source code. |
Could you point exactly where it is? |
yes, of course void STM32LoRaWAN::MacMcpsConfirm(McpsConfirm_t* c) {
// Called after an Mcps request (data TX) when the stack becomes idle again (so after RX windows)
strcpy(STAT, toString(c->Status));
core_debug(
"McpsConfirm: req=%s, status=%s, datarate=%u, power=%d, ack=%u, %s=%u, airtime=%u, upcnt=%u, channel=%u\r\n",
toString(c->McpsRequest), toString(c->Status), c->Datarate, c->TxPower,
c->AckReceived,
#if (defined( LORAMAC_VERSION ) && ( LORAMAC_VERSION == 0x01000300 ))
"retries", c->NbRetries,
#elif (defined( LORAMAC_VERSION ) && ( LORAMAC_VERSION == 0x01000400 ))
"trans", c->NbTrans,
#endif /* LORAMAC_VERSION */
(unsigned)c->TxTimeOnAir, (unsigned)c->UpLinkCounter, (unsigned)c->Channel);
instance->last_tx_acked = c->AckReceived;
instance->fcnt_up = c->UpLinkCounter;
} On stm32lorawan.cpp I want to compare if the toString(c->Status) has some value on Arduino code. |
hi @fpistm char STAT[128];
void STM32LoRaWAN::MacMcpsConfirm(McpsConfirm_t* c) {
// Called after an Mcps request (data TX) when the stack becomes idle again (so after RX windows)
strcpy(STAT, toString(c->Status));
and in the C Arduino
|
work around void lora_done()
{
// If, after calling maintain() the library is no longer
// busy, then the asynchronous operation has completed,
// so check its results.
String STAT_R = String(STAT);
if (lora_state == TRANSMITTING) {
if (STAT_R == "LORAMAC_EVENT_INFO_STATUS_OK")
Serial.println("Sent packet");
else
Serial.println("Fail sent packet"); |
Hi @tcpipchip It is fine if you achieve to get the value you want. |
Hi @tcpipchip |
Hi, i config la915.c la915.h to run on stm32 cube ide. Works nice. Want you those files ? |
If you think it is useful and you can test with this library. Feel free to submit a PR. 😉 |
I will first to see if compiles… |
Thanks, anyway you can share it here for ref. |
I replaced the AU915 parameters by the LA915 parameters, both .C and .H |
Share your file. Then we will see if we could integrate it. 😉 |
@fpistm |
got some progress to port to LA915. I rebuilt the AU915 files.
Start
Setting TX Config: modem=MODEM_LORA, power=30, fdev=0, bandwidth=0, datarate=10, coderate=1 preambleLen=8, fixLen=0, crcOn=1, freqHopOn=0, hopPeriod=0, iqInverted=0, timeout=4000
TX on freq 916400000 Hz at DR 2
TX: 00 41 1c fc 7f 67 e9 4a 53 25 cc 1f 05 15 e1 80 00 d0 aa 44 08 15 83
MAC txDone
RX_1 on freq 926900000 Hz at DR 10
MAC rxDone
RX: 204b5717c2185f9767d9e924db27d5d687
MlmeConfirm: req=MLME_JOIN, status=LORAMAC_EVENT_INFO_STATUS_OK, airtime=371, margin=0, gateways=0
Joined
Setting TX Config: modem=MODEM_LORA, power=30, fdev=0, bandwidth=0, datarate=10, coderate=1 preambleLen=8, fixLen=0, crcOn=1, freqHopOn=0, hopPeriod=0, iqInverted=0, timeout=4000
TX on freq 916000000 Hz at DR 2
TX: 80 66 3a 34 16 80 01 00 01 7b 1e e3 9c 97 55 af 3b 5d 14 39 9e da ee 09 8f 01 9f 44 14 8e 62 c2 15 73
MAC txDone
RX_1 on freq 925700000 Hz at DR 10
MAC rxDone
RX: 60663a3416b0000000a3d35d8dcfb5246ecd829b7d7ce842fe9f26116b880ca1b2ceb76ba2
McpsConfirm: req=MCPS_CONFIRMED, status=LORAMAC_EVENT_INFO_STATUS_OK, datarate=2, power=0, ack=1, retries=1, airtime=453, upcnt=1, channel=4
McpsIndication: ind=MCPS_UNCONFIRMED, status=LORAMAC_EVENT_INFO_STATUS_OK, multicast=0, port=0, datarate=10, pending=1, size=0, rxdata=0, ack=1, dncnt=0, devaddr=16343a66, rssi=-101, snr=-3, slot=0
Sent packet
Setting TX Config: modem=MODEM_LORA, power=10, fdev=0, bandwidth=0, datarate=12, coderate=1 preambleLen=8, fixLen=0, crcOn=1, freqHopOn=0, hopPeriod=0, iqInverted=0, timeout=4000
TX on freq 916600000 Hz at DR 0
TX: 80 66 3a 34 16 8a 02 00 09 03 07 03 07 03 07 04 05 07 01 7a 7d 25 de 9f ed 32 d7 50 97 5d 0e e2 65 de 0c 5c 3f 2d da 17 3a 5c 1d 6e
MAC txDone
RX_1 on freq 927500000 Hz at DR 8
MAC rxDone
RX: a0663a3416a0010001c46c6ee956088be8d2c1
McpsConfirm: req=MCPS_CONFIRMED, status=LORAMAC_EVENT_INFO_STATUS_OK, datarate=0, power=10, ack=1, retries=1, airtime=2139, upcnt=2, channel=7
McpsIndication: ind=MCPS_CONFIRMED, status=LORAMAC_EVENT_INFO_STATUS_OK, multicast=0, port=1, datarate=8, pending=1, size=6, rxdata=1, ack=1, dncnt=1, devaddr=16343a66, rssi=-101, snr=-2, slot=0
Sent packet
Received packet on port 1: 6D 69 67 75 65 6C
The text was updated successfully, but these errors were encountered: