RN-42 Drops connection on SPP profile - windows

I am using RN42 on embedded device connected to UART. Baudrate is 115200 ( I tried lowering it but didnt help. )
I am using default settings.
Every time when I pair a device with PC I can open a serial port to remote device, but as soon as i Close the port, and I try to open it again It will fail with "semaphore timeout error".
If I want to restore connection I have to delete device from PC and add it again, then it will work for 1st time and fail again.
Does anyone have similar issues or maybe solution to this? If you need more info ask, I realy dont know what info to supply in this case.
On PC side I have USB Bluetooth device and integrated one. The both behave the same.
On embedded side RN42 is connected to UART of AM3517.
I hope you can help me.
Regards,
Luka

I found the issue. It was PIN3 (GPIO6) connected high. This way after 1 connection module switched to auto master and was unable to connect to other masters.

Related

esp32 WiFi connection issues

I'm a beginer with ESP32 programming.
I'm trying to play with the example provided in https://github.com/espressif/esp-idf/tree/master/examples/wifi/getting_started/station/main and it works perfectly with my iPhone in tethering mode, however it's impossible to connect to my home access point.
I (776) wifi:mode : sta (30:c6:f7:29:c6:48)
I (776) wifi:enable tsf
I (786) wifi station: wifi_init_sta finished.
I (996) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1
I (1746) wifi:state: init -> auth (b0)
I (2746) wifi:state: auth -> init (200)
I (2746) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1
I (2756) wifi station: retry to connect to the AP
Each try fails. I tried to play with some parameters but nothing improves the situation. Any idea on how to collect more information to set the connection properly?
By the way I'm able to scan every visible network with https://github.com/espressif/esp-idf/blob/master/examples/wifi/scan/main/scan.c so this is why I guess it's configuration related...
I was having this issue. I found that, for me, the issue was not in the ESP32. It was the WiFi Router. I had the security on the router set to 'WEP' in the router. When I changed the security to 'WPA2-PSK' the ESP32 device connected right away.

Openwrt/Raspberry: lost the connection after periodic connection test through usb wifi adapter

I'm developing a script that permits to connect to the internet through a Mediatek MT7612U wifi adapter (Alfa AWUS036ACM) and making some connection tests using speedtest-cli, iperf3 ...
My script is running under OpenWrt linux system. I installed Openwrt in a raspberry PI4 Model B. I plugged to the raspberry two wifi adapter (Alfa AWUS036ACM with Mediatek MT7612U chipset).
The script is running permenantly, and making periodically some connection Tests. After a period of time I lost the connection.
When I checked the system log I found this error reported by the kernel:
kern.err kernel: [ 1929.020945] mt76x2u 2-1:1.0: error: mt76x02u_mcu_wait_resp failed with -110
The issue disappear when I reboot the system. But I need to fix it without rebooting.
I tried to reset the usb device with ioctl USBDEVFS_RESET but that caused the lost of corresponding network interfaces,
I tried also to poweroff/poweron the usb device with commands like that:
echo disabled > /sys/bus/usb/devices/usb2/power/wakeup
echo enabled > /sys/bus/usb/devices/usb2/power/wakeup
but the issue is not fixed
I tried also to unbind/bind the usb device
echo '2-1' > /sys/bus/usb/drivers/usb/unbind
echo '2-1' > /sys/bus/usb/drivers/usb/bind
and the issue is not fixed also
Has someone an idea why I got this blocker issue. Is there an idea to fix or bypass it without the need to reboot the system.
I've also been getting this exact issue. I've also been using the Alfa AWUS036ACM.
I've tried unplugging the adapter and that resets it, then after putting it into monitor mode again it works for a short while before failing with the issue OP has again. I'm using a Raspberry Pi 3b

Route websocket data through USB link to PC client (Android)

I have an issue where WiFi is not available on an Android device. We want to stream image data from the device using a websocket server (written using WebSocket++) through to the PC. However, I'm not sure if this is possible without operational WiFi. So, the position we are in is that we may only have the USB link available.
Someone today suggested we might be able to get Websockets working using adb port forwarding (see https://developer.android.com/studio/command-line/adb#forwardports), but I'm not sure if that's correct. Could this work, and what would that solution look like?
Are there any other reasonable options. I'm not certain if tethering is available on the device and if that could be another solution?

A confusion about chromecast discover

When I click google cast icon in my chrome browser, it will try to discover whether there is an available chromecast around my pc.
If yes, then it will recognize it (assume that chromecast has already been set and connect to the same router which my pc is connected to).
My first confusion is, during this course, does my pc ever connect to chromecast's own wifi signal? Or they ONLY talk via my router?
My second confusion comes from a test:
I set 2 routers: router_A on top;router_B connects to LAN port of router_A;
My pc also connects to router_A;
chromecast dongle connects to router_B;
multicast/upnp of router B is enabled, firewall on router_B is disabled.
My pc cannot find chromecast in this situation. I'm confused and I think it should work since router_B obtains ip/gateway from router_A.
The third confusion is when I swapped my pc and chromcast, to let my pc connect to router_B, and chromecast connect to router_A, my pc found the chormcast......
After Chormecast is set up with a wifi network, it is discovered through mDNS. For (2) and (3), since discovery is done through multicast/mDNS, you need to read on that topic and look at the configuration settings of your routers to see how you can set things up to get what you want.

Locked Serial Port on Vista

I'm working on an App that talks to a serial port, and on my development machine, I'm running Vista, and that serial port is a Bluetooth connection. Occasionally, the serial port gets caught in a state where my App can no longer connect to it. In .net I get an IOException with a message reading "Element not found."
I've tried restarting the App, connecting with other Apps (a communications client like HyperTerm) but nothing helps. I can't find any more specific error message, and nothing is logged to the machine's event logs. The device manager tells me the port is "working properly."
Is there any way to find out which process and or .dll has possession of a serial port, and/or force a port closed?
If it makes any difference, my App is in C#, but structurally, it's not convenient to open and close the port with a "using" statement.
Thanks,
Andy
To the best of my knowledge you can't close a serial port that you do not have the handle to. My experience of Bluetooth serial ports is that they can end up getting mapped to different COM port numbers at connection time, and can sometimes leave bogus COM ports when disconnected. For example, I currently have no bluetooth devices connected, but if I go into device manager, I see a total of eleven COM ports listed as Bluetooth serial port The properties on each of these ports show the device as working and available, and I can usually open these ports though I get occasional failures. My work around for this is to force COM port numbers for connected deviced, through properties / advanced / COM port number. I'm not sure if the problem is driver related (IVT corp in this case) or a problem with the way Windows manages blutooth serial ports.
Sorry I couldn't be of any more help.

Resources