LoRa receiving only b''
-
OK, got it figured out... you have to downgrade to 1.5.1b1. Instructions for doing this can be found at:
https://forum.pycom.io/topic/517/downgrading-firmware-advanced-usersOnce this is done, then the raw socket example works.
-
I was also getting b'' (empty string) because they did not communicate and recv() as it is run non-blocking and is returning empty buffer.
After I added full init sequence params it started to work.
And I am on the latest firmware (nodename='LoPy', release='1.6.4.b1', version='v1.8.6-475-g2320cb2d on 2017-02-24'). -
First Thanks to Stephan, without this hnt I would stay here still and searching for ansers why things not working.
@Pycm Team: It's ok to have beta software and it's ok that there is a recommendation to date up the firmware before first use. But whot is not ok:
You purchase a LoRa board and you get the advise on the bag that it is strongly recommended to update your bord but after this update your basic code for this device--LoRa--is no more working!! I spend some nights till I found this thread here. I updated the LoPys, tried different sketches froum your git side, on the documentation page and also "known working" examples from the forum. Nothing did wirk, nothing!! So it is a bit more than frustrating to have a board "simple" example sketches and nothing is transmitting data.
I would strongly recommend that you make at least an eye-catching hit on a prominent place to worn. Or get an advice how to workaround this. It's not acceptable that you can find it only hidden in a forum post.
-
I'm agree, I buy the lopy board for communicating with a raspberry pi with lora module as a simple gateway in earlier version the software works fine 1.6.0.b1 the firmware versions later there is communication but i missed a lot of packages. There is something changed in the firmware. I asked a couple of Times on Daniel but het give NO answer I'm verry dissapointed.
-
Try this trick please
# your original code lora = LoRa(mode=LoRa.LORA, frequency=863000000, power_mode=LoRa.ALWAYS_ON, tx_power=14, bandwidth=LoRa.BW_250KHZ, sf=7, preamble=8, coding_rate=LoRa.CODING_4_5, tx_iq=False, rx_iq=False) # and then again lora.init(mode=LoRa.LORA, frequency=863000000, power_mode=LoRa.ALWAYS_ON, tx_power=14, bandwidth=LoRa.BW_250KHZ, sf=7, preamble=8, coding_rate=LoRa.CODING_4_5, tx_iq=False, rx_iq=False) -
Just tested LORA communication with version 1.6.6.b1.
LORA communication is working well, see the sample code I am using.Sample code I am using into the two lopy units.
For my LOPY unit on COM3:
0_1488493687559_main.pyFor my LOPY unit on COM5:
0_1488493757516_main.pyBut I have still have a question, what will be the best settings into the init settings of lora.
lora = LoRa(mode=LoRa.LORA, frequency=863000000, power_mode=LoRa.ALWAYS_ON, tx_power=14, bandwidth=LoRa.BW_250KHZ, sf=7, preamble=8, coding_rate=LoRa.CODING_4_5, tx_iq=False, rx_iq=False)
best regards,
Stephan G -
Hello Constantinos,
I did modify my sample code with the trick as you told:
lora = LoRa(mode=LoRa.LORA, frequency=863000000, power_mode=LoRa.ALWAYS_ON, tx_power=14, bandwidth=LoRa.BW_250KHZ, sf=7, preamble=8, coding_rate=LoRa.CODING_4_5, tx_iq=False, rx_iq=False)
lora.init(mode=LoRa.LORA, frequency=863000000, power_mode=LoRa.ALWAYS_ON, tx_power=14, bandwidth=LoRa.BW_250KHZ, sf=7, preamble=8, coding_rate=LoRa.CODING_4_5, tx_iq=False, rx_iq=False)LORA communication is working well, I do not see any difference.
best regards,
Stephan G -
@sjgeitel I found in RFM95 documentation some usefull information
Mode of LoRa
medium range: bandwidth=LoRa.BW_250KHZ,coding_rate=LoRa.CODING_4_5,sf=7
fast short range: bandwidth=LoRa.BW_500KHZ,coding_rate=LoRa.CODING_4_5,sf=7
slow long range: bandwidth=LoRa.BW_125KHZ,coding_rate=LoRa.CODING_4_8,sf=9
very slow long range: bandwidth=LoRa.BW_125KHZ,coding_rate=LoRa.CODING_4_8,sf=12 -
@sjgeitel Have you change the blocking mode property?
lora_sock = socket.socket(socket.AF_LORA, socket.SOCK_RAW) lora_sock.setblocking(False) -
Hi @Clemens, apologies this slipped through! I'm making the corrections to the docs now and will follow up when the new version is online!
Sorry, we let you down on this one!
Feel free to drop me an email at alex@pycom.io if you catch anything like this again!
Sincerely,
Alex
-
@bucknall Is the documentation up to date? see https://forum.pycom.io/topic/888/lopy-super-twin-pack-not-working
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login