Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

URL2IP issues

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> EASY TCP/IP
View previous topic :: View next topic  
Author Message
Farmer

Bascom Member



Joined: 05 Jun 2011
Posts: 10

PostPosted: Sun May 28, 2017 5:12 pm    Post subject: URL2IP issues Reply with quote

Hi,
i happy about the new function URL2IP in the latest Bascom revision. Thats what i never hoped to find.
Regarding to the Help its connecting to Google DNS server 8.8.8.8 , is this changeble to my own internal DNS Server so it works for my internal network.
I used the Wiz510 sample, works fine as it is.
Is the Google server maybe the reason why it does not work for all url names? It works for the "mcselec.com" url from the sample, but many URL do not work even if they respond to a manual request via my PCs command line. One not working example is my page gs400.de; WWW.Bild.de works fine.

Regards,

Tobias
Back to top
View user's profile
plouf

Bascom Member



Joined: 19 Jan 2012
Posts: 36
Location: Athens,Greece

greece.gif
PostPosted: Sun Jul 22, 2018 11:12 am    Post subject: Reply with quote

the floowing code ONLY resovles mscelec.com nothing else ! (its a copy from ping.bas example)

Code:

$regfile = "m88def.dat"                                     ' specify the used micro

$crystal = 1000000                                          ' used crystal frequency
$baud = 19200                                               ' use baud rate
$hwstack = 80                                               ' default use 64 for the hardware stack
$swstack = 64                                               ' default use 64 for the SW stack
$framesize = 180                                            ' default use 80 for the frame space


Const Cdebug = 1

Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0


'Configuration Of The SPI bus
Config Spi = Hard , Interrupt = Off , Data_order = Msb , Master = Yes , Polarity = Low , Phase = 0 , Clockrate = 4 , Noss = 0
'Init the spi pins
Spiinit


'we do the usual
Print "Init TCP"                                            ' display a message
Enable Interrupts                                           ' before we use config tcpip , we need to enable the interrupts
Config Tcpip = Noint , Mac = 12.128.12.34.56.78 , Ip = 192.168.1.70 , Submask = 255.255.255.0 , Gateway = 192.168.1.250 , Localport = 1000 , Tx = $55 , Rx = $55 , Chip = W5100 , Spi = 1 , Cs = Portb.2
Print "Init done"

Dim Ip As Long
Ip = Url2ip("mcselec.com")
print Ip2str(ip)
Ip = Url2ip("www.google.com")
print Ip2str(ip)
do
loop
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> EASY TCP/IP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum