Using Net_Ethernet_28j60_getBytes

General discussion on mikroBasic PRO for PIC.
Post Reply
Author
Message
dnaci
Posts: 21
Joined: 09 Apr 2012 18:10

Using Net_Ethernet_28j60_getBytes

#1 Post by dnaci » 24 Dec 2023 17:41

Hi,
With the code below, I can read the first byte of the incoming TCP data. When I looked with Wireshark, I saw that it was the 54th byte. (1234567890)

Code: Select all

dim rectcp As Byte
rectcp = Net_Ethernet_28j60_getByte()
My problem is that I cannot read all incoming tcp data. I took the code below from the help file. I load the incoming data into the text variable. I think 0X100 is the beginning of the mac address. What should be the correct address to read the first byte of data? Thanks.

Code: Select all

dim rectcp As Byte[16]
dim text    As Byte[16]
Net_Ethernet_28j60_getBytes(@rectcp, 0x100, 16)

  For i = 0 To 15
    text[i] = rectcp[i + 0x100]
  Next i
Attachments
adress.PNG
adress.PNG (32.08 KiB) Viewed 196 times

User avatar
IvanJeremic
mikroElektronika team
Posts: 316
Joined: 05 Sep 2022 14:32

Re: Using Net_Ethernet_28j60_getBytes

#2 Post by IvanJeremic » 25 Dec 2023 11:45

Hi,

Try placing "0xFFFF" instead of "0x100", this should make the function "Net_Ethernet_28j60_getBytes" read from ERDPT just like "Net_Ethernet_28j60_getByte".

Regards,

Ivan.

dnaci
Posts: 21
Joined: 09 Apr 2012 18:10

Re: Using Net_Ethernet_28j60_getBytes

#3 Post by dnaci » 28 Dec 2023 14:39

Thanks🙂

Post Reply

Return to “mikroBasic PRO for PIC General”