Receive sms on specific port j2me

爱⌒轻易说出口 提交于 2019-12-06 12:29:29

The SMS spec (JSR 120) says you can't have a port that another app is using at that time, and also you can't have any of the ports that are specified in the following table.

For security reasons, Java applications are not allowed to send SMS messages to the port numbers listed in Table A-4. Implementations MUST throw a SecurityException in the MessageConnection.send() method if an application tries to send a message to any of these port numbers.

Table A-4: Port Numbers Restricted to SMS Messages

Port number Description
2805 WAP WTA secure connection-less session service
2923 WAP WTA secure session service
2948 WAP Push connectionless session service (client side)
2949 WAP Push secure connectionless session service (client side)
5502 Service Card reader
5503 Internet access configuration reader
5508 Dynamic Menu Control Protocol
5511 Message Access Protocol
5512 Simple Email Notification
9200 WAP connectionless session service
9201 WAP session service
9202 WAP secure connectionless session service
9203 WAP secure session service
9207 WAP vCal Secure
49996 SyncML OTA configuration
49999 WAP OTA configuration

Oddly, I can't see any restriction on any other values of the port number. I'm sure this must be set out somewhere but I can't find it in the spec.

However, I strongly suggest restricting yourself to port numbers between 1 and 65535.

Generally 5001 port is use for such operation. you can see very good example here.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!