AT Command to change frame size gives ERROR - gsm

I'm using a SIM900A GSM Shield to communicate between an arduino due and an API.
I currently using it's default values in the multiplexer of GSM Shield. But now I'm in need of changing it's frame size to 255. When I check the current frame size, it gives following response which indicates the frame size as 127.
CMUX Read:AT+CMUX?
+CMUX: 0,0,5,127,10,3,30,10,2
OK
Then I used following AT command to change it to 255. But it gives an ERROR.
sim900_send_cmd("AT+CMUX=0[,0[,1[,255[,10[,3[,30[,10[,2]]]]]]]]\r\n");
CMUX Read:AT+CMUX=0[,0[,5[,255[,10[,3[,30[,10[,2]]]]]]]]
ERROR
What am I doing wrong here ? am I missing a step ? Any insight will be much appreciated. Thank you

I'm not an expert in AT commands, but I bet you don't need all the brackets in yours. Brackets are used to indicate parameters which could be omitted. So your command should look like this:
CMUX Read:AT+CMUX=0,0,5,255,10,3,30,10,2
Maybe even a shoter version will work:
CMUX Read:AT+CMUX=0,0,5,255

Related

ESP32 invalid segment length 0x15abba12 when doing Update.writeStream()

I recently had to downsize my ESP32 WROVER package down to 8MB from 16MB before, due to component unavailability.
This broke my update process, showing the invalid segment length 0x15abba12 error message while doing Update.writeStream().
I wrote my new 8MB partition as follows (I use FFAT):
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xE000, 0x2000,
app0, app, ota_0, 0x10000, 0x2A0000,
app1, app, ota_1, 0x2B0000, 0x2A0000,
ffat, data, fat, 0x550000, 0x2B0000,
My firmware.bin size is 1.4MB (1411248, or 0x1588B0).
What am I missing?
Ok. Weird enough. It appears that the firmware.bin produced as usually by platformio had some issues, hence the segment fault.
By simply recompiling and linking again, the produced firmware.bin was OK and the update completed successfully.
=> So if you face similar segment fault issue, try to rebuild your firmware bin file before loosing time to debug your actually working code.

9 axes motion shield

I am having some issues getting stock code to compile for my 9 axes motion shield. I have a github repository with all of the motion libraries I have, the example code, and the error messages I am getting.
I am using Arduino 1.7.1 IDE on Windows 7 64-bit.
I have tried using sample code for the sensor instead of for the shield and could not get that to compile either. I have tested example code built into the IDE to ensure that I can compile something and I was even able to interface with my Arduino MEGA 2560 with said code.
I have searched Google and Stack exchange a fair bit and have not managed to come up with any solutions.
The main error I can not figure out is:
"
C:\Users\LJI_eric\Documents\Arduino\sketch_mar20a\sketch_mar20a.ino: In function 'void setup()':
sketch_mar20a:63: error: 'OPERATION_MODE_NDOF' was not declared in this scope
mySensor.setOperationMode(OPERATION_MODE_NDOF);"
OPERATION_MODE_NDOF is a mode that is defined in BNO055.h and is an array of operation modes. I tried several other modes to no avail.
I would appreciate any and all help.
On line 84, 87 and 91 you have made a new line inside a string. You can not do that on the Arduino. If you want to break a string up in more lines you should end the string where you would break it, and start the string again on the new line, like this.
Serial.println("Move the device around and then place it at one position.\n"
"Change the threshold and duration to increase the difficulty level.");
Then you should change OPERATION_MODE_NDOF to BNO055_OPERATION_MODE_NDOF

Is there a length limitation of qDebug()<<?

In my code, I found one qDebug()<<s; didn't output the content given to it. It's very strange, so I output s.length(). It says 135254, so I'm wondering whether there is a limitation of length which is shorter than 135254? I have read the source header and do not find the result.
i noticed something similar...
This might narrow it down a bit (using Qt 5.5.1 with Windows mingw):
45000 character trace did not show up in qDebug.
10000 character trace did show up in qDebug.
I was able to qDebug my 45000 characters as 5 separate qDebug calls, each was something like this:
qDebug()<<foo.mid(20000, 10000);
then piece them together in a text editor.
it may have been a little nicer to use qDebug's noQuotes feature too, but i don't need to run my script again today so I'm not prettying it up right now.

G510 FIBOCOM some at commands return ERROR in some commands

I use two FIBOCOM G510 GSM modems but one of them returns ERROR in some commands like:
AT+CMGF=1\r, AT+CPIN=? returns ERROR.
But some like ATE0\r, AT+CLIP=1\r, AT+CBAUD?\r returns OK.
I use baudrate 115200.
Q1:ATE0\r
R1:\r\nOK\r\n
Q2:AT+CBAUD?\r
R2:\r\n+CBAUD: 115200\r\n\r\nOK\r\n
Q3:AT+CPIN=?
R3:\r\nERROR\r\n
Q4:AT+CMGF=1
R4:\r\nERROR\r\n
Is there something I should set first or is it simcard issue or modem fault?
My other unit works good but I tested it 3 months ago and I think I would use some additional commands to prepare.
I am confuse what's its wrong?
I checked sim card wiring for 3rd time and I found cardinal mistake. Socket was upside down and even wires was connected to the "right place" it did not comunicate.
After rewiring modem starts to work well.
Q5:AT+CPIN?\r
R5:\r\n+CPIN: READY\r\n\r\nOK\r\n

AT+CMGS returns ERROR

I am using SIM900 GSM module connect to my AVR Microcontroller.
I tested it with FT232 to see transmitting data.
First Micro sends AT it will response OK
AT OK
AT+CMGF=1 OK
AT+CMGS="+9893XXXXXX" returns ERROR and doesn't show ">"
Could anybody advise me what to do?
Command AT+CSCS? will answer You what type of sms-encoding is used. Properly answer is "GSM", and if not, You should set it by command AT+CSCS="GSM".
And remember about "Ctrl+Z" (not "Enter") as a finish of sms text, please.
You aren't passing all the parameters to the command.
The command format is:
AT+CMGS=<number><CR><message><CTRL-Z>
Where:
<CR> = ASCII character 13
<CTRL-Z> = ASCII character 26
You have passed only the number and without the <CR> you won't see the > note for the message.
Example:
AT+CMGS="+9893XXXXXX"
> This is the message.→
The response is:
+CMGS:<mr>
OK
Where <mr> is the message reference.
If AT+CSCS? command returns UCS2, then many arguments need to be encoded as hex string of UTF-16 encoding, so the phone number would become "002B0039003800390033...", and the SMS text would need to be encoded in the same way. If you don't need UCS2 encoding, then the easiest thing to do is to switch to GSM encoding (or another encoding from the available set as shown by AT+CSCS=? command)
Sometimes the issue is the text mode you are in. Enter AT+CMGF? and you should receive +CMGF: 1. If instead you receive +CMGF: 0, enter AT+CMGF=1. This changes the message format from PDU mode to Text mode. I'm not sure what either of those mean exactly, but this fixed my issue.
SIM 800 AT command manual

Resources