Samland-Gov / mobile-nm

Mobile network management for Samland
MIT License
0 stars 0 forks source link

Base Transceiver Station (virtual) #1

Open ajh123 opened 1 week ago

ajh123 commented 1 week ago

Implement a Base Transceiver Station that allows communications from virtual mobile devices inside virtual worlds.

Implementation

Use https://github.com/osmocom/osmo-bts and add a BTS models like the osmo-bts-virtual however modify it to use something like Web Sockets. Mobile devices will communicate with the BTS over web sockets.

A C based web socket library is required.

Reasons

ajh123 commented 1 week ago

Considering there to not be that many recently updated C web socket libraries, it makes sense to use a web socket to regular UDP / TCP socket convert like the already made Samland Proxy.

Since osmo-bts-virtual already communicates with sockets a custom BTS model does not need to be implemented. Instead a client library is needed to communicate with the BTS through the Samland Proxy. However, this needs good understanding of the packet structure.

ajh123 commented 1 week ago

An implementation of https://osmocom.org/projects/baseband/wiki/FakeTRX/ could be used to make the BTS believe it is receiving GSM bursts through a normal FakeTRX, however the clients connected to FakeTRX are actually web socket connections.

FakeTRX is written in Python, so https://github.com/python-websockets/websockets can be used to interface with the virtual world. This would mean a rewrite of trxcon and mobile are needed for the client side, however this is easier than a rewrite of the BTS software and client software.

ajh123 commented 1 week ago

The rewritten trxcon and mobile programs would live on a computer acting as a virtual "BTS" inside the Minecraft world, it will communicate to a real BTS using the method described above. Mobile devices would communicate with the virtual "BTS" over Wireless Modems with the Modem API

Modems support having multiple channels that are a number. This channels closely resemble the frequencies as seen in the real world.

ajh123 commented 1 week ago

An easier option would to skip the rewrite of FakeTRX and just rewrite trxcon and mobile. trxcon would use sockets sent through the Samland proxy. These programs would be written in Computercraft Typescript.

An instance of FakeTRX and regular trxcon would be needed to communicate with the real osmocom BTS software.