warthog618 / modem Goto Github PK
View Code? Open in Web Editor NEWA Go driver for AT based modems
License: MIT License
A Go driver for AT based modems
License: MIT License
ATI
FOXCOM MODEM
Quectel_M26
Revision: M26FBR03A04_TTS
AT+GCAP
+GCAP: +CGSM,+FCLASS
AT+CMEE=2
AT+CGMI
FOXCOM MODEM
AT+CGMM
Quectel_M26
AT+CGMR
Revision: M26FBR03A06-TTS
AT+CGSN
012345678912345
AT+CSQ
+CSQ: 28,0
AT+CIMI
510019568278473
AT+CREG?
+CREG: 0,5
AT+CNUM
AT+CPIN?
+CPIN: READY
AT+CEER
+CEER: 0,0
AT+CSCA?
+CSCA: "+62816124",145
AT+CSMS?
+CSMS: 0,1,1,1
AT+CSMS=?
+CSMS: (0,128)
AT+CPMS=?
+CPMS: ("SM","ME","MT"),("SM","ME","MT"),("SM","ME","MT")
AT+CCID?
+CCID: "89620160002701055486"
AT+CCID=?
+CCID: "89620160002701055486"
AT^ICCID?
CME Error: unknown
AT+CNMI?
+CNMI: 2,1,0,0,0
AT+CNMI=?
+CNMI: (0-3),(0-3),(0,2,3),(0-2),(0,1)
AT+CNMA=?
+CNMA: (0-2)
AT+CMGF?
+CMGF: 0
AT+CMGF=?
+CMGF: (0,1)
AT+CUSD?
+CUSD: 0
AT+CUSD=?
AT^USSDMODE?
CME Error: unknown
AT^USSDMODE=?
CME Error: unknown
Don`t support dial from AT command.
ATD+[xxxxx...]
context deadline exceeded
2023/07/31 15:07:36 w:
023/07/31 15:07:36 w: ATZ
2023/07/31 15:07:36 r:
OK
2023/07/31 15:07:36 w: ATE0
2023/07/31 15:07:36 r: ATE0
OK
2023/07/31 15:07:36 w: AT+GCAP
2023/07/31 15:07:36 r:
+CME ERROR: 58
2023/07/31 15:07:36 CME Error: 58
I currently experimenting with a Bluetooth low energy modem and your module.
Much is to my likeing.
However, I have to deal with URCs of this form (having a counted number of binary bytes following the first line):
2024/01/27 21:08:15 r: "+QBLERECV:0,4A414E5A000000000000000000000101,6\r\n\x01\0x2\r\r\x00\xff"
I think this can not be handled out of the box right now. I noticed your interrest is not in handling data,
but neverthesless an extenion like this might be useful:
r := regexp.MustCompile(`^+QBLERECV:0,[0-9a-FA-F]{32},(?P<dtlen>[0-9]+)`)
datahandler := func(info string, data []byte) {
...
}
modem.AddDataIndication(r, datahandler)
what do you think?
Hello,
Can you please implement the Delivery Receipt,
check out this page: http://rednaxela.net/pdu.php
i mean to enable the receipt on message when its delivered i will get a Delivery Receipt Confirmation.
Thank you for this helpfull package.
Hi, I want to get some metadata from SMS, like timestamp
.
Currenly, MessageHandle only pass number and message. How to get other information?
g.StartMessageRx(
func(number, message string) {
log.Printf("%s: %s\n", number, message)
},
func(err error) {
log.Printf("err: %v\n", err)
})
I try to run a USSD code that my carrier not supported. But, It still return success (first line with OK), then second line is +CME ERROR
. That error never return as error in Command()
function. You can try to use USSD example and run any code that not support, the result will be the same as expected.
w: AT+CUSD=1,\"AA584C3602\",15\r\n,
r: \r\nOK\r\n,
r: \r\n+CME ERROR: service option not supported\r\n,
Hi,
how am I supposed to install this ?
when I try to make a go get -u https://github.com/warthog618/modem
it doesn't work.
I want to send USSD code to monitor account balancer. Currently, I have to convert *101#
to 7bit package as AA182C3602
. Then, send in CUSD command +CUSD=1,"AA182C3602",15
. The next step to do is call AddIndication
with +CUSD
, then decode the response from 7bit to UTF-8 string.
How to make it more simple? ๐
gsm7.Pack7BitUSSD
was not just related to SMS, but USSD too. So it should live in an another package?
Hi,
I am trying to select network manually using the command
+COPS?
+COPS: 0,0, "", ,7 //got reply
+COPS=2
AT+COPS=2 //got reply
But then, when I try to fetch my network configurations again using the command:
+COPS?
I get this (without //got reply):
+COPS: 0 //got reply
I am able to use this command correctly using python atcom package. Any ideas where it went wrong?
I am using https://github.com/warthog618/modem/blob/master/cmd/modeminfo/modeminfo.go as base with /dev/ttyUSB0 as my device and commands +CIMI,+CSQ etc. works absolutely fine.
Previously, I successfully connected to the Huawei 12d1:1506
modem. I am currently trying to connect to another Huawei device with the same vid/pid, but it failed.
However, when using gammu-smsd, the software can still connect and receive messages.
I have attached AT log information, and device information taken from the lsusb command.
Can you help me?, Thank you.
https://gist.github.com/giautm/dcec3199abae1504f1fcfddad8e7a652
Hello, i have looked at your library and have been sucessfull in sending SMS', but how would one communicate data, e.g. UDP packets?
Is this supported?
Thanks
Hi,
first of all thanks for sharing this great module.
I would like to know your opinion about the following situation.
When using the at
package to communicate with a modem, which is your suggested way of sending raw data to the modem itself? Example: I issue the command to send data over UDP and, after its execution, the modem listens for a message. Which is a legit way of sending that message to the modem?
I added a commandOption to exclude the 'AT' prefix from the command, such that I am able to send command without 'AT' prefix when I need it.
The reason why I did that is that at
package manages lots of things (e.g. escape characters, catching the modem response) which are perhaps already setup into at
configuration and which I should duplicate to achieve the same results.
I think that sending data without 'AT' prefix is out of the scopes of your package, however may this approach be considered legit? In case it is not, do you have any suggestion?
Thank you,
Nicola
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.