problem to make connection for send sms in j2me - java-me

Hi
i try to make a connection with this code but this error shown :
java.lang.IllegalArgumentException: invalid port format
MessageConnection messageConnection = (MessageConnection) Connector.open("sms://09364191752");
wath is wrong ?
thanks

You have to specify a port number at the end of the phone number, i.e. append ":5000" or whatever.
See http://developers.sun.com/mobility/midp/articles/wma/ for details.

Related

Blind Call Transfer in Asterisk | ari-client (Node.js)

Precise overview about the flow:
I am calling my initial extension(100) using Zoiper through Twilio sip domain using Zoiper as soft phone which actually direct the call to my asterisk server.
Now when my call is in asterisk server I'm trying to forward it to another extension using Zoiper. I have already configured it according to documentation provided by asterisk will also be attaching the reference links.
I just want to forward the current call to a particular extension. So please can anyone guide me that how it can be possibly done?
ari-client
bridge.once(‘BridgeAttendedTransfer’, event => {
var transferee = new ari.Channel(event.transferee.id);
transferee.continueInDialplan({
context: event.context,
extension: event.exten,
priority: 1
});
});
extension.conf
exten => 201,1,Dial(SIP/201,20,tT)
features.conf
blindxfer = #2 ("#2" or "##" instead of "#1")
atxfer = *2
transferdigittimeout = 1; Number of seconds to wait between digits when transferring a call
xfersound = beep ; to indicate an attended transfer is complete
xferfailsound = beeperr ; to indicate a failed transfer
transferdialattempts = 3 ; Number of times that a transferer may attempt to dial an extension before
being kicked back to the original call.
transferretrysound = "beep" ; Sound to play when a transferer fails to dial a valid extension.
transferinvalidsound = "beeperr" ; Sound to play when a transferer fails to dial a valid extension
Using Zoiper to make a transfer
References:
https://wiki.asterisk.org/wiki/display/AST/Feature+Code+Call+Transfers
https://www.aska-ltd.jp/en/blog/185
https://community.asterisk.org/t/call-transfer-not-working-on-softphones/33817
https://asteriskfaqs.org/2020/12/22/uncategorized/handling-transfers-with-ari.html
Trying to implement blind call transfer.

Node-RED read Serial status

My flow have 1 input node (Serial).
Phisically, in this Serial, I can connect difference type of device (printer, keyboard ecc...).
When I connect a device in the serial port, Node-RED recognize it and switch the node status from "not-connected" to "connected".
There is any way to obtain this status (connected/not connected) in a variable to use it?
I have try to check "msg.status" variable but there is no information inside...
Solve it!
Just use the "status" node in the input table and configure it.

JavaME RaspBerryPi UART can't receive data from RS485

I try to connect my raspberry pi (with raspbian weezy) with a strip LED module. To do this, I use the UART connection of RBPi in order to communicate with RS485 strip connection.
My trouble : I can (yes I can) send data but I don't received ACK or anything else. However my strip LED module send data frame to the RBPi (I can see it on oscilloscope).
EDIT :
I think it's due to the following error that appears when the program opened UART connection. NO : The following error is due to an non-user permission
[ERROR] [DAAPI] iso=-1:cannot open /dev/mem
Well, But I don't receive message...
END EDIT
I write the following javaME code to do this :
UARTConfig config = new UARTConfig((int)Integer.valueOf(this.getPortCom()),(int)Integer.valueOf(this.getPortCom()), this.getBaudrate(),
this.getBitsperchar(), this.getUARTParity(), getStopBits(), UARTConfig.FLOWCONTROL_NONE);
this.uart = (UART)DeviceManager.open(config);
InputStream serialInputStream = Channels.newInputStream(uart);
BufferedReader serialBufferedReader = new BufferedReader(new InputStreamReader(serialInputStream));
this.tSerialOutput = new Thread( new SerialWriter( Channels.newOutputStream(uart) ) );
this.tSerialOutput.start();
this.tSerialInput = new Thread( new SerialReader( serialBufferedReader ));
this.tSerialInput.start();
"this" is my class which manage serial communication.
The error message is getting after the "DeviceManager.open"
I have follow the recommendation of the following ticket :
https://community.oracle.com/message/12513726
But it's not really the answer of my issue (I think...)
I have no idea.... So please, help me ^^
First, you must be sure Serial Port is not already used by Linux Console. Here is how to disable this:
Edit /etc/inittab and disable the following line by adding a # character in front of it
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
then reboot.
If this is still not working, then you may try to execute JavaME runtime with elevated privileges:
sudo ./runSuite.sh <yourapp>
If this is working, there is a permission problem somewhere.
Finally, you should try to get latest version of JavaME (currently, it is 8.1).

