Not getting Sensor Readings in Pysense with FiPy Module
-
@archana-kadam said in Not getting Sensor Readings in Pysense with FiPy Module:
strange because line 15 is just comment line
add this lines before socket connect
print(str(socket.getaddrinfo('192.168.0.109', 80))) print(str(socket.getaddrinfo('192.168.0.109', 80)[0][-1]))and put result here
-
@livius said in Not getting Sensor Readings in Pysense with FiPy Module:
from network import WLAN
import machine
import socket
wlan = WLAN(mode=WLAN.STA)wlan.ifconfig(config=('192.168.0.109', '255.255.255.0', '192.168.0.1', '192.168.0.1')) - you can ommit this line if you need to connect by DHCP
wlan.connect(ssid=‘SK@unifi’, auth=(WLAN.WPA2, '********'), timeout=30000)
while not wlan.isconnected():
machine.idle()if wlan.isconnected():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print(str(socket.getaddrinfo('192.168.0.109', 80)))
print(str(socket.getaddrinfo('192.168.0.109', 80)[0][-1])) #IP of your computer(192.168.0.109) in the same network as your Fipy and port(80) of socket in listen mode on your computer
#your_data = "Hello"
s.send("your_data")
Here is and code and we are getting the same errors i,eTraceback (most recent call last):
File "<stdin>", line 14
IndentationError: unindent does not match any outer indentation levelMicroPython v1.8.6-849-055728a on 2018-02-13; FiPy with ESP32
Type "help()" for more information. -
@archana-kadam said in Not getting Sensor Readings in Pysense with FiPy Module:
IndentationError: unindent does not match any outer indentation level
check if you do not mix indentation as tab and space
PS. use forum formating http://commonmark.org/help/ e.g. triple ``` around the code
-
@livius
We are trying to run the LoRa Nano Gateway code provided in the pycom documentation. We are using three PC's and three fipy boards. In one pc we are running the Gateway.py , second we are running Node.py and in third pc we are running the RawLora.py codes. But we are getting an error in Gateway.py code in Line 26 i,e buffer too small. Is the procedure we are doing is correct? Please reply us soon as possible.
Thank You -
@livius
We are trying to run the LoRa Nano Gateway code provided in the pycom documentation. We are using three PC's and three fipy boards. In one pc we are running the Gateway.py , second we are running Node.py and in third pc we are running the RawLora.py codes. But we are getting an error in Gateway.py code in Line 26 i,e buffer too small. Is the procedure we are doing is correct? Please reply us soon as possible. Its urgent
Thank You -
@archana-kadam
WIthout the code i can only gues that you try to send to big data throught Lora. It is very limited. Check how much data is really sending. -
@livius
I used the codes from provided pycom documentation. Here are the links of the code
https://docs.pycom.io/chapter/tutorials/lora/lora-mac-nano-gateway.html
https://docs.pycom.io/chapter/tutorials/lora/lora-mac.html -
@archana-kadam
in documentation gateway line 26 is empty...
You have some modification which i do no see ;-) -
@livius
recv_pkg_len = recv_pkg[1] is this declaration correct in gateway code. -
@archana-kadam Please share the actual code you are using, no sense trying to guess what you have in your code. In the gateway code as posted in the docs, I don't think it's possible to get that error on that line with the test just before it...
Please make sure your code is properly formatted when you post it (add ``` on a line before and after the code).
-
@jcaron
I am attaching the file of gateway and node code please go through the file and please check update me as soon as possible. Your help will be appreciable.1_1522300805718_Node.py 0_1522300805717_Gateway.py -
@jcaron
We tried the gateway code and node code provided in the documentation, we connected one gateway and one node. The communication between two boards has been created but we are enable to fetch the device number,package etc. So please update for this solution.Thank you
-
@jcaron
Please update to soon. Your help will be appreciable.Thank You
-
Please reply as soon as possible, waiting for your solution. Your help will be appreciable.
Thank you
-
@administrators
Which type of LoRa module your are using in pycom board. Can you please share us the schematic of Fipy development module.Thank you
-
Have you had a look at my forum thread?
https://forum.pycom.io/topic/2908/creating-a-json-structure-for-pysense/9This has me reading all PySense values, packing them into a bytearray for LoRa transmission and the unpacking them at the other end with some simple JavaScript on a Node-red environment.
-
@administrators
I have inserted a sim in a fipy board, now we are not able to connect to the internet of the inserted sim. Please explain the procedure to connect to inserted simThank you
-
The FiPy only supports Cat M1 and NB-IoT networks. Which one are you using?
-
@jmarcelino
Cat M1 we are using -
@administrators
Hello,We are trying to send data from fipy to sever using urequests, but getting an error. We are running code in atom.
import urequests
response = urequests.get("http://localhost/server.php?data="+msg)
response.close()Error Message:
Traceback (most recent call last):
File "<stdin>", line 12, in <module>
ImportError: no module named 'urequests'
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