Open kaizhongchou opened 5 years ago
I got the same problem. The code failed to attach service. I tried with three mobile operator SIM cards.
I got the same problem. I use the DFRobot_SIM7000_MQTT sample code, The code at attacthService() failed to attach service, AT command AT+CIICR failed。
I have the same problem, the sim7000.attacthService(), fails on every example. The AT command code works, and i can read HTTP data and FTP data, over Telstra NB-IOT, but the sim7000.attacthService() fails every time. There must be a way to set the APN in these code example ??? cant find it
有人解决了这个问题吗?
the same problem. Someone know how to solve it?
Anybody work this out? have the module working perfectly with AT Tester, looks like we are all having the same issue
Did anyone end up fixing this?
Yeah there was a spelling error in the library
I fixed it by going through the library and example code, and changing “attacth” to “attach” and it worked. Depending on what your doing, I would recommend using a different library
I am having the same issue and i changed “attacth” to “attach” in the .h file and the .cpp but it still doesn't work
@tangjie133 I also changed the apn in the .cpp file
Dont use this library, its full of errors and in the end, I never got it to work correctly. For the sim7000 your looking for the botletics library, in particular v 1.0.2. When I used this it worked straight away and theres also alot of support on their github. Hope this helps, if you get stuck let me know and ill send you some demo code ect
@wilba84 I have looked at using the botletics library but I can't seem to get it working.
I tried this and a lot of other methods but i keep getting "Couldn't find Fona" and it doesnt respond to the AT command if i look in the serial monitor.
I literally just want to send a simple HTTP POST or GET request containing the GPS latitude and longitude. I have been trying for days but nothing actually wants to work for me atm.
`#include "Adafruit_FONA.h"
SoftwareSerial fonaSS = SoftwareSerial(8,7); SoftwareSerial *fonaSerial = &fonaSS; Adafruit_FONA_LTE fona = Adafruit_FONA_LTE();
void setup () { Serial.begin(9600); pinMode(ltePort,OUTPUT); digitalWrite(ltePort,HIGH); fonaSS.begin(9600); delay(2000); if (! fona.begin(fonaSS)) { Serial.println(F("Couldn't find FONA")); while(1); // Don't proceed if it couldn't find the device } } void loop(){
}`
Do you have an example I could see that would be greatly appreciated
I can send you some stuff when I get home from work. Meanwhile, try the botletics library v1.0.2 and use hardware serial. The default baud for sim7000 is 115200, try changing yours from 9600
@wilba84 Thanks, I tried following this guide https://forum.core-electronics.com.au/t/dfrobot-sim7000-shield-guide/8280 and ended up trying this code a modified example from botletics with the right pins? https://pastebin.com/ee0uSZ2n
But that doesn't seem to work my console outputs
EDIT: Changing the library version down to 1.0.2 also didn't work with the code above
try this, use the code from "SIM7XXX_LTE_Demo", make sure you switch the library over too. This works with my sim7000, and should give you an idea fona.zip Set your rx tx switch to D7/8 on the module.
@wilba84 Okay that kinda works I tried using this code https://pastebin.com/pj1eaDzP
It finds the board (detects it as 7500 and not 7000 tho) but I can't get either GPRS or GPS to work. This is the output of the serial monitor And this is where the errors happens I tried commenting out the EnableGPS code to see if GPRS would work but that doesn't work either.
Theres a few things going on here. The arduino cant supply enough power for the sim module using usb power. If you plug 12v dc into the arduino, it will supply the sim7000 via the vin pin. Once you do that the module will start replying. I think from memory, you will notice the lights dont turn on or they are dim on the sim7000. After adding the dc power to arduino your sim7000 lights should turn on. Let me know how you go
@wilba84 I am afraid that isn't the issue i am currently powering the module using barrel jack and a 12v adapter and i mean it looks to be communicating with the module since it says it found something
Do you have the same issue with it finding the wrong module using the. “Sim7xxxx lte demo” that I sent you?
Also I can see in the pastebin code that you need to init a different serial port, and use jumper wires from that port back to d7/8. This will allow the modules to communicate via serial but have their own lines for debugging
Do you have the same issue with it finding the wrong module using the. “Sim7xxxx lte demo” that I sent you?
No, thats the same
Also I can see in the pastebin code that you need to init a different serial port, and use jumper wires from that port back to d7/8. This will allow the modules to communicate via serial but have their own lines for debugging
I am not really sure i understand
The switch on the sim7000 allows you to select where rx and tx go on the shield, 0/1 serial pins are used by usb for the serial monitor so you can debug. By selecting 7/8 your sending serial there on the sim7000 but you need to bridge the connection to a spare serial port on the arduino. ive just realised your not using a arduino mega, so you only have a single hw serial port(0,1) which is already used by usb debug. You will have to go back to software serial and set it up for 7/8
The switch on the sim7000 allows you to select where rx and tx go on the shield, 0/1 serial pins are used by usb for the serial monitor so you can debug. By selecting 7/8 your sending serial there on the sim7000 but you need to bridge the connection to a spare serial port on the arduino. ive just realised your not using a arduino mega, so you only have a single hw serial port(0,1) which is already used by usb debug. You will have to go back to software serial and set it up for 7/8
So how exactly would I go about doing that :)
Ill be home in 5 hours, ill write the code, test it on mine with soft serial and send you everything :)
Thank you so much
So, I have tested using AT Command Tester and there I can get a connection and an IP so cellular works and GPS also works. So the issue must be somewhere in this library properly in the attacthService void
This is the library with the only modification being made was changing the APN in attacthService in from cmnet to internet that my provider uses as APN but it still doesn't work even though it works in the AT Command Tester Software.
https://gist.github.com/danielkp1234/ab2ea90e5b47bd3070b7c0707d06bb61
@tangjie133 Sorry for pinging you but could you look into this issue with the library
@danielkp1234 Can I talk with you on discord to go through some stuff?
@danielkp1234 Can I talk with you on discord to go through some stuff?
Well unfortunately i am going to be very busy today besides i think we might be in different time zones. But do you know how i could see the seriel print that is used in the .cpp libary file? That could maybe help find the issue
Yeah you can open it in notepad and search for particular words.
Yeah you can open it in notepad and search for particular words.
What? If i add a serial print in the libaray .cpp file i cant see the output anywhere but the issue must be in the attacthService function
Hi everyone!
First of all, thanks to the community for the help. Secondly, I have purchased a DFROBOT with SIM7000A and I am having the same problems as many here...
I've been through dozens of threads trying to figure out or solve the problem, but I can't... I have contacted DFROBOT support but they don't answer the right questions.
1/ Impossible to validate the AT+COPS=1,2, "302220". It always returns an error despite the fact that the network in question is detected
2/ I bought the license of the software AT command tester, but I don't have the code to make it work and it is impossible to find it on the web.
3/ during my test phases, it is also impossible to attach a service...
Many problems on this module that I hope you can help.
For information, I am with TELUS with an iot card. The arduino mega 2560 that I use is powered in 12v separately.
Thanks and have a nice day.
EDIT: and now, I've an error when I try to make AT+COPS=? ... In an other module, I've not this error ...
Hi Gwen, The only way to get this module working is to use the botletics library for the sim7000, which means dfrobot support wont help. Within that library, there is demo code that shows you how it works and what you may need to change specifically for you.
Have a go with the fona.zip above, dont forget to swap out the library. It looks like the module is responding in the screenshot but I did find that some arduinos dont pass 12v through the vin pin, from memory it was the genuine ones that dont pass it.
let me know how you go, Youll get there
Hi Wilba!
First of all, thanks for your help on this problem... I did dl the included FONA and deleted all the libraries present.
I managed to start the program, but if I get nothing in response...
I also followed the tutorial here: Code from Luke 109362 in Core-electronics
and regrouped with the information from DFRobot...
#define FONA_PWRKEY 12
#define FONA_RST 7 // No RST pin for SIM7070
#define FONA_TX 10 // Microcontroller RX
#define FONA_RX 7 // Microcontroller TX
Is this a good idea?
Also attached is a picture of the installation in question.
Am I stupid ?
Thanks a lot again :-)
I also tried with AT command tester for simcom module and I get this:
The module isnt responding when you use the code I used. Comparing your screenshots, first one has it responding with error at 19200 and no response at 115200. If you change serial begin and fona serial to 19200, it might start responding. I used jumper wires from 7/8 to serial1 for hardware serial. Reason being that the software serial library doesnt work for it, and you should be keeping serial0 clear for usb/debug.
Thank you, do you have a picture of your wiring?
Also, did you change the port definitions?
#define FONA_PWRKEY 12
#define FONA_RST 7 // No RST pin for SIM7070
#define FONA_TX 10 // Microcontroller RX
#define FONA_RX 7 // Microcontroller TX
You only need the pwrkey definition, which is correct at 12. The rx/tx definitions dont matter as they are for software serial and we are using hardware serial.
in regards to wiring, the sim7000 only has two options using the switch 0/1 which is already used for usb and debug or 7/8 which is for software serial.
what we are going to do is set the shield to 7/8 and instead use jumper wires to rx/tx1. D7 = RX1, D8= tx1
Hi guys recently join to this community. I need help with my sim7000a shield. My error its failed to attach service Im using arduino uno, tmobile sim card. Thanks for the help!!
Hi Dici! Its hard to tell but I dont think your simshield is responding to the AT commands. Normally you would get “OK” responses. Try the AT command tester directly with the shield and verify the Baudrate
I try that but never received a respond
On Thu, Jun 13, 2024 at 20:45 wilba84 @.***> wrote:
Hi Dici! Its hard to tell but I dont think your simshield is responding to the AT commands. Normally you would get “OK” responses. Try the AT command tester directly with the shield and verify the Baudrate
— Reply to this email directly, view it on GitHub https://github.com/DFRobot/DFRobot_SIM7000/issues/8#issuecomment-2167013694, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJDKDWVVOFPNYS65F6T7573ZHI4I5AVCNFSM6AAAAABJEMLMZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRXGAYTGNRZGQ . You are receiving this because you commented.Message ID: @.***>
I used the guide too. And nothing
On Thu, Jun 13, 2024 at 20:45 Yarib Berrios @.***> wrote:
I try that but never received a respond
On Thu, Jun 13, 2024 at 20:45 wilba84 @.***> wrote:
Hi Dici! Its hard to tell but I dont think your simshield is responding to the AT commands. Normally you would get “OK” responses. Try the AT command tester directly with the shield and verify the Baudrate
— Reply to this email directly, view it on GitHub https://github.com/DFRobot/DFRobot_SIM7000/issues/8#issuecomment-2167013694, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJDKDWVVOFPNYS65F6T7573ZHI4I5AVCNFSM6AAAAABJEMLMZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRXGAYTGNRZGQ . You are receiving this because you commented.Message ID: @.***>
Can you post a photo of how the hardware is set up and a screenshot of the at tester please
I can’t upload a photo of the tester example because I’m not in my home and I don’t have the shield right now with me. But I can send you the program and what I write.
But when when I run the AT TEST, it upload good but when the program ask me ENTER YOUR AT COMMAND, I enter the examples that the program give me. Like you see in the picture below, I use anyone of that.
And it never responds
On Thu, Jun 13, 2024 at 21:02 wilba84 @.***> wrote:
Can you post a photo of how the hardware is set up and a screenshot of the at tester please
— Reply to this email directly, view it on GitHub https://github.com/DFRobot/DFRobot_SIM7000/issues/8#issuecomment-2167028145, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJDKDWSBT3GOC7KQQ5W3WWDZHI6J3AVCNFSM6AAAAABJEMLMZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRXGAZDQMJUGU . You are receiving this because you commented.Message ID: @.***>
I can’t upload a photo of the tester example because I’m not in my home and I don’t have the shield right now with me. But I can send you the program and what I write.
But when when I run the AT TEST, it upload good but when the program ask me ENTER YOUR AT COMMAND, I enter the examples that the program give me. Like you see in the picture below, I use anyone of that.
And it never responds
On Thu, Jun 13, 2024 at 21:02 wilba84 @.***> wrote:
Can you post a photo of how the hardware is set up and a screenshot of the at tester please
— Reply to this email directly, view it on GitHub https://github.com/DFRobot/DFRobot_SIM7000/issues/8#issuecomment-2167028145, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJDKDWSBT3GOC7KQQ5W3WWDZHI6J3AVCNFSM6AAAAABJEMLMZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRXGAZDQMJUGU . You are receiving this because you commented.Message ID: @.***>
Not the AT TESTER sketch, use the AT Command Tester program from simcom and plug directly into the sim7000 shield via usb
Ok well tomorrow I will send the pictures using that program ok.
Thanks, let’s continue tomorrow
On Thu, Jun 13, 2024 at 21:35 wilba84 @.***> wrote:
Not the AT TESTER sketch, use the AT Command Tester program from simcom and plug directly into the sim7000 shield via usb
— Reply to this email directly, view it on GitHub https://github.com/DFRobot/DFRobot_SIM7000/issues/8#issuecomment-2167052356, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJDKDWU6XVLZ7V5MUP3TAY3ZHJCE5AVCNFSM6AAAAABJEMLMZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRXGA2TEMZVGY . You are receiving this because you commented.Message ID: @.***>
i saw that my trial time expired. I buy a license but they said that i need to wait 24 hours to receive the license.
My bad guys and thanks for the help
El jue, 13 jun 2024 a la(s) 9:36 p.m., Yarib Berrios @.***) escribió:
Ok well tomorrow I will send the pictures using that program ok.
Thanks, let’s continue tomorrow
On Thu, Jun 13, 2024 at 21:35 wilba84 @.***> wrote:
Not the AT TESTER sketch, use the AT Command Tester program from simcom and plug directly into the sim7000 shield via usb
— Reply to this email directly, view it on GitHub https://github.com/DFRobot/DFRobot_SIM7000/issues/8#issuecomment-2167052356, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJDKDWU6XVLZ7V5MUP3TAY3ZHJCE5AVCNFSM6AAAAABJEMLMZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRXGA2TEMZVGY . You are receiving this because you commented.Message ID: @.***>
guy i received the license yes!!!!!! what i need to do
El vie, 14 jun 2024 a la(s) 8:39 p.m., Yarib Berrios @.***) escribió:
i saw that my trial time expired. I buy a license but they said that i need to wait 24 hours to receive the license.
My bad guys and thanks for the help
El jue, 13 jun 2024 a la(s) 9:36 p.m., Yarib Berrios @.***) escribió:
Ok well tomorrow I will send the pictures using that program ok.
Thanks, let’s continue tomorrow
On Thu, Jun 13, 2024 at 21:35 wilba84 @.***> wrote:
Not the AT TESTER sketch, use the AT Command Tester program from simcom and plug directly into the sim7000 shield via usb
— Reply to this email directly, view it on GitHub https://github.com/DFRobot/DFRobot_SIM7000/issues/8#issuecomment-2167052356, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJDKDWU6XVLZ7V5MUP3TAY3ZHJCE5AVCNFSM6AAAAABJEMLMZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRXGA2TEMZVGY . You are receiving this because you commented.Message ID: @.***>
Plug the shield in directly and open command tester, try sending commands to see if you get a OK response
Now I have this
On Fri, Jun 14, 2024 at 20:56 Yarib Berrios @.***> wrote:
On Fri, Jun 14, 2024 at 20:55 wilba84 @.***> wrote:
Plug the shield in directly and open command tester, try sending commands to see if you get a OK response
— Reply to this email directly, view it on GitHub https://github.com/DFRobot/DFRobot_SIM7000/issues/8#issuecomment-2169007729, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJDKDWQABRAAQNWD34NGC7LZHOGGLAVCNFSM6AAAAABJEMLMZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRZGAYDONZSHE . You are receiving this because you commented.Message ID: @.***>
I use the DFRobot_SIM7000_UDP sample code, and I meet a big problem that fail to attach service. I try a lot of function to connect the APN using AT+CSTT, AT+CIICR, AT+CIFSR those AT command, but i still can't attach service.