Execute AT commands in J2ME

I want to know how to execute AT commands inside a J2ME application. The approach that I am taking in brief is as below:
First get all the ports that are present in the phone by
String ports = System.getProperty("microedition.commports");
Now just try to write "AT" and wait for the response from each port (YES I said EACH!!!)
try{
commConnection = (CommConnection) Connector.open("comm:" + portsArr[i] + ";baudrate=19200");
} catch (IOException e) {
print("IOException:Port:" + portsArr[i] + "~Mess: " + e.getMessage());
}
Once I get an "OK" from some port I can execute my intended commands in the same way.
I am trying to execute this on two diffrent phones
Nokia SuperNova 7210
ports=USB1
When I try to write to the port nothing happens.
Nokia Xpress music
ports= USB2,COM1,IR1,USB1,BT1,BT2,BT3,BT4,BT5,BT6,BT7,BT8,BT9,BT10,BT11,BT12,BT13,BT14,BT15,BT16,BT17,BT18,BT19,BT20,BT21,BT22,BT23,BT24,BT25,BT26,BT27,BT28,BT29,BT30,BT31,BT32,BT33,BT34,BT35,BT36,BT37,BT38,BT39,BT40,BT41,BT42,BT43,BT44,BT45,BT46,BT47,BT48,BT49,BT50,BT51,BT52,BT53,BT54,BT55,BT56,BT57,BT58,BT59,BT60,BT61,BT62,BT63,BT64
When I try to write to USB2,COM1,BT1 port
IOException:Port:COM1~Mess: SymbianOS error = -1 : General:
System error
IOException:Port:USB1~Mess: SymbianOS error = -21 : General:
System error
IOException:Port:BT1~Mess: SymbianOS error = -44 : General:
System error
Is this a correct approach?
Smslib uses AT commands but I'm not understanding how do they execute AT commands or how they get the port on which to write the AT commands?
If not possible with J2ME I don't mind not writing the execution of AT commands in some other language as long as both are able to communicate and the solution will support a most of the vendors.
Related - https://stackoverflow.com/questions/3803508/can-i-use-at-commands-insider-j2me-app
What you are trying to achieve is absolutely not possible.
Your approach would only work if Java ME provided access to the GSM modem via COMM ports, which it does not!
(I suppose there could possibly be a device somewhere which offers this, anything's possible in Java ME land, but I have never seen or heard of this).
The library you are referring to runs on a PC which has a device connected to it via the COMM port, it does not work in a Java ME context.
I suspect that what you're really trying to do is access the handset's native SMS inbox via a MIDlet. I promise you, there is absolutely no way to do this!
If what you are trying to do is just send an SMS, maybe you can get to it using an APDU. It seems technically possible:
First you will need JSR 177 SATSA-APDU. Check Nokia devices that have support for it at http://www.developer.nokia.com/Community/Wiki/Java_ME_API_support_on_Nokia_devices
Then you will have to create an SMS APDU just like an STK Applet would do. Please check "Sending a message in the PDU mode" at http://www.dreamfabric.com/sms/
I did not try this, but this is the path I would go if I had to. If it does work with you, please share.

MgTwitterEngine Iphone

Hello
I am using mgtwitterengine in iphone to call twitter API. I want to retrive followers name
in my iphone.
I used textfield.text=[_engine getFollowersIncludingCurrentStatus:YES]; but it is not showing correct result. it only show some alphabets...
could anyone tell me how to do this.
you are using
NSLog(#"%#",[_engine getFollowersIncludingCurrentStatus:YES]);
getFollowersIncludingCurrentStatus not responding the result, it returns connection identifier which is DF387EE5-05CE-40E3-A12D-4D016C581233 in your case
your API response will come in this method
- (void)userInfoReceived:(NSArray *)userInfo forRequest:(NSString *)identifier
this is delegate method you have to add this in your class.
[_engine getFollowersIncludingCurrentStatus:YES];
use like this it may help you, i got the values and printing on console

Resources