[lwip-users] Changing MAC address of network interface?

2016-04-07 Thread Freddie Chopin
Hello! I was wondering what is the proper way to change MAC address of network interface. Can I just change the contents of netif.hwaddr[] and expect everything to still work correctly (assuming I also change the MAC address in the driver)? Maybe I have to bring the netif completely down, remove i

[lwip-users] Changing MAC address of network interface?

2016-04-07 Thread Freddie Chopin
Hello! I was wondering what is the proper way to change MAC address of network interface. Can I just change the contents of netif.hwaddr[] and expect everything to still work correctly (assuming I also change the MAC address in the driver)? Maybe I have to bring the netif completely down, remove i

Re: [lwip-users] Changing MAC address of network interface?

2016-04-07 Thread Freddie Chopin
On czw, 2016-04-07 at 14:34 +, Noam Weissman wrote: > Just a small addition. You can change  net_if.hwaddr[]  on the fly > for testing etc but I think  > it is better t reboot after that. You can change MAC address on your PC, so I'm wondering whether this is possible and easy with lwIP. "Easy

Re: [lwip-users] Changing MAC address of network interface?

2016-04-07 Thread Freddie Chopin
On czw, 2016-04-07 at 14:51 +, Noam Weissman wrote: > If your TCP stack sends data before you change the MAC the older MAC > address is saved by the router/switch > It is connected to.. also it make sense that some packets are saved > within the TCP stack buffering with the > older MAC address

Re: [lwip-users] Changing MAC address of network interface?

2016-04-08 Thread Freddie Chopin
On pią, 2016-04-08 at 10:27 -0300, Sergio R. Caprile wrote: > Hi, > as long as you are not using an application protocol that embeds > layer-2  > info in application data, you shouldn't have any issues with > buffered  > data in lwIP, since it does not hold layer-2 info; it is added by > the  > dri

Re: [lwip-users] Degrading performance and etharp proterr

2016-04-12 Thread Freddie Chopin
On wto, 2016-04-12 at 10:20 +0200, Francisco Expósito wrote: > Any clues anyone? Check this thread http://lwip.100.n7.nabble.com/Issue-with-Cortex-Emac-driver-td25326.html Regards, FCh ___ lwip-users mailing list lwip-users@nongnu.org https://lists.no

Re: [lwip-users] Degrading performance and etharp proterr

2016-04-13 Thread Freddie Chopin
On śro, 2016-04-13 at 10:23 +0200, Francisco Expósito wrote: > Hi Freddie, >   > Thank you very much for your quick answer. >   > It seems that ST hasn’t corrected yet its EMAC driver in version > 1.4.4 (22-January-2016). >   > Have you managed to find an alternative driver or have you made > corre

Re: [lwip-users] Degrading performance and etharp proterr

2016-04-22 Thread Freddie Chopin
On śro, 2016-04-13 at 10:52 +0200, Freddie Chopin wrote: > On śro, 2016-04-13 at 10:23 +0200, Francisco Expósito wrote: > > > > Hi Freddie, > >   > > Thank you very much for your quick answer. > >   > > It seems that ST hasn’t corrected yet its EMAC drive

Re: [lwip-users] FromISR port abstraction layer (was: Help with LwIP Modem)

2016-07-11 Thread Freddie Chopin
On pon, 2016-07-11 at 21:09 +0200, goldsi...@gmx.de wrote: > What I mean is personally, I don' think it's good design to expose > the  > ISR/non-ISR fact accross layers of the code that possibly have > nothing  > to do with that knowledge. > > Keeping my private view aside, is there a requirement

Re: [lwip-users] RTOS Integration

2016-10-08 Thread Freddie Chopin
On nie, 2016-10-09 at 05:02 +, Kenny Koller wrote: > Hi Everyone, > > I'm starting with some code generated by the ST Cube software for > FreeRTOS. > > I prefer not to use the FreeRTOS memory manager and the current > version supports static allocation so I pleased to read this: > > Since lw

Re: [lwip-users] Avoiding sys_thread_new

2016-10-08 Thread Freddie Chopin
On nie, 2016-10-09 at 05:08 +, Kenny Koller wrote: > I use C++ and prefer to use a task class that I designed. I do not > want to allocate these statically. It's not clear to me why the > network stack would be concerned with creating threads. I understand > that there is a network thread that

Re: [lwip-users] 'Avoiding sys_thread_new' and 'RTOS Integration'

2016-10-09 Thread Freddie Chopin
On nie, 2016-10-09 at 18:36 +, Kenny Koller wrote: > It seems that the conservative thing to do is use the heap to get > started and as I become comfortable with the code base I'll consider > what is required for static allocation. I'll also just let LWIP > create it's own tasks using the C API

Re: [lwip-users] 'Avoiding sys_thread_new' and 'RTOS Integration'

