問題タブ [lwip]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
4 に答える
3987 参照

c - lwIPはZeroconfをサポートしていますか?

lwIPにはAutoIP(別名IPv4LL、別名RFC 3927 )コードがあるようですが、 Zeroconfスタックの上位にあるmDNSとDNS-SDRFC 2782を使用)で何かを実行するかどうかはわかりません。

では、lwIPはDNS-SDサービスディスカバリをサポートしていますか?そうでない場合は、Avahiのようなプロジェクトからコードを移植するのは簡単ですか(ライセンスで許可されていると仮定します)?

0 投票する
1 に答える
1173 参照

c++ - 私のタスクはlwIPをCからC++に変換します

ライブラリlwIPをOOPスタイルに書き換えるタスクを取得し、オブジェクトストリームとして、このライブラリにアクセスすることを理解し始めましたが、それが問題です:src \ include \ lwip \ arch.h include file cc.h( 43行目)私もコンパイラも見つからない

0 投票する
2 に答える
3354 参照

c - Zeroconf 名前解決

ウェブサーバーが組み込まれた制御デバイスを開発しています。Web サーバーは、(Windows ブラウザー、Mac ブラウザー、iPhone android などから) それを要求するすべての Web ブラウザーに制御インターフェイスを提供します。

私が抱えている問題は、デバイスへのアクセス方法を一般的に知る一般的な方法にあります。つまり、Web ブラウザに入力するアドレスです。

固定 IP はユーザーにとって技術的すぎて、デバイスが多くの異なるローカル ネットワークに接続される可能性があるため、うまくいかない可能性があります。uPnp サービス ディスカバリを使用するには、一部のプラットフォームのクライアントでソフトウェアを実行する必要があり、単に Web アドレスを入力するほど自然ではありません。名前解決を実装したい。

私の現在の実装では、netbios プロトコルを使用しています。したがって、Windows ブラウザーから //controller/ と入力すると機能しますが、Mac やスマートフォンでは機能しません。さらに、Apple の mDnsresponder を実装して、Mac と iPhone を快適にプレイできるようにすることもできます (ただし、//controller.local/ に限定されると思います)。Android、Symbian などにも同様のものが存在する可能性がありますが、1 つのネットワーク名を作成するためのより普遍的な解決策はありませんか?

プラットフォームは現在、TI Cortex M3 プロセッサと lwIP に基づいています。

解決策を見つける方法についてのヘルプや提案は大歓迎です。

敬具、

ボブ

0 投票する
3 に答える
16625 参照

c - C でのマルチスレッド クライアント サーバー ソケット プログラミング

同じ IP アドレスを持つ同じマシン上で C でマルチスレッド クライアント サーバー ソケット プログラミングを実装していますが、クライアントとサーバーのポートは異なります。C 環境で pthread の概念を使用して実装しました。しかし、「accept()」ルーチンに到達すると、サーバー スレッドが停止しているのに対し、クライアント スレッドが実行されていることしかわかりません。何が問題なのだろうと思っています。誰かが私がどこを間違えているかを知ることができれば、それは本当に役に立ちます

私のクライアントコードは次のようになります。

私のサーバーコード:

やり方が間違っていたら教えてください

よろしくデブ

0 投票する
1 に答える
1551 参照

networking - lwipDHCPクライアントがルーターのアクティブIPテーブルに表示されない

マイクロコントローラーでlwipクライアントを開発しました。これは、電源を入れるたびにIPアドレスを正常に取得できるようですまた、デバイスはネットワークベースのクエリ(ソケットベースのコマンド、Webページ「GET」など)に正常に応答しています。

私が抱えている問題は、ルーターの「アクティブIPテーブル」を見ると、デバイスが存在せず、lwipの起動手順で何か間違ったことをしたのではないかと考え始めています。

誰かが私がこれをトラブルシューティングし始めるべき場所を知っていますか?

更新(2011年10月20日):

私は、デバイスのMACアドレスが少なくともある程度責任があると確信し始めています。Windows ARPテーブルとlwipの初期化で設定したと思われるMACアドレスを比較したときに、ターゲットのMACアドレスが競合していることがわかりました。

0 投票する
2 に答える
2868 参照

memory-leaks - lwIP の mem_malloc から利用可能なメモリを取得するにはどうすればよいですか?

組み込みデバイスで lwIP を使用していますが、メモリ不足に関連するバグが発生している可能性があります。mem_malloc 関数自体がメモリ割り当てに失敗したときに null を返すことは知っていますが、任意の時点で使用可能なメモリの大まかな評価を取得する方法はありますか? 直接監視して、どの使用パターンがメモリ リークを起こしているかを判断できると便利です。

ありがとう。

0 投票する
1 に答える
3227 参照

c - 受信した UDP パケットは LwIP スタックにキューイングされていますか?

組み込みデバイス用のFreeRTOSでLwIPを使用してCプログラムを作成しています。マイクロコントローラーは Atmel AVR32 です。

LwIPでは、 でudp受信コールバック関数を設定した後、 UDPデータグラムを受信udp_recv()するとコールバック関数が呼び出されることがわかりました。次に、コールバック関数内で次のようなことができます。しかし、コールバック関数が終了する前に別のUDPパケットを受信した場合、この 2 番目のパケットはバッファにキューイングされますか? または、最初のコールバック関数が終了していなくても、コールバック関数がすぐに再度呼び出されますか?process_udp_packet()

