I need help, i am working with Arduino UNO and a GPRS shield, which is powered with an adapter that outputs 12v 500mA. The sim card is placed properly, i checked this with the AT+CPIN? command, but when i try to check the signal level with AT+CSQ?, it just return error. Please can someone help me.
AT+CSQ? isn't a valid command, however AT+CSQ is - remove the ?.
The command appears to be wrong. Probably these are what you were looking for:
AT+CSQ=?: This command is to request the supported RSSIs (Received Signal Strength Indication) and BERs (Bit Error Rate). You might want to get this information before requesting the current cell signal level.
AT+CSQ: And this command is to request the current cell signal level.
Here is the result from my SIM808 module:
AT+CSQ=?
+CSQ: (0-31,99),(0-7,99)
OK
AT+CSQ
+CSQ: 25,0
OK
So that means:
0-31,99: Supported RSSIs
0-7,99: Supported BERs
25,0: Currently, the RSSI value is 25 and the BER value is 0
Please refer here for further details.
Related
I am working on an Ethernet driver for the Digilent Nexys4 board (Artix7 FPGA). I have written a VHDL component to communicate with the LAN8720A PHY in MDIO protocol. It works well, When I send a frame asking to write in a register, I can read the value I wrote. But when I ask to read the Basic Status Register, it returns a link down status.
That means the Ethernet link is down and I cannot send Ethernet frames. I have absolutely no idea of why I have the link down status. Even when I let the auto-negociation enabled, after the auto-negiacion is over when I try to send a frame, I have a link down status.
Does anyone have an idea of why this is happening and maybe how I can fix this ?
Thanks.
EDIT : it seems it is because of the DATA_VALID signal of the LAN8720A. Does anyone know how can I set the signal to '1' ?
EDIT2 : for more precisions, DATA_VALID is an internal signal of the LAN8720A. It is used to pull up or down the link state bit of the status register.
I have found a solution to my problem : I did not respect the interframe time. Now that I respect the interframe time, the link state does not go down, it stays up. Though the frame is still not sent, it is a great step forward.
I'm building a project based on Socket-IO-client from here https://github.com/timum-viw/socket.io-client
I need to turn off all serial data being printed except what I send to serial. I've tried removing #define USE_SERIAL and removing or changing USE_SERIAL to use Serial1 port also edited SocketIOClient.cpp to remove debug statements in there but still getting a lot of this...
[WS][0][sendFrame] sending Frame Done (4506us).
[WS][0][handleWebsocketWaitFor] size: 2 cWsRXsize: 0
[readCb] n: 2 t: 597463
[WS][0][handleWebsocketWaitFor][readCb] size: 2 ok: 1
[WS][0][handleWebsocket] ------- read massage frame -------
[WS][0][handleWebsocket] fin: 1 rsv1: 0 rsv2: 0 rsv3 0 opCode: 1
[WS][0][handleWebsocket] mask: 0 payloadLen: 1
[readCb] n: 1 t: 597478
[WS][0][handleWebsocket] text: 3
I want to receive a websocket Message and print that to serial so arduino mega can read that serial passed to it. I don't want to have to parse all the serial being printed to find the message I actually need.
I'm using a basic nodemcu esp8266 12E module, coding with arduino ide 1.8.5. I'm sure there is something easy I'm missing.
It is very simple actually. In socketIoClient.h you have a define like so:
#define SOCKETIOCLIENT_DEBUG(...) Serial.print(__VA_ARGS__);
You can change it to:
#define SOCKETIOCLIENT_DEBUG(...) do{} while(0);
or simply:
#define SOCKETIOCLIENT_DEBUG(...)
That should rid you of the debug messages but I reckon that esp8266 by itself prints some debug messages to UART too at some special events like connecting or disconnecting to an AP. You may need to follow this from espressif's API reference:
"os_install_putc1((void *)uart1_write_char) in uart_init will set os_printf to be output from UART 1, otherwise, os_printf default output from UART 0."
os_printf is used as default printing function by the OS as well as many applications. Arduino's Serial lib should use uart0 directly and not os_printf so doing the above would only rid you of the messages the OS produces.
I knew it was simple and I was overlooking something. Solomons answer makes sense but I solved it right before checking Stack Overflow and seeing his post. The solution was a combination of his answer or commenting out the debug statements in the .cpp file but also needed was to go in to Arduino IDE tools menu and set DEBUG PORT to "disabled" and DEBUG LEVEL to "None". I had already tried that before but a mistake in my code had made me think that turned off all serial communication. But revisiting that with new code produced the desired results of only printing my
Serial.print();
statements thanks for the help though.
I would like to do 2 things.
Recognize when someone is calling - In terminal will appear RING and to answer I have to send command ATA. But How can I recognize it when I am doing something else. Should I use new thread and read port until send RING? Is there any beter solution?
What is a symbol of end of response? I'm reading char using for(), but I do not know number of signs. Example below doesn't work properly
while(readCharUART()!=10) {};
while(readCharUART()!=13)
{
getchar() = ..
}
You are on the right track.
For RING then yes, the correct way to do it is to have one thread just read modem responses until you get the Unsolicited result code RING. If you from time to time want to run AT commands (say ATA), then you should let this thread do that as well, e.g. you have one thread that takes care of both issuing AT commands and monitor for UR codes.
Regarding formatting of responses from the modem, this is well described in chapter 5.7.1 Responses in the ITU V.250 standard. Short summary (reading the spec is highly recommended!):
<header>RING<trailer>
where header and trailer is both "\r\n" (unless the modem is configured strangely).
i have a device outputting an data with 19200 baud.
The pic has been configured with SPBRG=12 BRGH=0 start and stop bits have been taken into account.
Nevertheless the pic doesn't receive the correct data!
The data sent has been verified with hyper terminal and oscilloscope.
i can't find the error! Damn
any help?
Thx
Besides the electrical, on some versions of PIC24 (actually I use dsPIC33, but they are much the same) there is also peripheral pin select to deal with. I also set TRIS appropriately, but I think that is not necessary.
I am trying to run the sample C program that came with my NI USB-6008 DAQ card. I am trying to run the "ContGen-ExtClk.c" example. I get the following error when I build the program:
DAQmx Error: Requested value is not a supported value for this property. The property value may be invalide because it conflicts with another property.
Property: DAQmx_SampTimingType
Requested Valeu: DAQmx_Val_SampClk
You Can Select: DAQmx_Val_OnDemand
Task Name: _unnamedTask<0>
Status Code: -200077
End of program, press Enter key to quit
If anyone is familiar with the USB-6008, I would appreciate the help. Thanks!
Turns out it is a hardware issue with how many samples can be sent over the analog out channel... dunce move.