2016-10-10 Thread Freddie Chopin
On pon, 2016-10-10 at 08:58 +0200, Dirk Ziegelmeier wrote: > You can't. All you can do in such cases is count how many > mboxes/semaphores/threads etc. you need and allocate their storage > statically. A call to sys_mbox_new() just returns "the next one" from > the static allocated ones. This is wh

Re: [lwip-users] Issue in arch.h for lwIP 2.0.0

2016-11-30 Thread Freddie Chopin
On Wed, 2016-11-30 at 07:45 +0100, Dirk Ziegelmeier wrote: > I added it, thanks for reporting! It was behaving the same way in the git version prior to 2.0.0 and I guess the "standard" approach to that was to include in your arch/cc.h file. I think that such issue was reported to the mailing list

[lwip-users] How to force-close a netconn from the server side?

2017-01-25 Thread Freddie Chopin
Hello! Currently in a project with lwIP I'm facing an issue with closing netconns and I failed to find a solution by myself, so I'm writing here in hope for some guidance. Let's say that there are 5 listening netconns, each bound to a different port, let's say 1001-1005. I'm accepting 5 different

Re: [lwip-users] How to force-close a netconn from the server side?

2017-01-26 Thread Freddie Chopin
On Wed, 2017-01-25 at 20:49 +0100, goldsi...@gmx.de wrote: > In "specialities" like this one, the netconn API is (unfortunately)  > sometimes incomplete as the "core" and socket APIs are more widely > used. > > While you don't have to "mess" with the "so_options" field, you'd > have  > to call "ip

Re: [lwip-users] How to force-close a netconn from the server side?

