Huawei E353 USSD Codes and Message?
GSM-USSD is an utility that enable you to send USSD codes via modem.
You need to configure it correctly. Here is thread that gives idea about configuration.
Read post #13 also
You can try with sudo gsm-ussd *123#
or
According to the post A execution command would be
sudo gsm-ussd *123# -m /dev/`dmesg | grep "usb 1-3" | tail -n 1 -c 8`
Where *123# is your ussd command.
Related videos on Youtube
gromiczek
Updated on September 18, 2022Comments
-
gromiczek over 1 year
I'm writing a Processing Applet in Java using Eclipse. I keep getting a null pointer exception when I refactor a method to create an ArrayList of PGraphics from the main class into a separate class. The method written all in the main class works (the first code sample below), it's the refactor that's not working (the second pair of code samples). I've searched all over for an answer (some similar but none match) and made numerous rewrites, but no dice. Take a look, and kind thanks in advance for your help:
This code (all in one class) works:
package tester; import java.util.ArrayList; import processing.core.*; public class GraphicsMain extends PApplet{ int screenWidth = 800; int screenHeight = 500; String filepath = "/a/filepath/here/"; ArrayList<PGraphics> motifArray = new ArrayList<PGraphics>(); int stageWidth = 100; // eventually make this based on the motif's max width int stageHeight = 400; // make this based on the motif's max height PImage pic = loadImage(filepath + "small_jones6.png"); PImage pic2 = loadImage(filepath + "small_dresser10.png"); public void setup() { size(screenWidth,screenHeight,P3D); background(255); for (int i = 0; i < 2; i++) { motifArray.add(createGraphics(stageWidth,stageHeight,P3D)); motifArray.get(i).beginDraw(); motifArray.get(i).image(pic,10,10,100,90); motifArray.get(i).image(pic2,10,50,50,50); motifArray.get(i).endDraw(); } if (motifArray.get(0) == null) { System.out.println("The motif array is unfilled!"); } } public void draw() { for (int i = 0; i < motifArray.size(); i ++) { image(motifArray.get(i),200+(400*i),100); } } static public void main(String[] passedArgs) { String[] appletArgs = new String[] { "GraphicsMain" }; if (passedArgs != null) { PApplet.main(concat(appletArgs, passedArgs)); } else { PApplet.main(appletArgs); } } }
This code below (refactored into two separate classes) does not:
** I've noted the two lines [one in each class] identified in the null pointer exception
Class 1:
package tester; import java.util.ArrayList; import processing.core.*; public class GraphicsMain extends PApplet{ int screenWidth = 800; int screenHeight = 500; PGraphicsMaker pgm = new PGraphicsMaker(this); ArrayList<PGraphics> motifArray; public void setup() { size(screenWidth,screenHeight,P3D); background(255); motifArray = pgm.makeMotifArray(); // ** NULL POINTER EXCEPTION HERE ** if (motifArray.get(0) == null) { System.out.println("The motif array is unfilled!"); } } public void draw() { for (int i = 0; i < motifArray.size(); i ++) { image(motifArray.get(i),200+(400*i),100); } } static public void main(String[] passedArgs) { String[] appletArgs = new String[] { "GraphicsMain" }; if (passedArgs != null) { PApplet.main(concat(appletArgs, passedArgs)); } else { PApplet.main(appletArgs); } } }
Class 2:
package tester; import java.util.ArrayList; import processing.core.PApplet; import processing.core.PGraphics; import processing.core.PImage; import processing.core.*; public class PGraphicsMaker { String filepath = "/a/filepath/here/"; PApplet parent; int stageWidth = 100; // eventually make this based on the motif's max width int stageHeight = 400; // make this based on the motif's max height ArrayList<PGraphics> motifArray; PImage pic; PImage pic2; public PGraphicsMaker(PApplet pa) { PApplet parent = pa; pic = parent.loadImage(filepath + "small_jones6.png"); pic2 = parent.loadImage(filepath + "small_dresser10.png"); } public ArrayList makeMotifArray() { ArrayList<PGraphics> motifArray = new ArrayList<PGraphics>(); for (int i = 0; i < 2; i++) { // ** NULL POINTER EXCEPTION on the line below ** motifArray.add(parent.createGraphics(stageWidth,stageHeight,parent.P3D)); motifArray.get(i).beginDraw(); motifArray.get(i).image(pic,10,10,100,90); motifArray.get(i).image(pic2,10,50,50,50); motifArray.get(i).endDraw(); } return motifArray; } }
Any help would be fabulous. Thanks!
-
BigSack almost 12 yearsBut it doesn't even detect my modem. How will it work then?
-
Web-E almost 12 yearsyou said your modem is working fine!! modem will be represented under
/dev/ttyUSB0
-/dev/ttyUSB3
you need to issue command as in post 13 -
Web-E almost 12 yearsIt will be better if you pull it off and reconnect. Sometime the utility fails after you connect to internet. :(
-
BigSack almost 12 yearsHow do i find the port , for issuing command?
-
Web-E almost 12 yearspost 13 command will do that for you. See a sample command. I have updated the post
-
gromiczek almost 11 yearsThanks---a simple mistake that's been eluding me for hours!