GPy LTE-M Connection
-
Hi All,
Is There a way to use the LTE-M module to send data to io.adafruit.com?BR
-
@livius Regards first question: i used the code here: https://docs.pycom.io/chapter/firmwareapi/pycom/network/lte/cat-m1.html...
But I did not have any results...The country is Italy and I have the tim sim..
BR
-
@francesco-gallo
First question is - do you have succesfully connected to LTE CAT M1?
If yes, which provider do you use and in which location (country)For sensors you can use any code sample existed for e.g. wifi
only difference is start point (connection to the network)
next steps are the same create socket and send data
you can use e.g. urequest
https://github.com/micropython/micropython-lib/blob/master/urequests/urequests.pye.g.
import urequests res = urequests.post('your_service_url', json={'MyTemerarureSensorName': str(temp)}) res.close() if (res.status_code - 200) < 100: print("post ok:" + str(temp) + " C") else: print('some error')
-
@livius Thanks...
The update is done...and now is ok..My question is about an example code regards the use of LTE to send temperature value to online service, or send the temperature value to smartphone...
BR
-
@francesco-gallo said in GPy LTE-M Connection:
Is there an example code?
example of what? Updating firmware?
after this step we can go next :)
-
@livius And please, I am a newbie :(.. And I would like learn as send data (e.g. Temperature) using LTE...
Is there an example code?
-
@francesco-gallo
update device because docs fallow firmware and in 1.17 there was big change in LTE
https://forum.pycom.io/topic/2734/new-firmware-release-v1-17-0-b1-completely-new-lte-class
-
Ops...no...
-
-
@francesco-gallo And please, I am a newbie :(.. And I would like learn as send data (e.g. Temperature) using LTE...
Is there an example code?
BR
-
@livius Hi,
sorry, but I have the error message as in figure...
-
@livius Thanks a lot
-
@francesco-gallo said in GPy LTE-M Connection:
How can modify the example from this link?
Back to my first question. You do not know how to send something to io.adafruit.com
not how to send something throught LTE-M1?
Because sample you provided is exacly for LTE-CAT M1 (and there is no diiference between wifi and socket usage)use api provided
https://io.adafruit.com/api/docs/#operation/lastDataand send http request by e.g. urequest
https://github.com/micropython/micropython-lib/blob/master/urequests/urequests.py
-
@livius Hi @livius , thank you for your interest.
My idea is to use the LTE-M module with my SIM to send data (e.g. Temperature Value) to a service like io.adafruit.com.
I don't want to use Wi-fi...How can modify the example from this link? https://docs.pycom.io/chapter/firmwareapi/pycom/network/lte/cat-m1.htmlBR
-
@francesco-gallo
You ask about LTE-M or generic problem with send toio.adafruit.com
?
I suppose that about sending at all. Because there is not difference between wifi and LTE socket use