LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-22-2023, 03:08 AM   #1
bablu
LQ Newbie
 
Registered: Sep 2023
Posts: 1

Rep: Reputation: 0
ISSUE FACING WITH 'INTHEHAND.NET.OBEX' package


Hope you are doing good. I am mailing you regarding support required in 'InTheHand.net.Obex'(4.0.4) package.
i have been using this package to send file from my laptop to a connected bluetooth device.
below code explains it....
using (var bluetoothClient = new BluetoothClient())
{
string filePath = @"D:\pdf_export\Patient.pdf";
var fileName = Path.GetFileName(filePath);
var address = bluetoothClient.PairedDevices.ToList()[1].DeviceAddress; //For my testing purpose only
var uri = new Uri("obex://" + address + "/" + fileName);
ObexWebRequest request = new ObexWebRequest(uri);
request.ReadFile(filePath);
var result = request.GetResponse() as ObexWebResponse;
Console.WriteLine($"Result StatusCode: {result.StatusCode}");

Above code is executed on .net 6 environment. Above code always gives status code 'RequestUrlTooLarge' code always even if the file size is 83kb. when i try to send file of 40KB it works fine.

I have created another dummy application with .net framework dll 'InTheHand.Net.pernosal dll and was able to execute above code without any error.

Please help me out how to proceed with 'IntheHand.Net.Obex' package.

Thanks in advance.
 
Old 09-22-2023, 07:25 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
But why are you asking this here? What does it all have to do with Linux?
 
Old 09-22-2023, 07:30 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,689

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by bablu View Post
Hope you are doing good. I am mailing you regarding support required in 'InTheHand.net.Obex'(4.0.4) package. i have been using this package to send file from my laptop to a connected bluetooth device. below code explains it....
Code:
 using (var bluetoothClient = new BluetoothClient())
 {
     string filePath = @"D:\pdf_export\Patient.pdf";
     var fileName = Path.GetFileName(filePath);
     var address = bluetoothClient.PairedDevices.ToList()[1].DeviceAddress;  //For my testing purpose only
var uri = new Uri("obex://" + address + "/" + fileName);
ObexWebRequest request = new ObexWebRequest(uri);
request.ReadFile(filePath);
var result = request.GetResponse() as ObexWebResponse;
Console.WriteLine($"Result StatusCode: {result.StatusCode}");
Above code is executed on .net 6 environment. Above code always gives status code 'RequestUrlTooLarge' code always even if the file size is 83kb. when i try to send file of 40KB it works fine. I have created another dummy application with .net framework dll 'InTheHand.Net.pernosal dll and was able to execute above code without any error.

Please help me out how to proceed with 'IntheHand.Net.Obex' package. Thanks in advance.
I think the best first-step would be for you to post Windows related questions on a Windows forum...this is LinuxQuestions. Or you could look at their documentation for that package:
https://inthehand.github.io/html/N_I...d_Net_Obex.htm
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
Bluetooth and OBEX mobileMike Linux - Networking 2 07-01-2009 03:51 AM
gnome-obex-sever wisdom Linux - Software 1 11-12-2005 06:47 AM
Bluetooth OBEX PUSH with Suse 9.3 JesperX Linux - Networking 1 07-31-2005 09:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration