<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=63&amp;t=13717&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2015-11-29T20:07:15+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=63&amp;t=13717&amp;mode</id>
<entry>
<author><name><![CDATA[swicio]]></name></author>
<updated>2015-11-29T20:07:15+01:00</updated>
<published>2015-11-29T20:07:15+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146690#p146690</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146690#p146690"/>
<title type="html"><![CDATA[Re: Udp terminal]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146690#p146690"><![CDATA[
Dzięki koledzy, post wcześniej już napisałem, że tam miałem błąd - działa <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br />Wielkie dzięki!<br /><br /><br />---------------------<br /><br /><br />Jestem początkującym i nie chciałem kopiować gotowca, tylko piszę na podstawie poradnika.<br />Musiałem to przeoczyć, ale nauka na błędach zapada w pamięci na dłużej.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3956">swicio</a> — 29 lis 2015, o 20:07</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[matekogon]]></name></author>
<updated>2015-11-29T20:04:43+01:00</updated>
<published>2015-11-29T20:04:43+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146687#p146687</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146687#p146687"/>
<title type="html"><![CDATA[Re: Udp terminal]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146687#p146687"><![CDATA[
Ty nie potrzebnie dodałeś dim str as string przeciez juz masz to tutaj<br />[syntax=basic4gl]Sub udp_send( adr As String, port As Int, str As String )[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1380">matekogon</a> — 29 lis 2015, o 20:04</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mario]]></name></author>
<updated>2015-11-29T20:03:43+01:00</updated>
<published>2015-11-29T20:03:43+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146686#p146686</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146686#p146686"/>
<title type="html"><![CDATA[Re: Udp terminal]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146686#p146686"><![CDATA[
Mirek w udp_send nie powoluje zmiennej str.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=415">mario</a> — 29 lis 2015, o 20:03</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[swicio]]></name></author>
<updated>2015-11-29T20:00:15+01:00</updated>
<published>2015-11-29T20:00:15+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146685#p146685</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146685#p146685"/>
<title type="html"><![CDATA[Re: Udp terminal]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146685#p146685"><![CDATA[
Wzorowałem się na poradniku Mirka, a tam jest to samo<br />[syntax=basic4gl]Sub udp_send( adr As String, port As Int, str As String )<br />Dim udppack As UDPPacket<br /><br />Dim dane() As Byte<br /><br />str = str &amp; Chr(13) &amp; Chr(10) <br />dane = str.GetBytes( &quot;UTF8&quot; )<br /><br />udppack.Initialize( dane, adr, port )<br />udpsrv.Send( udppack )<br />End Sub[/syntax] <br /><br />tylko dodatkowo ma możliwość wyboru portu poprzez edPortTx.Text<br />[syntax=basic4gl]udp_send( &quot;255.255.255.255&quot;, edPortTx.Text, teDane.Text )[/syntax]<br /><br /><div class="quotetitle"><b>Quote:</b></div><div class="quotecontent"><br />Dokładnie nie potrzebnie dwa razy definiujesz str wystarczy usunąć dim str as stringm<br /></div><br /><br />I tu właśnie był błąd <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3956">swicio</a> — 29 lis 2015, o 20:00</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[matekogon]]></name></author>
<updated>2015-11-29T19:56:24+01:00</updated>
<published>2015-11-29T19:56:24+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146684#p146684</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146684#p146684"/>
<title type="html"><![CDATA[Re: Udp terminal]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146684#p146684"><![CDATA[
Dokładnie nie potrzebnie dwa razy definiujesz str wystarczy usunąć dim str as stringm<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1380">matekogon</a> — 29 lis 2015, o 19:56</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mario]]></name></author>
<updated>2015-11-29T19:51:07+01:00</updated>
<published>2015-11-29T19:51:07+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146683#p146683</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146683#p146683"/>
<title type="html"><![CDATA[Re: Udp terminal]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146683#p146683"><![CDATA[
Kolego, błąd masz tutaj:<br /><br /> <br />[syntax=c]Dim udppack As UDPPacket<br />        Dim dane() As Byte<br />        Dim str As String<br />       <br />   str= str &amp; Chr(13) &amp; Chr(10)[/syntax]<br /><br />Wysyłasz pusty string przecież. <br /><br />powinno być:<br /><br />[syntax=c]str= EditText1.Text &amp; Chr(13) &amp; Chr(10)[/syntax]<br /><br />wtedy będzie śmigać.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=415">mario</a> — 29 lis 2015, o 19:51</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[swicio]]></name></author>
<updated>2015-11-29T19:43:14+01:00</updated>
<published>2015-11-29T19:43:14+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146681#p146681</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146681#p146681"/>
<title type="html"><![CDATA[Re: Udp terminal]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146681#p146681"><![CDATA[
Faktycznie, nie zauważyłem. Już poprawiam, ale mimo to dalej nie odbieram tekstu tylko znaczniki chr <img src="https://forum.atnel.pl/images/smilies/icon_e_sad.gif" alt=":(" title="Smutny" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3956">swicio</a> — 29 lis 2015, o 19:43</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[matekogon]]></name></author>
<updated>2015-11-29T19:36:49+01:00</updated>
<published>2015-11-29T19:36:49+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146679#p146679</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146679#p146679"/>
<title type="html"><![CDATA[Re: Udp terminal]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146679#p146679"><![CDATA[
Dla czego wysyłasz port jako string a nie int?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1380">matekogon</a> — 29 lis 2015, o 19:36</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[swicio]]></name></author>
<updated>2015-11-29T19:42:57+01:00</updated>
<published>2015-11-29T16:03:51+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146666#p146666</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146666#p146666"/>
<title type="html"><![CDATA[Udp terminal]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=13717&amp;p=146666#p146666"><![CDATA[
Witam,<br />Nie wiem gdzie mam błąd, ale nie mogę wysłać z telefonu tekstu.<br /><br />[syntax=basic4gl]udp_send( &quot;255.255.255.255&quot;, 32000, EditText1.Text)[/syntax]<br /><br />gdy wpisuję w pole edit1 jakiś tekst, wysyła mi jedynie same znaczniki Chr(13) &amp; Chr(10)<br /><br />tak jakby funkcja udp_send nie pobierała z edit1 tekstu do zmiennej &quot;str as String&quot;<br />[syntax=basic4gl]Sub udp_send( adr As String, port As Int, str As String)[/syntax]<br /><br />Proszę o podpowiedź co robię źle, lub co przeoczyłem.<br /><br /><br />poniżej cały kod:<br />[syntax=basic4gl]#Region  Project Attributes <br />#ApplicationLabel: UDP<br />#VersionCode: 1<br />#VersionName: <br />'SupportedOrientations possible values: unspecified, landscape or portrait.<br />#SupportedOrientations: unspecified<br />#CanInstallToExternalStorage: False<br />#End Region<br /><br />#Region  Activity Attributes <br />#FullScreen: False<br />#IncludeTitle: True<br />#End Region<br /><br />Sub Process_Globals<br />'These global variables will be declared once when the application starts.<br />'These variables can be accessed from all modules.<br />Dim udpsrv As UDPSocket<br />Dim udppack As UDPPacket<br /><br />End Sub<br /><br />Sub Globals<br />'These global variables will be redeclared each time the activity is created.<br />'These variables can only be accessed from this module.<br /><br />Private btnsend As Button<br />Private EditText1 As EditText<br />Private EditText2 As EditText<br />End Sub<br /><br />Sub Activity_Create(FirstTime As Boolean)<br />'Do not forget to load the layout file created with the visual designer. For example:<br />Activity.LoadLayout(&quot;1&quot;)<br />udpsrv.Initialize(&quot;udpsrv&quot;,32000,1024)<br /><br />End Sub<br /><br />Sub Activity_Resume<br /><br />End Sub<br /><br />Sub Activity_Pause (UserClosed As Boolean)<br /><br />End Sub<br /><br /><br />Sub udpsrv_PacketArrived (Packet As UDPPacket)<br />Dim msg As String<br />msg = BytesToString(Packet.Data, Packet.Offset,Packet.Length,&quot;UTF8&quot;)<br />EditText2.Text=(EditText2.Text &amp; msg &amp; CRLF)<br /><br /><br />End Sub<br /><br />Sub udp_send( adr As String, port As Int, str As String)<br />Dim udppack As UDPPacket<br />Dim dane() As Byte<br />Dim str As String<br /><br />str= str &amp; Chr(13) &amp; Chr(10)<br /><br />dane= str.GetBytes( &quot;UTF8&quot; )<br /><br />udppack.Initialize( dane, adr, port )<br />udpsrv.Send( udppack )<br /> <br />End Sub<br /><br />Sub btnsend_Click<br /><br />udp_send( &quot;255.255.255.255&quot;, 32000, EditText1.Text)<br />End Sub[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3956">swicio</a> — 29 lis 2015, o 16:03</p><hr />
]]></content>
</entry>
</feed>