2017-01-26 Thread Freddie Chopin
On Thu, 2017-01-26 at 15:42 +0100, goldsi...@gmx.de wrote: > > [..] It works only if I > > introduce a small delay between close+delete and opening of new > > listen > > connections (I'm using a multithreading system).[..] > > With this code the PCBs are only sometimes stuck in TIME_WAIT state > >

Re: [lwip-users] How to force-close a netconn from the server side?

2017-01-26 Thread Freddie Chopin
On Thu, 2017-01-26 at 20:02 +0100, goldsi...@gmx.de wrote: > Freddie Chopin wrote: > > But what difference in reception does it make - in both cases > > (with/without delay) the netconns are closed and deleted anyway. > > What you might be mising is that the netconn can be d

[lwip-users] Debugging a hang in an lwIP-based application

2019-02-21 Thread Freddie Chopin
Hello! For the past few days I have been debugging a hang in one of my projects which uses lwIP and my C++ RTOS - http://distortos.org/ The networking part of the application is rather simple and consists of a single functionality (using 2 threads synchronized with mutexes), which uses netconn AP

Re: [lwip-users] Debugging a hang in an lwIP-based application

2019-02-25 Thread Freddie Chopin
On Fri, 2019-02-22 at 10:23 -0300, Sergio R. Caprile wrote: > Unfortunately I only know the RAW API and can't help you further. Did > you check the basics ?: > - core lwIP runs in a single thread. If your Ethernet is handled in > another thread, you don't call any lwIP functions from there, except

[lwip-users] Help with PPP connection - modem disconnects for no obvious reason...

2019-03-20 Thread Freddie Chopin
Hello! I'm hoping some good soul with more experience in PPP and GSM modems will be able to help me out here. As a disclaimer, I have almost zero experience with GSM modems, so please excuse any obviously stupid things (; I have Huawei me906e modem with a working SIM card (I've just checked it ag

Re: [lwip-users] Help with PPP connection - modem disconnects for no obvious reason...

2019-03-20 Thread Freddie Chopin
Hello Sylvain! On Wed, 2019-03-20 at 17:18 +0100, Sylvain Rochet wrote: > Could you try with VJ_SUPPORT disabled ? I've also thought about that and already tried that, but the result is almost identical: -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- Wrote: AT Read: OK Wrote: A

Re: [lwip-users] Help with PPP connection - modem disconnects for no obvious reason...

2019-03-20 Thread Freddie Chopin
Hello again Sylvain! On Wed, 2019-03-20 at 18:22 +0100, Sylvain Rochet wrote: > The DiscReq LCP packet does not seem to be related at all to the PPP > exchange, but rather just timed after the PPP session is started no > matter what, right ? Could you try aggressively slowing down the > serial

Re: [lwip-users] Help with PPP connection - modem disconnects for no obvious reason...

2019-03-20 Thread Freddie Chopin
Hi Patrick! On Wed, 2019-03-20 at 13:20 -0400, Patrick Klos wrote: > For whatever reason, you're not responding to the CHAP challenges. I assume this is because my user and password are just `""` (empty strings), but this is just my very wild guess. > Are you dialing into an ISP (which would req

Re: [lwip-users] Help with PPP connection - modem disconnects for no obvious reason...

2019-03-20 Thread Freddie Chopin
On Wed, 2019-03-20 at 20:28 +0100, Sylvain Rochet wrote: > Hi Freddie, > > On Wed, Mar 20, 2019 at 07:37:27PM +0100, Freddie Chopin wrote: > > On Wed, 2019-03-20 at 13:20 -0400, Patrick Klos wrote: > > > For whatever reason, you're not responding to the CHAP > &

Re: [lwip-users] Help with PPP connection - modem disconnects for no obvious reason...

2019-03-20 Thread Freddie Chopin
Alternative approach to the problem - could someone recommend a GSM modem, commercially available in reasonable numbers, M.2 interface, that works with lwIP? Maybe its the Huawei me906e that is the problem here, who knows... Regards, FCh ___ lwip-users

Re: [lwip-users] Help with PPP connection - modem disconnects for no obvious reason...

2019-03-27 Thread Freddie Chopin
Hello again! Last week I finally found a proper way to talk to this modem and today I've tried to systematically investigate it deeper. First of all - the modem works, I can connect with LTE 4G network, I can connect to the internet with lwip's PPP, I can connect to MQTT test broker (with full en

Re: [lwip-users] why ping utility was removed ?

2019-03-27 Thread Freddie Chopin
W dniu śro, 27.03.2019 o godzinie 17∶32 +0200, użytkownik Ranran napisał: > Does anyone knows why ping.c utility was removed from lwip ? > I only found it in older lwip versions. It is still there. http://git.savannah.nongnu.org/cgit/lwip.git/tree/contrib/apps/ping/ping.c Regards, FCh

[lwip-users] Can you connect a MQTT client directly from a PPPoS status callback?

2019-05-16 Thread Freddie Chopin
Hi! I'm working on an open-source demo project in which there is a MQTT client talking via PPPoS to a GSM modem. The project also has a RTOS, so I have threads and synchronization objects. I'm wondering whether I could connect a MQTT client to a broker directly from a PPPoS status callback? The s

Re: [lwip-users] Can you connect a MQTT client directly from a PPPoS status callback?

2019-05-16 Thread Freddie Chopin
Hello Devanand! On Thu, 2019-05-16 at 20:41 +0530, Devanand Biradar wrote: > I have connected to mosquito cloud using Lwip via MQTT. > Using PPPOS with GSM module. Yes, I know this can be done, because I already have done it and it works (; But now I would like to make it more error-proof and res

Re: [lwip-users] Can you connect a MQTT client directly from a PPPoS status callback?

2019-05-16 Thread Freddie Chopin
On Thu, 2019-05-16 at 19:51 +0200, goldsi...@gmx.de wrote: > It's probably not safe as you risk calling back into modules that are > not reentrant. I don't know this for sure, just as a saftey > measurement... Yes, this is what I was afraid of. > Maybe you could use tcpip_trycallback() from that

Re: [lwip-users] Can you connect a MQTT client directly from a PPPoS status callback?

2019-05-16 Thread Freddie Chopin
On Thu, 2019-05-16 at 21:28 +0200, Sylvain Rochet wrote: > Unless you are calling ppp_close() from a module, which I highly > doubt, > it is safe because other triggers are only rx packet or timeouts. Forgive my ignorance, but what is a "module" in the lwIP world? (; Generally closing/disconnect

[lwip-users] Strings allocated for altcp_tls_create_config_client_2wayauth()

2020-05-18 Thread Freddie Chopin
Hello! I'm wondering what's the correct usage of altcp_tls_create_config_client_2wayauth() and altcp_tls_create_config_client() in regard to allocation of strings with certificates, keys and passwords. Should the buffers with them be kept "alive" as long as the connection is active, or maybe I can

[lwip-users] Recommended WiFi module for use with lwIP

2020-10-17 Thread Freddie Chopin
Hello! I've browsed through the list archives a bit and the last thread about this topic is pretty old (2013-2017), so I'm wondering whether there's something new on the market (; For a sort-of an industrial/automation application, I'm looking for a module which doesn't have to be the cheapest on

Re: [lwip-users] Recommended WiFi module for use with lwIP

2020-10-18 Thread Freddie Chopin
On Sat, 2020-10-17 at 14:16 -0400, Trampas Stern wrote: > I have used an ESP32 wifi module.  The ESP32 is a processor and on > that process I use the Arduino libraries which use LWIP under the > covers.  I then wrote a simple arduino script that makes the ESP32 be > a socket interface via the SPI i

Re: [lwip-users] Recommended WiFi module for use with lwIP

2020-10-19 Thread Freddie Chopin
On Mon, 2020-10-19 at 08:57 +0200, Tomasz W wrote: > > If possible, I would really prefer something that works "out of the > > box" - without a need to write a custom firmware for the module > > itself > > (; > > out of the box module > https://www.microchip.com/wwwproducts/en/ATWINC1500 Thanks