PiSupply / pxt-iot-lora-node

Makecode Library for the Pi Supply IoT LoRa Node
GNU Lesser General Public License v3.0
5 stars 18 forks source link

Not working with US915 #29

Closed ukscone closed 4 years ago

ukscone commented 4 years ago

doesn't seem to be working (reliably) using US915 frequency.

ryanteck commented 4 years ago

Sorry about the delay into looking at this @ukscone .

I've got a 915Mhz Gateway setup and can replicate the issue so will start diagnosing. now.

ryanteck commented 4 years ago

Ok so it seems to be that the RAK811 is potentially broadcasting on 71 different channels of which will mean it won't work!

Looking into fixing it.

ryanteck commented 4 years ago

Diagnosed the issue. Also affects all nodes however as most others use OTAA the issue wasn't affecting.

ryanteck commented 4 years ago

Ok,

This should be working now.

If you can test it out. Adding the set region block above the normal one like attached.

microbit-screenshot (20)

You'll need to update the library by clicking the javascript button, then explorer under the micro:bit image and click the refresh button like shown.

Screenshot from 2019-08-04 17-13-55

ukscone commented 4 years ago

there was an error on refreshing the extension. had to start a project from scratch and import the extension rather thna updating an existing project mbioterr2 mbioterr

ryanteck commented 4 years ago

Think I know what's caused this issue. Going to fix it (it'll likely break your new code though)

ryanteck commented 4 years ago

And commited.

You'll just need to re-add the initialisation block (the ABP connect) bock but your old code should also now work when refreshing it again.

ukscone commented 4 years ago

ok got this error on refresh which i think you know about.

error: main.ts(8,13): error TS2551: Property 'InitialiseRadioABP' does not exist on type 'typeof IotLoRaNode'. Did you mean 'InitialiseRadioOTAA'?

i'll just redo stuff from scratch as that seems to work and these are just tiny bits of code

ryanteck commented 4 years ago

Yep. If you remove ABP or as mentioned above re-add just that block it should work fine.

ukscone commented 4 years ago

sorry for the delay, forgot to comment on here after telling you on twitter it seemed to be working. anyway it now seems to be working ok.

ryanteck commented 4 years ago

excellent!