Shocket Shell bind

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Shocket Shell bind

1,158 次查看
Kafre
Contributor III

Hello:

 

I'm using MQX 3.7 with CW for MCU 10.1 over a M54455EVB. 

 

Is there any way to bind a shell to a socket?  I mean to use a shell, as defined in the shell_test example,  with a manually created socket.

 

Any example will be welcomed.

 

Thanks.

0 项奖励
回复
2 回复数

974 次查看
DavidS
NXP Employee
NXP Employee

Hi Kafre,

The C:\Program Files\Freescale\Freescale MQX 3.7\rtcs\examples\shell example has shell capability.

Once you load the example and run, then using the shell/UART interface you can configure the M54455EVB network parameters.

I made a "small" network from laptop to M54455EVB.

I set my laptop Ethernet port to a static IP (192.168.1.1) and then on the M54455EVB I setup it up as follows:

shell> help                         <-- the UART is the upper connection on back of M54455EVB

shell> ipconfig 0 init          <-- initializes the Eth0 which is the port closes to bottom of M54455EVB

shell> ipconfig 0 staticip 192.168.1.2 255.255.255.0

shell> ping 192.168.1.1    <-- to see that I could ping the laptop from M54455EVB

shell> telnetd start             <-- to start the telnet server on M54455EVB

 

On the PC:

Start-->Run then type "cmd".

At shell prompt, I type "telnet 192.168.1.2"    <-- this opens a telnet session

 

Hope this helps.

Regards,

David

974 次查看
Kafre
Contributor III

Thank you DavidS,

 

But my question was oriented to a socket creation case. (Create Socket -> Bind Port -> Listen -> Wait for event...) I will try the Telnet solution. Thanks, again.

0 项奖励
回复