anthill / quipu Goto Github PK
View Code? Open in Web Editor NEWAn interface for GSM communication in javascript.
An interface for GSM communication in javascript.
ZZZzzzZZZzzz... sleeping ...ZZZzzzZZZzzz
[DEBUG quipu] SMS port opened
[DEBUG quipu] Raw AT message from sms:
^RSSI: 9
^RSSI: 6
^RSSI: 2
^RSSI: 6
^MODE: 3,3
^RSSI: 18
^RSSI: 17
[DEBUG quipu] Raw AT message from sms:
ATE1
[DEBUG quipu] Raw AT message from sms:
OK
AT+CMEE=2
[DEBUG quipu] Raw AT message from sms:
OK
AT+CPIN=6353
[DEBUG quipu] Raw AT message from sms:
AT+CNMI=2,1,0,2,0
[DEBUG quipu] Raw AT message from sms:
AT+CMGD=0,4
[DEBUG quipu] Raw AT message from sms:
OK
[DEBUG quipu] Raw AT message from sms:
^SRVST: 0
[DEBUG quipu] Raw AT message from sms:
^MODE: 0,0
[DEBUG quipu] Raw AT message from sms:
^SIMST:1,0
[DEBUG quipu] INITIALIZED
[DEBUG quipu] Raw AT message from sms:
AT+CMGF=1
OK
[DEBUG quipu] Raw AT message from sms:
AT+CMGS="+33644640016"
[DEBUG quipu] Raw AT message from sms:
>
[DEBUG quipu] Raw AT message from sms:
0init
[DEBUG quipu] Raw AT message from sms:
^z
[DEBUG quipu] Raw AT message from sms:
^MODE: 5,4
[DEBUG quipu] Raw AT message from sms:
^RSSI: 8
[DEBUG quipu] Raw AT message from sms:
^RSSI: 4
[DEBUG quipu] Raw AT message from sms:
^SRVST: 2
[DEBUG quipu] Raw AT message from sms:
^RSSI: 8
[DEBUG quipu] Raw AT message from sms:
^RSSI: 5
[DEBUG quipu] Raw AT message from sms:
^RSSI: 8
[DEBUG quipu] Raw AT message from sms:
^RSSI: 5
[DEBUG quipu] Raw AT message from sms:
^RSSI: 9
[DEBUG quipu] Raw AT message from sms:
^RSSI: 12
^[[A^[[B[DEBUG quipu] Raw AT message from sms:
+CMS ERROR: 500
[DEBUG quipu] Raw AT message from sms:
+CMTI: "SM",0
[DEBUG quipu] received a sms at position 0
[DEBUG quipu] Raw AT message from sms:
+CMTI: "SM",1
AT+CMGF=1
[DEBUG quipu] received a sms at position 1
[DEBUG quipu] Raw AT message from sms:
OK
AT+CPMS="ME"
[DEBUG quipu] Raw AT message from sms:
+CPMS: 20,20,2,50,2,50
OK
[DEBUG quipu] Raw AT message from sms:
AT+CMGR=0
[DEBUG quipu] Raw AT message from sms:
AT+CPMS="ME"
[DEBUG quipu] Raw AT message from sms:
+CMGR: "REC READ","+33644640016",,"15/07/02,11:12:08+08"
status
OK
AT+CMGR=1
[DEBUG 6brain/ant] SMS received: { body: 'status', from: '+33644640016' }
[DEBUG 6brain/ant] commandArgs [ 'status' ]
[DEBUG quipu] Raw AT message from sms:
+CMGR: "REC READ","+33644640016",,"15/07/02,11:15:11+08"
status
OK
AT+CMGF=1
OK
[DEBUG 6brain/ant] SMS received: { body: 'status', from: '+33644640016' }
[DEBUG 6brain/ant] commandArgs [ 'status' ]
[DEBUG quipu] Raw AT message from sms:
AT+CMGF=1
OK
[DEBUG quipu] Raw AT message from sms:
^RSSI: 10
[DEBUG quipu] Raw AT message from sms:
^SMMEMFULL: "ME"
[DEBUG quipu] Raw AT message from sms:
^RSSI: 10
[DEBUG quipu] Raw AT message from sms:
^SMMEMFULL: "ME"
[DEBUG quipu] Raw AT message from sms:
^RSSI: 11
[DEBUG quipu] Raw AT message from sms:
^RSSI: 8
[DEBUG quipu] Raw AT message from sms:
^RSSI: 0
[DEBUG quipu] Raw AT message from sms:
^RSSI: 5
[DEBUG quipu] Raw AT message from sms:
^SMMEMFULL: "ME"
[DEBUG quipu] Raw AT message from sms:
^RSSI: 0
[DEBUG quipu] Raw AT message from sms:
^SRVST: 0
[DEBUG quipu] Raw AT message from sms:
^MODE: 3,3
[DEBUG quipu] Raw AT message from sms:
^RSSI: 10
[DEBUG quipu] Raw AT message from sms:
^RSSI: 10
[DEBUG quipu] Raw AT message from sms:
^SRVST: 2
[DEBUG quipu] Raw AT message from sms:
^RSSI: 9
I experienced troubles accessing my HUAWEI E3131 3G device directly on my Mac (meaning, not going through the nano computer via ssh).
This is helpful because it is easier to develop directly on your main machine than on the nano cpu, which should be used mainly for deployment.
Anyways, you might experience this if you're running on Yosemite: you plug in you 3G device, it mounts, but nothing else happens.
ls /dev
won't show any tty*** that could be your device (in my case 3 ttyHUAWEIMobile).
You might to try to run the package that is in the mounted device, but didn't do anything to help me.
It appears that it is Yosemite that is to blame (being 64-bit whereas the 3G devices are typically 32-bit, i heard). More info here:
https://discussions.apple.com/message/26982653#26982653
The solution is to download and run the package from this link:
http://www74.zippyshare.com/v/54915703/file.html
I tried to pass PIN code as an argument when transitioning to 'initialized' state, but apparently this is not supported by machina.js.
I had to persist it in quipu object instead.
The correct solution could be to use BehaviouralFSM, but i didn't have much time to investigate.
You have to be carefull which ports you use on your 3G device depending on the application.
This can be tricky, because each model can have different ports, and for the same device, its ports can have different denomination depending on the OS you're on.
For example:
On Ubuntu, with a HUAWEI e3131 device, we have 3 different ports:
On MacOS, for the same device:
We are not sure which corresponds to which, but pcui might be USB2, and modem USB0. This is to be confirmed.
You need to pay attention on the port you're using for texting, and the one you're using for 3G connection (for now, in wvdial.conf).
It is not possible to send a SMS message right after initialization... This can be fixed by setting a time out before sending the message.
OK for now, but this should be investigated.
You can check in example.js.
ant1 can receive but can't send anymore
[DEBUG quipu] SMS port opened
[DEBUG quipu] Raw AT message from sms:
ATE1
[DEBUG quipu] Raw AT message from sms:
OK
[DEBUG quipu] Raw AT message from sms:
AT+CMEE=2
[DEBUG quipu] Raw AT message from sms:
OK
[DEBUG quipu] Raw AT message from sms:
AT+CPIN=6353
[DEBUG quipu] Raw AT message from sms:
AT+CNMI=2,1,0,2,0
[DEBUG quipu] Raw AT message from sms:
AT+CMGF=1
[DEBUG quipu] Raw AT message from sms:
AT+CMGD=0,4
[DEBUG quipu] Raw AT message from sms:
+CME ERROR: operation not allowed
Transitioned from uninitialized to initialized
[DEBUG quipu] INITIALIZED
[DEBUG quipu] Raw AT message from sms:
AT+CMGF=1
[DEBUG quipu] Raw AT message from sms:
OK
[DEBUG quipu] Raw AT message from sms:
AT+CMGS="33671358943"
[DEBUG quipu] Raw AT message from sms:
> 1
[DEBUG quipu] Raw AT message from sms:
[DEBUG quipu] Raw AT message from sms:
^z
[DEBUG quipu] Raw AT message from sms:
+CMS ERROR: 500
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.