Plugin.BluetoothClassic for Xamarin is a plug-in that supports transmitting/receiving data through Bluetooth Classic connection. git: github.com/ros... NuGe packaget: www.nuget.org/...
Пікірлер: 89
@HOSHINO_KAEDE11 ай бұрын
So amazing! Xamarin's guidance video is few, thank to you!
@Электротехникадляпрограммистов11 ай бұрын
No problems! Glad that it was helpful for you!
@stanleygarciafletes4363 Жыл бұрын
excellent video, very helpfull, tanks for sharing
@phamngocquapham5472 Жыл бұрын
Thank you for the good video, but i have a question. I meet error "Java.Lang.SecurityException Message=Need android.permission.BLUETOOTH_CONNECT permission for AttributionSource". You can fix it. thank you very much.
@valentinp37954 жыл бұрын
Such a great video !! You deserve more view !! You saved me !! Keep going !!!
@Электротехникадляпрограммистов4 жыл бұрын
Thank you. I'm glad you found it helpful!
@valentinp37954 жыл бұрын
@@Электротехникадляпрограммистов i was wondering what kind of bluetooth module are you using? hc-05 or hc-06. Because I'm using an hc-05 with an arduino and after 2 sending with the app the connection is lost. have you an idea about this issue ? Again : great video !
@Электротехникадляпрограммистов4 жыл бұрын
@@valentinp3795 Hello. I am using HC-06. Yep, I had same problems before. It was working some seconds and then connection was down. In my case it was because of bad connection between MCU and BT module. I used contact less breadboard. And when I changed wires, reconnected everything then problem was gone... No problems.
@valentinp37954 жыл бұрын
@@Электротехникадляпрограммистов ok thank you, I've check my connection but the probleme is still here. Never mind I would try with an hc-06 (I use an hc-05). Do you know how to add a text to say if the module is steel connect to the app ? to check if the issue comme from the arduino code or frome the app (maybe the baud rate). Where can I find the bookstore orders? Are you going to make other videos on Xamarin? Thank you for your prompt response !
@Электротехникадляпрограммистов4 жыл бұрын
@@valentinp3795 >Do you know how to add a text to say if the module is steel connect to the app ? What kind of connection you using: IBluetoothConnection or IBluetoothManagedConnection? >to check if the issue comme from the arduino code or frome the app (maybe the baud rate). You can connect to the Bluetooth module from the PC. It should support AT commands and check baud rate. I think better to read manual from the your particular HC-xx module, because this settings can be firmware specific. > Where can I find the bookstore orders? What you mean? What you talking about? >Are you going to make other videos on Xamarin? I have a such plans, but I don't know when. >Thank you for your prompt response ! No problems.
@cris1185 Жыл бұрын
could you have an example sending char[] in the Transmit?
Good morning! please, how to receive multiple digit like data from a sensor with your code. Thank you!
@emrebayram36293 жыл бұрын
thank u bro , good video and project
@Электротехникадляпрограммистов3 жыл бұрын
Hello. Thank you for the feedback. Glad that it was helpful to you )
@SyahrialRukmana3 жыл бұрын
How to receiving data and display it ?
@Pio2K_TH2 жыл бұрын
Can you make an example of connecting to Bluetooth and getting data all the time? without having to press a button to receive information
@Pio2K_TH2 жыл бұрын
Can you teach me how to write and receive data all the time after connecting to Bluetooth?
@thegaming52092 жыл бұрын
Does this plug-in also work for IOS? Because on your github repo there is only permissions for Android and not for ios.
@Электротехникадляпрограммистов2 жыл бұрын
Hello. Nope, for now, this plug-in works just on Android.
@gglesupport96162 жыл бұрын
Здравствуйте, а получится установить таким образом связь между двумя телефонами/планшетами на Android?
@rubenpena9032 жыл бұрын
Hi Rostyslav. First of all, thank you!!! Could you make an example where an app continuously receives data from another device? Something like a terminal. The example where you receive a byte works perfectly for me, but I can't make a continuous connection work correctly. Thanks again from Argentina!
@Электротехникадляпрограммистов2 жыл бұрын
Hello. Yep, such an example already exists. All you need is to use ManagedConnection. Example: github.com/rostislav-nikitin/Plugin.BluetoothClassic/tree/master/examples/Digit My greetings to Argentina!
@서동헌-k1j3 жыл бұрын
Thank you for the good video, but i have a question. Does the value of the sensors sent and received up there matter what sensor is used? if i use moisture sensor, can express moisture percent at this display?
@Электротехникадляпрограммистов3 жыл бұрын
Thank you for the feedback. > Does the value of the sensors sent and received up there matter what sensor is used? Nope, you can use any sensor. >if i use moisture sensor, can express moisture percent at this display? Sure
@서동헌-k1j3 жыл бұрын
@@Электротехникадляпрограммистов thanks answer ! ^^ Then can I just connect to Bluetooth without writing the code?
@Электротехникадляпрограммистов3 жыл бұрын
@@서동헌-k1j It depends on the format of the data your sensor is sending.
@서동헌-k1j3 жыл бұрын
@@Электротехникадляпрограммистов Where should I fix to get the data I want?
Повторил код в своём проекте для теста. Появилась проблема. Если я ставлю брейкпоинт также как и автор на строку с методом отправки данных - всё нормально. После того, как я убираю брейкпоинт, первая после этого отправка данных завершается удачно, но уже следующая за удачной - заканчивается ошибкой подключения. После этого помогает только аппаратный перезагруз BT модуля. В общем - с устаноленным брейкпоинтом отправлять можно сколько угодно раз. Без - только 1 и всё, ошибка.
@TheHrushev2 жыл бұрын
Проект автора с гитхаба без единого изменения работает так же. UPD. При добавлении асинхронной задержки после установки соединения с BT модулем, проблема пропадает.
@spaceroom8302 жыл бұрын
Здравствуйте Ростислав, могли бы вы поделиться исходным кодом которым вы пользовались для создания ардуино устройства для передачи данных
@Электротехникадляпрограммистов2 жыл бұрын
Здравствуйте. Дело в том что я пользовался не ардуино. Я пользовался микроконтроллером AVR ATmega8 + операционная система SoC OS. Вот её исходный код и примеры использования: github.com/rostislav-nikitin/socOS
@huron_vodka2398 Жыл бұрын
Great video, I have a problem running the app: Java.Lang.SecurityException: 'Need android.permission.BLUETOOTH_CONNECT permission for AttributionSource { uid = 10464, packageName = com.companyname.plugin.bluetoothclassic, attributionTag = null, token = android.os.BinderProxy@3364673, next = null }: AdapterService getBondedDevices' I wrote the android Manifest file as shown in the video, do you have any idea why it doesn't work?
@nkokarovtsev2 жыл бұрын
Здравствуйте, спасибо за видео. Можно ли как нибудь считывать уровень блютуз сигнала с устройства (например hc-05) ?
@Электротехникадляпрограммистов2 жыл бұрын
Здравствуйте. Рад что Вам данное видео было полезно. >Можно ли как нибудь считывать уровень блютуз сигнала с устройства (например hc-05) ? Всё зависет от конкретного девайса. Наверняка есть устройства которые позволяют это делать. Вам нужно скачать datasheet или reference manual от конкртетного устройства и посмотреть что именно оно поддерживает и как получить доступ к этим функциям.
@Zodiacosa2 жыл бұрын
Ростислав, снова здравствуйте! Интересно было бы посмотреть видео о передаче byte-данных между двумя Android-устройствами (или эмулятором на ПК и Android-телефоном), видел в комментариях похожие просьбы, думаю, не одному мне было полезно, спасибо за Ваш труд!
@Электротехникадляпрограммистов2 жыл бұрын
Здравствуйте! К сожалению у меня есть только один андроид телефон, с подходящей версией андроида, в семье. Если вдруг появится второй, попробую провести подобный эксперимент. Рад, если Вам было полезно данное видео.
@Zodiacosa2 жыл бұрын
Здравствуйте, а если подключить 2 телефона между собой, то будут таким образом передаваться данные? (По типу передачи сообщений между ними) Или это работает только для телефона и датчика?
@Электротехникадляпрограммистов2 жыл бұрын
Здравствуйте. Думаю будут, но на практике не пробовал.
@Zodiacosa2 жыл бұрын
@@Электротехникадляпрограммистов Спасибо за ответ! Я постараюсь проверить на практике и сообщить Вам, спасибо за Ваш пакет Bluetooth и видео, очень помогает👍🏻
@Электротехникадляпрограммистов2 жыл бұрын
@@Zodiacosa Если получится это проверить, и Вы поделитесь своим опытом, буду Вам благодарен. Рад что Вам это оказалось полезно.
@Zodiacosa2 жыл бұрын
Добрый вечер! Я пробовал использовать Ваш пример из GitHub (Digit) для установки связи между двумя телефонами (Android 11, MIUI), пакеты установил, разрешения дал, но подключение не установилось, причину узнать пока что не смог Также я немного переделал Ваш код, чтобы он отправлял данные не при изменении значения Digit, а при нажатии на кнопку, но также отправить, как и подключиться, не вышло
@АлександрГневашев-ю6ж3 жыл бұрын
Приветствую, а как можно организовать подключение к конкретному устройству (hc-05), без выбора из списка? Есть ли возможность задания конкретных параметров для подключения к определенному заранее устройству
@Электротехникадляпрограммистов3 жыл бұрын
Здравствуйте. IBluetoothAdapter предоставляет свойство IEnumerable BondedDevices. В нём находятся все Paired Bluetooth устройства. Находите нужный путём перебора или LINQ и подключаетесь. Т.е. это на данный момент единственный реализованный вариант. Алгоритм такой: 1. На телефоне находите нужное устройтво 2. Подключаетесь к нему 3. Оно становится доступным в BondedDevices 4. Создаёте подключение 5. Передача данных
@АлександрГневашев-ю6ж3 жыл бұрын
@@Электротехникадляпрограммистов Благодарю за помощь, видео очень помогло в написании приложения
@Электротехникадляпрограммистов3 жыл бұрын
@@АлександрГневашев-ю6ж На здоровье. Рад что Вам помогло данное видео.
@shrutisharrma3013 жыл бұрын
Actually, in SelectDevicePage I am getting NullExveption for lvBondedDevices.ItemsSource = adapter.BondedDevices; can you please guide me where I am getting wrong
@RostislavNikitinHuman3 жыл бұрын
Hello. I think your adapter variable is not set properly. Could you set breakepoint in that line and check lvBondedDevices and adapter for null?
@shrutisharrma3013 жыл бұрын
@@RostislavNikitinHuman thank you for replying Rostislav, I appreciate it. Yes I have already did that and it's getting null value, also I think because I don't want a bonded device, I want normal Bluetooth connection,so might be the problem.that being said couldyou please guide me how I can modify this for normal Bluetooth connection and not with bonded devicd
@RostislavNikitinHuman3 жыл бұрын
@@shrutisharrma301 No problems. You getting null value for adapter or lvBondedDevices? Bonded devices are some external devices that paired with your device (mobile phone, etc.). And to create a connection you need to pair your mobile with at least one BT device.
@shrutisharrma3013 жыл бұрын
@@RostislavNikitinHuman Yes, unfortunately, getting null values for lvBondedDevices.ItemsSource
@shrutisharrma3013 жыл бұрын
@@RostislavNikitinHuman Yes, actually getting null value in lvBondedDevices.ItemsSource
@unfuny104 жыл бұрын
Круто
@Электротехникадляпрограммистов4 жыл бұрын
Спасибо! Рад что тебе понравилось.
@danielleijarobledo68644 жыл бұрын
Me funcionó para Arduino. Gracias por la ayuda. ¿No sabes cómo puedo hacerlo en bucle? Estaría genial una explicación
@danielleijarobledo68644 жыл бұрын
Me salvaste la vida, muy sencillo y bien explicado.
@RostislavNikitinHuman4 жыл бұрын
@@danielleijarobledo6864 Hello. English please.
@hugov62802 жыл бұрын
Oye amigo, sabes cómo puedo hacer para que pueda recibir valores del bluetooth en un label? Quise reemplazar el stepperDigit.Value por un label.text pero me manda error. Sabes cómo puedo solucionarlo?
@hugov62802 жыл бұрын
El problema es que en la parte: var device = (BluetoothDeviceModel)BindingContext; me sale el siguiente error: specified cast is not valid. Me serviría de mucha ayuda tu respuesta amigo.
@enrickdemunter31823 жыл бұрын
can you post your arduino code? or can i find it somewhere?
@Электротехникадляпрограммистов3 жыл бұрын
Hello Enrick. Sure. There there was used: github.com/rostislav-nikitin/Plugin.BluetoothClassic/tree/master/examples Or you can use this one: github.com/rostislav-nikitin/socOS
@enrickdemunter31823 жыл бұрын
@@Электротехникадляпрограммистов Where can i find the arduino code?
@Электротехникадляпрограммистов3 жыл бұрын
@@enrickdemunter3182 All examples are for the raw ATmega8 MCU. But I think you can install AVR Studio and with little modifications flash Arduino with one of the examples. Because Arduino's ATmeaga328 very similar to the ATmega8 but has more SRAM, EEPROM, etc.
@enrickdemunter31823 жыл бұрын
@@Электротехникадляпрограммистов I understand but is there a repository where i can find your arduino code.
@yentlbaert92363 жыл бұрын
@@Электротехникадляпрограммистов I don't understand how the ATmega8 is receiving the input. What code is receiving the data on the hardware side?
@hugov62802 жыл бұрын
How adapter. StartDiscovery(); Works? I need to scan devices and display in listview.
@Электротехникадляпрограммистов2 жыл бұрын
Hello. It scans already paired devices and returns those which are now available.
@hugov62802 жыл бұрын
@@Электротехникадляпрограммистов is there a way to show devices that are not paired?
@Mielesplayz2 жыл бұрын
Does this also work in a .NET MAUI app?
@Электротехникадляпрограммистов2 жыл бұрын
Hello. Didn't test in .NET MAUI. Developed and tested just on Android.