-
Notifications
You must be signed in to change notification settings - Fork 131
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
Azure IOTHub #225
Comments
I have re-followed the example code for the Azure IOT Hub and I keep getting stuck here, any ideas? Modem Connected to Rogers' LTE (channel--> 38) CAT-M (preferred network). TLE CAT-M OK
|
@ejri Hello, can you please post your code for ESP32 + SIM7000G for IoT Hub to which you came two years ago, is it still working, is it relevant? |
@Gavo4 I also had problems with my LTE connection, I solved it by setting commands from another example. https://github.com/botletics/Botletics-SIM7000/blob/main/examples/ESP32_LTE_Demo/ESP32_LTE_Demo.ino I have a question for you, the content of the message |
@MIKHANYA I will try this over the weekend. I tried a number of samples and could get nothing to work. No issue to set it up via Wi-Fi but with LTE I could not get it to work at all. I will check this out and advise |
I changed esp32 board, to newer from China "ESP32-WROOM-32E" . And I get STUCKED in that place too. |
Initializing SNTP error means that you're not really connected to a network. the way the esp32 hardware architecture is set up is that you must enable and include the wifi.h library and enable the wifi module to power up the rest of the esp module. Otherwise, it will not connect to any network, including cellular. Insane architecture because it defeats the purpose of power management. In other words,
I have not tested this on new versions of the board (if there are any). |
@ejri I am still having connection issues to the IOT Hub All the AT Commands are working for the exception of the Error Error: Time:Sun Aug 6 14:13:46 2023 File:.pio/libdeps/esp32doit-devkit-v1/ESP32 Azure IoT Arduino/src/az_iot/iothub_client/src/iothub_client_ll.c Func:IoTHubClient_LL_CreateFromConnectionString Line:824 deviceId is not found Any idea what this can be?, below is the terminal output AT OK OK OK +CPIN: READY OK SIM7000G R1529 OK +CEREG: 0,2 OK +CGREG: 0,2 OK +CEREG: 0,2 OK +CGREG: 0,2 OK +CEREG: 0,2 OK +CGREG: 0,2 OK +CEREG: 0,2 OK +CGREG: 0,2 OK +CEREG: 0,2 OK +CGREG: 0,2 OK +CEREG: 0,2 OK +CGREG: 0,2 OK +CEREG: 0,2 OK +CGREG: 0,2 OK +CEREG: 0,2 OK +CGREG: 0,2 OK +CEREG: 0,2 OK +CGREG: 0,2 OK +CEREG: 0,2 OK +CGREG: 0,2 OK +CEREG: 0,2 OK +CGREG: 0,2 OK +CEREG: 0,2 OK +CGREG: 0,2 OK +CEREG: 0,1 OK +CEREG: 0,1 OK +CEREG: 0,1 OK OK OK +CEREG: 0,1 OK +CSQ: 23,99 OK SHUT OK OK OK OK OK OK OK OK +SAPBR: 1,1,"100.108.194.200" OK OK OK OK OK OK 100.108.194.200 OK +CGATT: 1 OK 100.108.194.200 OK 100.108.194.200 OK OK 869951035890064 OK
OK |
@ejri in this part below have just used the connection string from the Shared access policies on the IOT Hub under the IOTHubOwner primary connection string. I assume we just need to enter that? /// Primaty Connection String/// |
it seems to connect to the internet just fine. Try making an http request to anything other than Azure to be certain. It seems that the issue is at the IoT Hub. Double check the connection string, try connecting in different ways. for example using the host name approach. On the Azure end, make sure that data can be uploaded properly. For example, it will only accept data in very specific timedate formats. Make sure that the data type you upload is consistent. For example, if you are uploading x = float, dont change it to x = string kind of thing, and see if that makes a difference. You can also try to connect to IoT Hub from somewhere else, for example python api to make sure that data is there are no issues uploading data to iot hub. |
@Gavo4 How did you manage to solve the problem with freezing at the
initialization, my esp32 just restarts after some time with
Are you using LilyGO-T-SIM7000G board or other setup? |
@MIKHANYA I know have the same issue....I will re-test tonight and see what is going on.... |
@ejri Sorry, of course, this may seem rude, but it seems to me that your tests were not clean. |
I mean, I have been using those in the field where there is no wifi, as it is running only on cellular. I have been using those for over 3years now. Check what others have posted. It literally shows that the module connects to the internet. As I said in an earlier comment, how you set up IoT Hub and the type of data you upload matters. Also check if you can connect to any other website. |
My code is no different from yours, I just commented out everything related to reading sensors. And commented this lines:
all I added is my connection string. Please tell me what is your test setup, and what versions of libraries did you use ? @ejri can you explain how this code transmits data over the network via GSM SIM7000G, because further in the code, after message generation:
there is not a single at command that would communicate with the module. Does this code work through SIM7000G GSM only mode? modem.setNetworkMode(13); it seems that no but how does this affect the transmission at all, because it is only a type of network!? |
Hi There,
I am trying to connect to the Azure IOT using the example code. Looks like there is a TCIP issue with the existing code. The sample code also look a little old. Is there a new update?
Regards,
Gavin
The text was updated successfully, but these errors were encountered: