Maximum port number
Ltech
Posts: 385
I have a trouble. With "Brilldea_W5100_Indirect_Driver_Ver006" in assembly
I have to use a propeller with port number 56629.
It do not work with 56629. Smaller numbers are fine. But the server is only reacting on 56629
In notice the bigest value for a port is 65533. So mine is theoretical in range.
With a udp test on pc on a lower port 5000 it works on 56629 not. It is faling on opening socket.
So i assume it is in the assembly code "Defined data" ?
Thanks a lot for helping me
I have to use a propeller with port number 56629.
It do not work with 56629. Smaller numbers are fine. But the server is only reacting on 56629
In notice the bigest value for a port is 65533. So mine is theoretical in range.
With a udp test on pc on a lower port 5000 it works on 56629 not. It is faling on opening socket.
So i assume it is in the assembly code "Defined data" ?
Thanks a lot for helping me

Comments
It should look like this.
'----------------------------------------------------------------------------------------------------- 'Command sub-routine for opening a socket 'this routine relies upond t0 being persistant across calls to writing routines '----------------------------------------------------------------------------------------------------- sOPEN mov t0, paramA 'Move the socket number into t0 ($000s) shl t0, #8 'Move the socket number to the third digit ($0s00). This is the offset to use for below ops. 'set the mode mov reg, _S0_MR_d 'Move the register address into a variable for processing add reg, t0 'Add in the offset for the particular socket to be worked on mov data, paramB 'Move over the socket type call #WriteSingle 'Write the byte to the W5100 'set the source port mov reg, _S0_PORT1_d 'Move the register address into a variable for processing add reg, t0 'Add in the offset for the particular socket to be worked on mov data, paramC 'Move over the source socket value and data, #$FF 'Filter the low byte MG 9/26/2011 call #WriteSingle 'Write the byte to the W5100 sub reg, #1 'Increment the register address mov data, paramC 'Move over the source socket value shr data, #8 'shift the data over one byte and data, #$FF 'Filter the low byte MG 9/26/2011 call #WriteSingle 'Write the byte to the W5100just tested... seems that the limit is 32767 ... I'm suspicious that the sign bit might be getting in the way here.
I can't test the real udp connetion server down now
****** You have to modify the destination and the source port ....******
Thanks Mike it helps me a lot