News:

Let's find out together what makes a PIC Tick!

Main Menu

HSerOut Compatability Question?

Started by Craig, Dec 09, 2021, 07:36 PM

Previous topic - Next topic

Craig

Hi just a Quick Question?
using Positron8 Ver 4.0.1.2 on Pic 18F47K42 @ 64Mhz.

Just a Note my GSM Modem SARA-G350 UBlox Click works fine and can send and receive various Text Command but, I am still battling with Getting an Airtime Balance Request, I have tried various Sim Cards from Different Service Providers in South Africa obviously Changing the Command String to match the Service Provider but, they all return the same, +CME ERROR: operation not supported when an Airtime Request is done.

Is the "\" Back slash still supported in the HSerOut Command String ?
In the Older Proton Compiler it was but, does not seem to be compatible in Positron 8 now?

I have tried Replacing the \ with a 92 ASCii but, does not work.

If I use this command string it will give an error on Compilation!  " CUSD Not Found "
HSerOut ["at+cusd=1,\"*141#\",15",13]                'This Same Command Worked on the older Proton Compiler for years!

_________________________________________________________________________

If I send the Following Command from the UBlox M-Center Terminal Test Program to the GSM Modem then it works perfectly and returns
the Airtime Prepaid Balance.
AT+CUSD=1,"*141#",15

+CUSD: 1,"Airtime:R28.37

1. Buy
2. Self Service
3. MTN Menu
4. DoubleYourBundle
5. SkaWara
6. MyMTNOffers
7. MyEveryday
8. YelloBucks

0. More",0

OK

_________________________________________________________________________

If I Use Positron 8 and send the Following Command it Returns a +CME Error but, the command is correct and has been tested on the M Center Terminal Program?
HSerOut ["AT+CUSD=1","*141#",15,13]
This Compiles correctly and sends but, Always Gives a +CME ERROR: operation not supported.
It will NOT work if I leave the ,13 off at the end of the command string, then it does Not respond!
________________________________________________________________________

Any Help and Direction will be much appreciated
Regards
Craig

 


trastikata

#1
Craig, have you tried sending other commands with the hardware USART command, that's to say does the hardware bit rate work correctly?

Ignore that, I just took a look at the AT - command set, I think the problem is the missing quotation marks as part of the string to send, try this:

HSerOut ["AT+CUSD=1,",34,"*141#",34,",15",13]

P.s. Gamboa and I were writing at the same time :)

Gamboa

Craig,
Last test!

Modem Debug string is: AT+CUSD=1,"*141#",15. test OK

Serial port microcontroler message should be : HSerOut "AT+CUSD=1",34,"*141#",34,"15",13
or
HSerOut "AT+CUSD=1",34,"*141#",34,15,13

Regards,
Gamboa
Long live for you

trastikata

Gamboa,

,15 or "comma fifteen" is part of the string and since all AT commands are strings, it should be sent as such, as I see it:

HSerOut ["AT+CUSD=1,",34,"*141#",34,",15",13]

M.jpg

Craig

Thank you Gamboa and thanks very much Trastikata the command string works perfectly.
HSerOut ["AT+CUSD=1,",34,"*141#",34,",15",13]

I had tried so many variants of this string!

Thank you for all your help very much appreciated!
Regards
Craig