Hi Jin,

No problems, glad to help.


If you know C or Java JavaScript is simple... As for HTML and CSS its also not 
difficult to learn.

I am not talking about mastering it but rather have a basic plus understanding 
as you will find

out that you may/will need to make modifications to existing code.


Linux is more complicated then FreeRTOS from a system point of view (driver, 
boot loader etc..)

but again could be learned [😊]


JSON is very simple so once you know the basics its ok.


I have many years of writing code behind me but I see that most of the jobs 
here (in Israel) are not

real embedded like you use but rather Linux etc... So you face the problems 
that I face here or actually

everywhere.


Learn more, advance your knowledge and hopefully you will find an interesting 
and rewarding job.


You can learn HTML, JS, CSS etc here:

   http://www.w3schools.com/



As for JSON here is the reference:

   http://www.json.org/



Good luck,

Noam.

JSON<http://www.json.org/>
www.json.org
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It 
is easy for humans to read and write. It is easy for machines to parse and 
generate.


W3Schools Online Web Tutorials<http://www.w3schools.com/>
www.w3schools.com
body { background-color: #d0e4fe;} h1 { color: orange; text-align: center;} p { 
font-family: "Times New Roman"; font-size: 20px;}




________________________________
From: lwip-users <[email protected]> on behalf of 
Jin Won Seo <[email protected]>
Sent: Thursday, June 23, 2016 9:03 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] LwIP multithread select mode problems

Hi Noam,

I did not expect any replies, but you did. I appreciate your suggestions.

I am using Socket using Lwip and do not have any issues to handle semaphore, 
mutex, etc.. to manage tasks/threads using FreeRTOS. So, I think I can apply 
this skills to others.

I am working on embedded development using micro controller but I know xml and 
a little of HTML, not Java scripts and JSON.

Vancouver, Canada area where I live in has a few opportunities for doing that. 
There are more opportunities for only software side like Linux Kernel, so as 
for electrical/electronics guy like me it is hard to get into that side.

Again, I really appreciate your suggestions.

Regards,
Jin

On Thu, Jun 23, 2016 at 8:01 AM, Noam Weissman 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

LwIP and FreeRTOS  are popular because they are open source and free.

If you understand how an OS works and have background in TCP/IP you should
not have a problem learning other TCP stack’s and/or other OS.

Finding a job is not only finding to work with something you are familiar with 
but
more than that. It is adapting/learning other systems and other tools.

If you only worked with LwIP RAW mode then I encourage you to learn some Socket
programing as this is much more common.

Most RT OS are similar, meaning they use semaphores, create tasks/threads, 
using queue’s etc…

If you are looking for a job, use the time in between to learn new skills. 
Learn some JS, XML,
JSON, HTML etc…


Good luck,
Noam.
From: lwip-users 
[mailto:lwip-users-bounces+noam<mailto:lwip-users-bounces%2Bnoam>[email protected]<mailto:[email protected]>]
 On Behalf Of Jin Won Seo
Sent: Thursday, June 23, 2016 5:42 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] LwIP multithread select mode problems

Sorry for irrelevant reply, but I am so frustrated to find a job.
I used Lwip 1.4.1 in my project + RTOS, but ... almost nothing I can find.
Is this industry dead? These skill sets are not useful?


On Thu, Jun 23, 2016 at 7:33 AM, Joel Cunningham 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

select() can be used by multiple threads at the same time and you can even have 
the same sockets in multiple calls and it will be safe.  The limitation comes 
from trying to use the same sockets from multiple simultaneous threads in other 
socket APIs (select is the exception, simultaneous send, recv, or close on the 
same socket is not supported, especially in 1.4.1).

In regards to the maxfd question, I think there is a small misunderstanding.  
The maxfd parameter in select() is the largest FD in your input FD_SETs + 1.  
This is because maxfd is used to iterate through the FD_SETs provided.  It has 
nothing to do with other threads calling select() or how many sockets are in 
the system, but the maximum value of any FDs in the current select() call.

Joel

On Jun 23, 2016, at 03:59 AM, lampo <[email protected]<mailto:[email protected]>> 
wrote:
hello,
can someone help me with multithread problem ?

we use lwip 1.4.1 in PLC products, and if it live through long time(1 month
for example) testing in industry use,
I will back here to report.

*our problem*
we use multithread select mode in our system, and it "seems" it's ok till
now(1 days passed),
but I see the doc in rawapi.txt,"/Netconn or Socket Api are not reentrant at
the control bolck granularity level/" .
so I really cannot figure out if im doing right thing.

*our application background/restriction*

a, our system is RTOS based , we need 2 TCP clients(separately connecting to
2 TCP servers, i.e., 2 lasers),
1 TCP server(deal with max of 4 remote clients,i.e.,4 modbus clients ), and
1 web server.

b, lwip related thread cannot be in polling mode, for here is already a
polling thread in RTOS and it has "soft real time" requirements.

c, current lwip version is 1.4.1(we are evaluating 2.0.0)

d, we need to send data to tcp servers periodically, 10 ms

*our design/implementation *

3 thread has used 'select' , but the same socket is only closed by the
thread who created it. here is details,

we use 'select' in "user tcp client send thread" ,we first call
'connect',and then call 'select' to determine whether the socket is
connected correctly or not; if some errors detected in connecting or data
sending, we call 'close' to close the socket.
we use 'select' in "user tcp client receive thread", blocked forever
waiting for data, and call 'recvfrom' if data received, if some errors
detected
in this thread,we don't just clost the socket ,but send message to "user tcp
client send thread" and tell it to close.
we use 'select' in "user tcp server thread",listening for incoming requests,
receiving and responding(sending) data.

*our doubt*
1、 ‘select’ can be used in multithread or not? if yes, the first param
maxfdp1 of lwip_select() must be set to the total number of sockets in each
thread?
for example,in our situation, maxfdp1 = 2(clients) + 4(remote clients) +
1(listen socket) in each select?

2、is SYS_ARCH_PROTECT must be used in multithread?

3、if lwip 1.4.1 does not support the multithread select mode, does lwip
2.0.0 supports it?

Thanks a lot !



--
View this message in context: 
http://lwip.100.n7.nabble.com/LwIP-multithread-select-mode-problems-tp26561.html
Sent from the lwip-users mailing list archive at Nabble.com<http://Nabble.com>.

_______________________________________________
lwip-users mailing list
[email protected]<mailto:[email protected]>
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[email protected]<mailto:[email protected]>
https://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[email protected]<mailto:[email protected]>
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to