どうもありがとうございました。

0 投票する
1 に答える
9885 参照

network-programming - LwIP - netconn API - プロセスがブロックされている間に TCP パケットを送信しますか?

FreeRTOS + LwIPを使用して、イーサネット ベースのベッドサイド ナース コール デバイスを開発しています。いくつかの例とドキュメントを読んだ後、LwIP のnetconn APIを使用して TCP でデータを送受信したいと考えています。なぜなら、私は BSD スタイルの API に慣れておらず、生の API は難しいかもしれないからです。

netconn_accept()リモートホストからの接続要求が到着するまでプロセスをブロックするnetconn_recv()機能と、データが到着するのを待っている間もプロセスをブロックする機能は知っています...これらの機能は両方ともプロセスをブロックします。サーバーに適していますただし、データを受信するには、患者がボタンを押したときにナースセンターへの「呼び出し」をトリガーする必要があるクライアントとしても機能する必要があります。では、リモート ホストからの接続を待機している (プロセスをブロックしている) 間に、TCP パケットの送信を開始するにはどうすればよいでしょうか?

SIP (Session Initiation Protocol) を使用して通話を開始する必要があるため、TCP を送信する必要があります。これは医療機器であるため、信頼できるはずです。どうもありがとうございました


@Kyle Heironimus 、@werewindle 私はあなたが LwIP の経験を持っていることを知っているので、あなたを私の質問に追加します。

0 投票する
1 に答える
3600 参照

gcc - プロジェクトに lwIP のオリジナル ソース コードを含めるにはどうすればよいですか?

現在、Atmel AT91SAM9260 評価ボード (いくつかの周辺機器を備えた ARM ベースのマイクロコントローラー) を使用して、単純な tcp/ip サーバーを実装しています。

Atmel が提供するいくつかの例には、uIP ベースの Web サーバーが含まれていますが、uIP は必要なスループットを処理できません。

バージョン 1.1.1 (または少し上) に基づいた同じ例を見つけました。

最近、スタックに問題が発生し始め、lwIP の新しいバージョンで AT91SAM9260 へのポートが見つかりませんでした。プロジェクトをビルドするために、Eclipse+Yagarto+gcc を開発スタックとして使用しています。

最新バージョン 1.4.0 ( http://download.savannah.gnu.org/releases/lwip/で入手可能) のソース コードをプロジェクトに置き換え、すべてのコンパイル エラーを修正しようとしただけで、あきらめました。

ソース コードの構造は非常に似ていますが、微調整が多すぎるようです。

元のソース コードをスタックに適合させるための具体的なガイドはありますか? C++ コードはスタック上でコンパイルするだけのはずではありませんでしたか?

0 投票する
1 に答える
9420 参照

c - Performance issues when using the raw TCP API of lwIP

I use lwIP to add networking functionality to my system. On my platform i built a buffer that i want to send every time it is full. This can happen quite quickly. The system is directly connected to a switch in a private LAN. Initially the sending of data had a very large time gap in between of 2 seconds. Additionally the packets had a size of 720 bytes if my memory serves me correctly. The used buffer currently has capacity for about 20000 bytes and I might decide to increase this in the future. The network has 100 mbit speeds and I would like to come close to these speeds on my platform.

When searching for the cause of the slow speeds I ended up at lwIP's configuration. Prior to that I altered my sending mechanism. I use the raw lwIP API and at present I write the data as follows:

I know the copy flag creates a performance hit, but this is added because I don't want to overwrite data before it's actually sent. (and the flag isn't the main problem but something to polish once it's working properly) In a prior solution i omitted the flag and simply waited for all bytes to be ACK'd (after forcing data to be send after writing by calling tcp_output()) by using the callback function. (This might be worse performance wise and I dont think it's related)

I played a little with the settings in the of lwIP and that seemed to make some difference. I think the window size especially made a difference although I'm not quite sure. At the moment I increased the window size significantly and even though I get a burst of packets with about 2ms between them (instead of 2s!) this is followed with a long period of "nothing" and then a burst again. I want it to continuously send at the speed it should be capable of which should be 100 mbit at most but atleast 10 mbit is not weird to expect, right?

I loaded up wireshark to see what was happening.

192.168.1.26 is my desktop computer running windows. 192.168.1.192 is the embedded system that's using lwIP.

Initially I send a start request from the desktop to the lwIP system, letting the system know it should start sending the buffer each time it is full. In case it is relevant, this is the corresponding part of the trace:

I believe this is alright although i'm not certain. Anyway, after this the actual sending happens. The relevant trace looks as follows The start time is 207.992115 which should be considered the starting time. The difference between that and the 7.177903 is expected:

It seems that I currently send things quicker than the desktop is ACKing. The traffic after the trace above shows as black bars and looks like:

Now after this point there is a huge delay that I cannot explain. The next packets arrive at 345 seconds, this is a 135 second difference. (although in most cases it was a bit less, but still wayy too high) It starts as follows:

etc.

Later on a similar problems occur although the mentioned delay is shorter. My question is: How can I fix the problem of the slow sending from my platform and how should i configure my lwIP settings to expect decent/good results? I want to send the data at fast speeds. (my network is capable of 100Mbps, the closer the better) I think i currently messed up my settings entirely but I am not sure how to finetune them for my needs. Here are some (hopefully) relevant settings from my lwipopts.h

file: